Bug 1573098: Build Spidermonkey Rust's library unconditionally; r=froydnj
authorBenjamin Bouvier <benj@benj.me>
Thu, 15 Aug 2019 15:06:07 +0000
changeset 488477 61d898c2b4445f0a10c6d8b618e0dc13519642ce
parent 488476 15048bfaf5ef435586ad0b5591f4c828c6b4d857
child 488478 90203b8c145dfc2c1672e0d59f1a2d07e4ee8c2a
push id36444
push userccoroiu@mozilla.com
push dateFri, 16 Aug 2019 16:24:18 +0000
treeherdermozilla-central@8a9e9189cd98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1573098
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 1573098: Build Spidermonkey Rust's library unconditionally; r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D41992
js/src/moz.build
js/src/rust/moz.build
js/src/wasm/moz.build
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -401,16 +401,17 @@ if CONFIG['MOZ_VTUNE']:
     SOURCES['vtune/ittnotify_static.c'].flags += ['-Wno-varargs', '-Wno-unknown-pragmas']
 
 DIRS += [
     'build',
     'debugger',
     'frontend',
     'gc',
     'jit',
+    'rust',
     'wasm',
     'zydis',
 ]
 
 FINAL_LIBRARY = 'js'
 
 # Prepare self-hosted JS code for embedding
 GENERATED_FILES += [('selfhosted.out.h', 'selfhosted.js')]
--- a/js/src/rust/moz.build
+++ b/js/src/rust/moz.build
@@ -1,24 +1,25 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
 features = []
 
-if CONFIG['JS_CODEGEN_X64'] or CONFIG['JS_CODEGEN_X86']:
-    features += ['cranelift_x86']
-elif CONFIG['JS_CODEGEN_ARM']:
-    features += ['cranelift_arm32']
-elif CONFIG['JS_CODEGEN_ARM64']:
-    features += ['cranelift_arm64']
-else:
-    features += ['cranelift_none']
+if CONFIG['ENABLE_WASM_CRANELIFT']:
+    if CONFIG['JS_CODEGEN_X64'] or CONFIG['JS_CODEGEN_X86']:
+        features += ['cranelift_x86']
+    elif CONFIG['JS_CODEGEN_ARM']:
+        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'
 
--- a/js/src/wasm/moz.build
+++ b/js/src/wasm/moz.build
@@ -11,17 +11,16 @@ LOCAL_INCLUDES += [
     '!..',
     '..'
 ]
 
 include('../js-config.mozbuild')
 include('../js-cxxflags.mozbuild')
 
 if CONFIG['ENABLE_WASM_CRANELIFT']:
-    DIRS += ['../rust']
     UNIFIED_SOURCES += [
         'WasmCraneliftCompile.cpp',
     ]
 
 UNIFIED_SOURCES += [
     'AsmJS.cpp',
     'WasmBaselineCompile.cpp',
     'WasmBuiltins.cpp',