Bug 1297471 - Move --enable-ctypes to js/moz.configure. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 04 Oct 2016 14:57:00 +0900
changeset 343172 925cdec5f80e7e60cfa2faed8d01a7771487444f
parent 343171 32e84e78700581979f49ffa05bb15d6192509610
child 343173 732ee01f038f84648c48661b8d7a08e630a011ab
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1297471
milestone52.0a1
Bug 1297471 - Move --enable-ctypes to js/moz.configure. r=chmanchester
build/moz.configure/ffi.configure
js/ffi.configure
js/moz.configure
moz.configure
rename from build/moz.configure/ffi.configure
rename to js/ffi.configure
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -200,8 +200,39 @@ js_option('--enable-more-deterministic',
           help='Enable changes that make the shell more deterministic')
 
 @depends('--enable-more-deterministic')
 def more_deterministic(value):
     if value:
         return True
 
 set_define('JS_MORE_DETERMINISTIC', more_deterministic)
+
+
+# CTypes
+# =======================================================
+@depends(building_js, '--help')
+def ctypes_default(building_js, _):
+    return not building_js
+
+js_option('--enable-ctypes', help='Enable js-ctypes',
+          default=ctypes_default)
+
+build_ctypes = depends_if('--enable-ctypes')(lambda _: True)
+
+set_config('BUILD_CTYPES', build_ctypes)
+set_define('BUILD_CTYPES', build_ctypes)
+add_old_configure_assignment('BUILD_CTYPES', build_ctypes)
+
+@depends(build_ctypes, building_js)
+def js_has_ctypes(ctypes, js):
+    if ctypes and js:
+        return True
+
+set_config('JS_HAS_CTYPES', js_has_ctypes)
+set_define('JS_HAS_CTYPES', js_has_ctypes)
+add_old_configure_assignment('JS_HAS_CTYPES', js_has_ctypes)
+
+@depends('--enable-ctypes', '--enable-compile-environment', '--help')
+def ctypes_and_compile_environment(ctypes, compile_environment, _):
+    return ctypes and compile_environment
+
+include_when('ffi.configure', when=ctypes_and_compile_environment)
--- a/moz.configure
+++ b/moz.configure
@@ -99,45 +99,16 @@ include_when('build/moz.configure/memory
              when='--enable-compile-environment')
 include_when('build/moz.configure/headers.configure',
              when='--enable-compile-environment')
 include_when('build/moz.configure/warnings.configure',
              when='--enable-compile-environment')
 
 include(include_project_configure)
 
-@depends(building_js, '--help')
-def ctypes_default(building_js, _):
-    return not building_js
-
-js_option('--enable-ctypes', help='Enable js-ctypes',
-          default=ctypes_default)
-
-build_ctypes = depends_if('--enable-ctypes')(lambda _: True)
-
-set_config('BUILD_CTYPES', build_ctypes)
-set_define('BUILD_CTYPES', build_ctypes)
-add_old_configure_assignment('BUILD_CTYPES', build_ctypes)
-
-@depends(build_ctypes, building_js)
-def js_has_ctypes(ctypes, js):
-    if ctypes and js:
-        return True
-
-set_config('JS_HAS_CTYPES', js_has_ctypes)
-set_define('JS_HAS_CTYPES', js_has_ctypes)
-add_old_configure_assignment('JS_HAS_CTYPES', js_has_ctypes)
-
-@depends('--enable-ctypes', '--enable-compile-environment', '--help')
-def ctypes_and_compile_environment(ctypes, compile_environment, _):
-    return ctypes and compile_environment
-
-include_when('build/moz.configure/ffi.configure',
-             when=ctypes_and_compile_environment)
-
 @dependable
 @imports(_from='mozbuild.backend', _import='backends')
 def build_backends_choices():
     return tuple(backends)
 
 
 @deprecated_option('--enable-build-backend', nargs='+',
                    choices=build_backends_choices)