mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1524337: Move WebAssembly reftypes/gc configuration to moz.configure; r=luke
Differential Revision: https://phabricator.services.mozilla.com/D19788 --HG-- extra : rebase_source : 35112254e9eb5f239650466cc73329ccc175af4a extra : histedit_source : 5a1a1d6b663c46b9cb63998566e8f101cf19eb46
This commit is contained in:
parent
638a7c7e06
commit
afec75505d
@ -98,7 +98,3 @@ BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
|
||||
if CONFIG['NIGHTLY_BUILD']:
|
||||
DEFINES['ENABLE_WASM_REFTYPES'] = True
|
||||
DEFINES['ENABLE_WASM_GC'] = True
|
||||
|
@ -538,3 +538,68 @@ js_option('--enable-wasm-bulk-memory',
|
||||
|
||||
set_config('ENABLE_WASM_BULKMEM_OPS', depends_if('--enable-wasm-bulk-memory')(lambda x: True))
|
||||
set_define('ENABLE_WASM_BULKMEM_OPS', depends_if('--enable-wasm-bulk-memory')(lambda x: True))
|
||||
|
||||
|
||||
# Support for WebAssembly reference types.
|
||||
# =====================================================
|
||||
|
||||
@depends(milestone.is_nightly)
|
||||
def default_wasm_reftypes(is_nightly):
|
||||
return is_nightly
|
||||
|
||||
js_option('--enable-wasm-reftypes',
|
||||
default=default_wasm_reftypes,
|
||||
help='{Enable|Disable} WebAssembly reference types')
|
||||
|
||||
set_config('ENABLE_WASM_REFTYPES', depends_if('--enable-wasm-reftypes')(lambda x: True))
|
||||
set_define('ENABLE_WASM_REFTYPES', depends_if('--enable-wasm-reftypes')(lambda x: True))
|
||||
|
||||
|
||||
# Support for WebAssembly generalized tables (anyref tables, multiple tables).
|
||||
# ============================================================================
|
||||
|
||||
@depends(milestone.is_nightly, '--enable-wasm-reftypes')
|
||||
def default_wasm_generalized_tables(is_nightly, reftypes):
|
||||
if reftypes and is_nightly:
|
||||
return True
|
||||
|
||||
js_option('--enable-wasm-generalized-tables',
|
||||
default=default_wasm_generalized_tables,
|
||||
help='{Enable|Disable} WebAssembly generalized reference tables')
|
||||
|
||||
set_config('ENABLE_WASM_GENERALIZED_TABLES', depends_if('--enable-wasm-generalized-tables')(lambda x: True))
|
||||
set_define('ENABLE_WASM_GENERALIZED_TABLES', depends_if('--enable-wasm-generalized-tables')(lambda x: True))
|
||||
|
||||
|
||||
# Support for WebAssembly GC.
|
||||
# ===========================
|
||||
|
||||
@depends(milestone.is_nightly, '--enable-wasm-reftypes')
|
||||
def default_wasm_gc(is_nightly, reftypes):
|
||||
if reftypes and is_nightly:
|
||||
return True
|
||||
|
||||
js_option('--enable-wasm-gc',
|
||||
default=default_wasm_gc,
|
||||
help='{Enable|Disable} WebAssembly GC')
|
||||
|
||||
set_config('ENABLE_WASM_GC', depends_if('--enable-wasm-gc')(lambda x: True))
|
||||
set_define('ENABLE_WASM_GC', depends_if('--enable-wasm-gc')(lambda x: True))
|
||||
|
||||
|
||||
# Support for WebAssembly private ref types.
|
||||
# Prevent (ref T) types from being exposed to JS content so that wasm need do
|
||||
# no typechecking at the JS/wasm boundary
|
||||
# ===========================================================================
|
||||
|
||||
@depends(milestone.is_nightly, '--enable-wasm-gc')
|
||||
def default_wasm_private_reftypes(is_nightly, gc):
|
||||
if gc and is_nightly:
|
||||
return True
|
||||
|
||||
js_option('--enable-wasm-private-reftypes',
|
||||
default=default_wasm_private_reftypes,
|
||||
help='{Enable|Disable} WebAssembly private reference types')
|
||||
|
||||
set_config('WASM_PRIVATE_REFTYPES', depends_if('--enable-wasm-private-reftypes')(lambda x: True))
|
||||
set_define('WASM_PRIVATE_REFTYPES', depends_if('--enable-wasm-private-reftypes')(lambda x: True))
|
||||
|
@ -4,19 +4,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Nightly-only features
|
||||
if CONFIG['NIGHTLY_BUILD']:
|
||||
# Support the evolving reftypes proposal - anyref, funcref, null,
|
||||
# and a few other things
|
||||
DEFINES['ENABLE_WASM_REFTYPES'] = True
|
||||
# Support table of anyref, multiple tables - requires reftypes
|
||||
DEFINES['ENABLE_WASM_GENERALIZED_TABLES'] = True
|
||||
# Support the evolving gc types proposal (struct types, etc)
|
||||
DEFINES['ENABLE_WASM_GC'] = True
|
||||
# Prevent (ref T) types from being exposed to JS content so that
|
||||
# wasm need do no typechecking at the JS/wasm boundary
|
||||
DEFINES['WASM_PRIVATE_REFTYPES'] = True
|
||||
|
||||
# Some huge-mapping optimization instead of bounds checks on supported
|
||||
# platforms.
|
||||
if CONFIG['JS_CODEGEN_X64'] or CONFIG['JS_CODEGEN_ARM64']:
|
||||
|
@ -66,7 +66,3 @@ LOCAL_INCLUDES += [
|
||||
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
CXXFLAGS += ['-Wno-shadow', '-Werror=format']
|
||||
|
||||
if CONFIG['NIGHTLY_BUILD']:
|
||||
DEFINES['ENABLE_WASM_REFTYPES'] = True
|
||||
DEFINES['ENABLE_WASM_GC'] = True
|
||||
|
@ -45,10 +45,6 @@ DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
|
||||
if CONFIG['MOZ_ENABLE_WEBRENDER']:
|
||||
DEFINES['MOZ_ENABLE_WEBRENDER'] = True
|
||||
|
||||
if CONFIG['NIGHTLY_BUILD']:
|
||||
DEFINES['ENABLE_WASM_REFTYPES'] = True
|
||||
DEFINES['ENABLE_WASM_GC'] = True
|
||||
|
||||
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
||||
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user