Bug 1522436 - Enable BigInt compilation by default r=jandem,terpri,froydnj
authorAndy Wingo <wingo@igalia.com>
Wed, 06 Feb 2019 13:41:56 +0000
changeset 457581 4b74d76e55a819852c8fa925efd25c57fdf35c9d
parent 457580 de00632953fa7a73cdcaac72f130f32179ae5390
child 457582 96d77e9c3f2985c2b702c0910e0da686bee54105
push id35516
push userrmaries@mozilla.com
push dateFri, 08 Feb 2019 04:23:26 +0000
treeherdermozilla-central@d599d1a73a3a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem, terpri, froydnj
bugs1522436
milestone67.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 1522436 - Enable BigInt compilation by default r=jandem,terpri,froydnj Differential Revision: https://phabricator.services.mozilla.com/D17487
config/system-headers.mozbuild
js/moz.configure
js/src/build.rs
js/src/build/moz.build
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -1333,20 +1333,15 @@ if CONFIG['MOZ_SYSTEM_ICU']:
         'unicode/unorm.h',
         'unicode/unum.h',
         'unicode/upluralrules.h',
         'unicode/ureldatefmt.h',
         'unicode/ustring.h',
         'unicode/utypes.h',
     ]
 
-if CONFIG['ENABLE_BIGINT']:
-    system_headers += [
-        'gmp.h'
-    ]
-
 if CONFIG['MOZ_WAYLAND']:
     system_headers += [
         'xkbcommon/xkbcommon.h',
         'wayland-client.h',
         'wayland-egl.h',
         'wayland-util.h',
     ]
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -104,34 +104,31 @@ def disable_export_js(value):
     else:
         suggestion = '--enable-export-js'
 
     die('Setting %s is deprecated, use %s instead.',
         value.format('DISABLE_EXPORT_JS'), suggestion)
 
 # Experimental BigInt support
 # =======================================================
-js_option('--enable-bigint',
-          default=False,
-          help='Enable BigInt')
+js_option('--disable-bigint',
+          help='{Enable|Disable} BigInt')
 
-@depends('--enable-bigint')
+@depends('--disable-bigint')
 def enable_bigint(value):
     if value:
         return True
 
 set_config('ENABLE_BIGINT', enable_bigint)
 set_define('ENABLE_BIGINT', enable_bigint)
 
 # JIT support
 # =======================================================
-@depends(target, '--enable-bigint')
-def ion_default(target, enable_bigint):
-    if enable_bigint:
-        return False
+@depends(target)
+def ion_default(target):
     if target.cpu in ('x86', 'x86_64', 'arm', 'aarch64', 'mips32', 'mips64'):
         return True
     return False
 
 js_option('--enable-ion',
           default=ion_default,
           help='{Enable|Disable} use of the IonMonkey JIT')
 
--- a/js/src/build.rs
+++ b/js/src/build.rs
@@ -21,19 +21,21 @@ fn main() {
     // Cargo directory. In particular, both profiles (dev or release) set panic=abort,
     // which defines an exception handling personality that will trigger calls to abort().
     // The Rust bindings package wants to be able to unwind at runtime, so override the
     // profile's value here.
     env::set_var("RUSTFLAGS", "-C panic=unwind");
 
     env::set_current_dir(&js_src).unwrap();
 
-    let variant = format!("{}{}",
-                          if cfg!(feature = "bigint") { "bigint" } else { "plain" },
-                          if cfg!(feature = "debugmozjs") { "debug" } else { "" });
+    let variant = if cfg!(feature = "debugmozjs") {
+        "plaindebug"
+    } else {
+        "plain"
+    };
 
     let python = env::var("PYTHON").unwrap_or("python2.7".into());
     let mut cmd = Command::new(&python);
     cmd.args(&["./devtools/automation/autospider.py",
                // Only build SpiderMonkey, don't run all the tests.
                "--build-only",
                // Disable Mozilla's jemalloc; Rust has its own jemalloc that we
                // can swap in instead and everything using a single malloc is
@@ -59,20 +61,16 @@ fn main() {
     println!("cargo:rustc-link-search=native={}/js/src", out_dir);
     println!("cargo:rustc-link-lib=static=js_static");
 
     maybe_add_spidermonkey_rust_lib();
 
     println!("cargo:rustc-link-search=native={}/dist/bin", out_dir);
     println!("cargo:rustc-link-lib=nspr4");
 
-    if cfg!(feature = "bigint") {
-        println!("cargo:rustc-link-lib=gmp");
-    }
-
     if target.contains("windows") {
         println!("cargo:rustc-link-lib=winmm");
         if target.contains("gnu") {
             println!("cargo:rustc-link-lib=stdc++");
         }
     } else {
         println!("cargo:rustc-link-lib=stdc++");
     }
--- a/js/src/build/moz.build
+++ b/js/src/build/moz.build
@@ -42,21 +42,16 @@ else:
 FORCE_STATIC_LIB = True
 STATIC_LIBRARY_NAME = 'js_static'
 
 if CONFIG['ENABLE_INTL_API']:
     USE_LIBS += [
         'icu',
     ]
 
-if CONFIG['ENABLE_BIGINT']:
-    OS_LIBS += [
-        'gmp',
-    ]
-
 USE_LIBS += [
     'nspr',
     'zlib',
 ]
 
 if CONFIG['OS_ARCH'] not in ('WINNT', 'HP-UX'):
     OS_LIBS += [
         'm',