2588238
diff -Nrup mozilla-OLD/moz.configure mozilla/moz.configure
2588238
--- mozilla-OLD/moz.configure	2023-02-25 21:34:57.000000000 +0300
2588238
+++ mozilla/moz.configure	2023-02-27 13:37:14.148043308 +0300
2588238
@@ -256,8 +256,76 @@ set_config('IMPORT_LIB_SUFFIX', library_
2588238
 set_define('MOZ_DLL_SUFFIX', depends(library_name_info.dll.suffix)(lambda s: '"%s"' % s))
2588238
 
2588238
 # Depends on host_library_name_info, so needs to go here.
2588238
+# Servo integration
2588238
+# ==============================================================
2588238
+option('--enable-stylo', nargs='?', choices=('build', 'only'),
2588238
+       help='Include Stylo in the build.  "build" means to disable Stylo at ' +
2588238
+            'runtime, and "only" means to exclude the old style system from ' +
2588238
+            'the build.')
2588238
+
2588238
+@depends('--enable-stylo', '--help')
2588238
+def stylo_config(value, _):
2588238
+    build_stylo = None
2588238
+    enable_stylo = None
2588238
+    old_style = True
2588238
+
2588238
+    # If nothing is specified, default to building and enabling Stylo,
2588238
+    # and building the old style system.
2588238
+    if value.origin == 'default':
2588238
+        pass
2588238
+    elif len(value) and value[0] == 'build':
2588238
+        # Build but disable by request.
2588238
+        build_stylo = True
2588238
+    elif len(value) and value[0] == 'only':
2588238
+        # Disable the old style system.
2588238
+        build_stylo = True
2588238
+        enable_stylo = True
2588238
+        old_style = None
2588238
+    elif bool(value):
2588238
+        # Build and enable.
2588238
+        build_stylo = True
2588238
+        enable_stylo = True
2588238
+
2588238
+    return namespace(
2588238
+        build = build_stylo,
2588238
+        enable = enable_stylo,
2588238
+        old_style = old_style,
2588238
+    )
2588238
+
2588238
+option('--disable-stylo-build-bindgen',
2588238
+       help='Disable build-time bindgen for Stylo')
2588238
+
2588238
+@depends(stylo_config, '--enable-stylo-build-bindgen', '--enable-compile-environment')
2588238
+def building_stylo_bindgen(stylo_config, bindgen_enabled, compile_environment):
2588238
+    if not compile_environment:
2588238
+        return False
2588238
+    if not bindgen_enabled:
2588238
+        return False
2588238
+    return stylo_config.build
2588238
+
2588238
+    set_config('MOZ_STYLO_BINDGEN', depends_if('--enable-stylo-build-bindgen')(lambda _: True))
2588238
+
2588238
 include('build/moz.configure/bindgen.configure',
2588238
-        when='--enable-compile-environment')
2588238
+        when=building_stylo_bindgen)
2588238
+
2588238
+set_config('MOZ_STYLO', stylo_config.build)
2588238
+set_define('MOZ_STYLO', stylo_config.build)
2588238
+set_config('MOZ_STYLO_ENABLE', stylo_config.enable)
2588238
+set_define('MOZ_STYLO_ENABLE', stylo_config.enable)
2588238
+set_config('MOZ_OLD_STYLE', stylo_config.old_style)
2588238
+set_define('MOZ_OLD_STYLE', stylo_config.old_style)
2588238
+
2588238
+option('--with-servo', env='SERVO_TARGET_DIR', nargs=1,
2588238
+       help='Absolute path of the target directory where libgeckoservo can '
2588238
+            'be found. This is generally servo_src_dir/target/release.')
2588238
+
2588238
+@depends_if('--with-servo')
2588238
+def servo_target_dir(value):
2588238
+    return value[0]
2588238
+
2588238
+set_config('SERVO_TARGET_DIR', servo_target_dir)
2588238
+
2588238
+
2588238
 include(include_project_configure)
2588238
 
2588238
 @depends('--help')
2588238
diff -Nrup mozilla-OLD/toolkit/moz.configure mozilla/toolkit/moz.configure
2588238
--- mozilla-OLD/toolkit/moz.configure	2023-02-27 13:23:44.000000000 +0300
2588238
+++ mozilla/toolkit/moz.configure	2023-02-27 13:34:15.868323967 +0300
2588238
@@ -669,71 +669,6 @@ simple_keyfile('Adjust SDK')
2588238
 
2588238
 id_and_secret_keyfile('Leanplum SDK')
2588238
 
2588238
-# Servo integration
2588238
-# ==============================================================
2588238
-option('--enable-stylo', nargs='?', choices=('build', 'only'),
2588238
-       help='Include Stylo in the build.  "build" means to disable Stylo at ' +
2588238
-            'runtime, and "only" means to exclude the old style system from ' +
2588238
-            'the build.')
2588238
-
2588238
-@depends('--enable-stylo', '--help')
2588238
-def stylo_config(value, _):
2588238
-    build_stylo = None
2588238
-    enable_stylo = None
2588238
-    old_style = True
2588238
-
2588238
-    # If nothing is specified, default to building and enabling Stylo,
2588238
-    # and building the old style system.
2588238
-    if value.origin == 'default':
2588238
-        pass
2588238
-    elif len(value) and value[0] == 'build':
2588238
-        # Build but disable by request.
2588238
-        build_stylo = True
2588238
-    elif len(value) and value[0] == 'only':
2588238
-        # Disable the old style system.
2588238
-        build_stylo = True
2588238
-        enable_stylo = True
2588238
-        old_style = None
2588238
-    elif bool(value):
2588238
-        # Build and enable.
2588238
-        build_stylo = True
2588238
-        enable_stylo = True
2588238
-
2588238
-    return namespace(
2588238
-        build = build_stylo,
2588238
-        enable = enable_stylo,
2588238
-        old_style = old_style,
2588238
-    )
2588238
-
2588238
-option('--disable-stylo-build-bindgen',
2588238
-       help='Disable build-time bindgen for Stylo')
2588238
-
2588238
-@depends(stylo_config, '--enable-stylo-build-bindgen', '--enable-compile-environment')
2588238
-def building_stylo_bindgen(stylo_config, bindgen_enabled, compile_environment):
2588238
-    if not compile_environment:
2588238
-        return False
2588238
-    if not bindgen_enabled:
2588238
-        return False
2588238
-    return stylo_config.build
2588238
-
2588238
-    set_config('MOZ_STYLO_BINDGEN', depends_if('--enable-stylo-build-bindgen')(lambda _: True))
2588238
-
2588238
-set_config('MOZ_STYLO', stylo_config.build)
2588238
-set_define('MOZ_STYLO', stylo_config.build)
2588238
-set_config('MOZ_STYLO_ENABLE', stylo_config.enable)
2588238
-set_define('MOZ_STYLO_ENABLE', stylo_config.enable)
2588238
-set_config('MOZ_OLD_STYLE', stylo_config.old_style)
2588238
-set_define('MOZ_OLD_STYLE', stylo_config.old_style)
2588238
-
2588238
-option('--with-servo', env='SERVO_TARGET_DIR', nargs=1,
2588238
-       help='Absolute path of the target directory where libgeckoservo can '
2588238
-            'be found. This is generally servo_src_dir/target/release.')
2588238
-
2588238
-@depends_if('--with-servo')
2588238
-def servo_target_dir(value):
2588238
-    return value[0]
2588238
-
2588238
-set_config('SERVO_TARGET_DIR', servo_target_dir)
2588238
 
2588238
 # WebRender integration
2588238
 option('--enable-webrender', nargs='?', choices=('build',),