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