Bug 1577046 - Tie extra-bindgen-flags file creation to cranelift. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 27 Aug 2019 23:19:17 +0000
changeset 554063 17bb41227a5ad6e14eda7f3f3fff5b70365f9b6c
parent 554062 cd49de1d58ede9fc429ea6f221cbee95d1d8502e
child 554064 f0237adbd823a9a85ddeabf9eb0e66186d8fd0db
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1577046
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1577046 - Tie extra-bindgen-flags file creation to cranelift. r=chmanchester We only recurse into js/src/rust when jsrust is built, which it may not be in Gecko builds. But cranelift, which may be enabled either way, needs the extra-bindgen-flags file. Differential Revision: https://phabricator.services.mozilla.com/D43699
js/src/moz.build
js/src/rust/moz.build
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -42,16 +42,19 @@ for gcfile in ['devtools/rootAnalysis', 
 
 for stlfile in ['jsdate.*', 'jsnum.*']:
     with Files(stlfile):
         BUG_COMPONENT = component_stl
 
 with Files('builtin/intl/*'):
     BUG_COMPONENT = component_intl
 
+if CONFIG['ENABLE_WASM_CRANELIFT']:
+    CONFIGURE_SUBST_FILES += ['rust/extra-bindgen-flags']
+
 if not CONFIG['JS_DISABLE_SHELL']:
     DIRS += [
         'rust',
         'shell',
     ]
 
     TEST_DIRS += [
         'gdb',
--- a/js/src/rust/moz.build
+++ b/js/src/rust/moz.build
@@ -13,18 +13,16 @@ if CONFIG['ENABLE_WASM_CRANELIFT']:
         features += ['cranelift_arm32']
     elif CONFIG['JS_CODEGEN_ARM64']:
         features += ['cranelift_arm64']
     else:
         features += ['cranelift_none']
 
 RustLibrary('jsrust', features)
 
-CONFIGURE_SUBST_FILES += ['extra-bindgen-flags']
-
 if CONFIG['JS_SHARED_LIBRARY']:
     FINAL_LIBRARY = 'js'
 
 if CONFIG['OS_ARCH'] == 'Darwin':
     # The Rust standard library references libresolv on macOS, so we need to
     # link it as a workaround. See also bug 1367932.
     OS_LIBS += ['-lresolv']
 elif CONFIG['OS_ARCH'] == 'WINNT':