diff --git a/js/moz.configure b/js/moz.configure index 07930e513163..5e56b8317e1f 100644 --- a/js/moz.configure +++ b/js/moz.configure @@ -475,13 +475,16 @@ set_define('ENABLE_PIPELINE_OPERATOR', enable_pipeline_operator) # Experimental support for BinAST # ============================================================== -@depends(milestone) -def enable_build_binast(milestone): - if milestone.is_nightly: - return True +@depends(milestone.is_nightly) +def default_binast(is_nightly): + return is_nightly -set_define('JS_BUILD_BINAST', enable_build_binast) -set_config('JS_BUILD_BINAST', enable_build_binast) +js_option('--enable-binast', + default=default_binast, + help="{Enable|Disable} BinAST support") + +set_config('JS_BUILD_BINAST', depends_if('--enable-binast')(lambda x: True)) +set_define('JS_BUILD_BINAST', depends_if('--enable-binast')(lambda x: True)) # Experimental support for wasm code generation with Cranelift diff --git a/js/src/frontend/moz.build b/js/src/frontend/moz.build index adf62256f158..26026388f986 100644 --- a/js/src/frontend/moz.build +++ b/js/src/frontend/moz.build @@ -76,6 +76,10 @@ if CONFIG['JS_BUILD_BINAST']: 'BinTokenReaderMultipart.cpp', ] + DIRS += [ + 'binsource' + ] + # Instrument BinAST files for fuzzing as we have a fuzzing target for BinAST. if CONFIG['FUZZING_INTERFACES'] and CONFIG['LIBFUZZER']: include('/tools/fuzzing/libfuzzer-flags.mozbuild') diff --git a/js/src/moz.build b/js/src/moz.build index 2690de939433..c1bcd33b2cc7 100755 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -409,7 +409,6 @@ else: DIRS += [ 'build', 'frontend', - 'frontend/binsource', 'gc', 'jit', 'wasm',