Bug 1447611: Remove --enable-stylo and --enable-stylo-build-bindgen. r=froydnj
☠☠ backed out by 1fadea75f363 ☠ ☠
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 21 Mar 2018 12:45:06 +0100
changeset 1460155 bb84ac6e14689d1308dced13bab1b71f3f042713
parent 1460154 60e8b5bd8c6b28518d847cb3dedcc9df94647de7
child 1460156 86c9fed44da23014876fdd6ec915f596d3b3ac23
push id260095
push userecoal95@gmail.com
push dateWed, 21 Mar 2018 17:01:50 +0000
treeherdertry@0c24a9ae2a68 [default view] [failures only]
reviewersfroydnj
bugs1447611
milestone61.0a1
Bug 1447611: Remove --enable-stylo and --enable-stylo-build-bindgen. r=froydnj Will remove the prefs and stuff in a followup. MozReview-Commit-ID: HVyfbHOEQYI
layout/style/ServoBindings.toml
layout/tools/reftest/manifest.jsm
modules/libpref/init/all.js
python/mozbuild/mozbuild/mozinfo.py
testing/awsy/mach_commands.py
testing/mozharness/scripts/desktop_unittest.py
testing/mozharness/scripts/web_platform_tests.py
toolkit/library/rust/gkrust-features.mozbuild
toolkit/modules/AppConstants.jsm
toolkit/moz.configure
toolkit/mozapps/installer/packager.mk
toolkit/mozapps/installer/upload-files.mk
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -1,13 +1,13 @@
 [build]
 args = [
     "-x", "c++", "-std=c++14", "-fno-sized-deallocation",
     "-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1",
-    "-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN", "-DMOZ_STYLO"
+    "-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN"
 ]
 "family=unix" = ["-DOS_POSIX=1"]
 "os=solaris" = ["-DOS_SOLARIS=1"]
 "os=dragonfly" = ["-DOS_BSD=1", "-DOS_DRAGONFLY=1"]
 "os=freebsd" = ["-DOS_BSD=1", "-DOS_FREEBSD=1"]
 "os=netbsd" = ["-DOS_BSD=1", "-DOS_NETBSD=1"]
 "os=openbsd" = ["-DOS_BSD=1", "-DOS_OPENBSD=1"]
 "os=macos" = [
--- a/layout/tools/reftest/manifest.jsm
+++ b/layout/tools/reftest/manifest.jsm
@@ -477,31 +477,18 @@ function BuildConditionSandbox(aURL) {
 #else
     sandbox.webrtc = false;
 #endif
 
 let retainedDisplayListsEnabled = prefs.getBoolPref("layout.display-list.retain", false);
 sandbox.retainedDisplayLists = retainedDisplayListsEnabled && !g.compareRetainedDisplayLists;
 sandbox.compareRetainedDisplayLists = g.compareRetainedDisplayLists;
 
-#ifdef MOZ_STYLO
-    let styloEnabled = false;
-    // Perhaps a bit redundant in places, but this is easier to compare with the
-    // the real check in `nsLayoutUtils.cpp` to ensure they test the same way.
-    if (env.get("STYLO_FORCE_ENABLED")) {
-        styloEnabled = true;
-    } else if (env.get("STYLO_FORCE_DISABLED")) {
-        styloEnabled = false;
-    } else {
-        styloEnabled = prefs.getBoolPref("layout.css.servo.enabled", false);
-    }
-    sandbox.stylo = styloEnabled;
-#else
-    sandbox.stylo = false;
-#endif
+// TODO(emilio): Remove the remaining reftest expectations that mention stylo.
+sandbox.stylo = true;
 
     sandbox.skiaPdf = false;
 
 #ifdef RELEASE_OR_BETA
     sandbox.release_or_beta = true;
 #else
     sandbox.release_or_beta = false;
 #endif
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5915,28 +5915,22 @@ pref("osfile.reset_worker_delay", 30000)
 pref("dom.webkitBlink.dirPicker.enabled", true);
 pref("dom.webkitBlink.filesystem.enabled", true);
 #endif
 
 pref("media.block-autoplay-until-in-foreground", true);
 
 // Is Stylo CSS support built and enabled?
 // Only define these prefs if Stylo support is actually built in.
-#ifdef MOZ_STYLO
-#ifdef MOZ_STYLO_ENABLE
 pref("layout.css.servo.enabled", true);
-#else
-pref("layout.css.servo.enabled", false);
-#endif
 // Whether Stylo is enabled for chrome document?
 // If Stylo is not enabled, this pref doesn't take any effect.
 // Note that this pref is only read once when requested. Changing it
 // at runtime may have no effect.
 pref("layout.css.servo.chrome.enabled", true);
-#endif
 
 // TODO: Bug 1324406: Treat 'data:' documents as unique, opaque origins
 // If true, data: URIs will be treated as unique opaque origins, hence will use
 // a NullPrincipal as the security context.
 // Otherwise it will inherit the origin from parent node, this is the legacy
 // behavior of Firefox.
 pref("security.data_uri.unique_opaque_origin", true);
 
--- a/python/mozbuild/mozbuild/mozinfo.py
+++ b/python/mozbuild/mozbuild/mozinfo.py
@@ -78,17 +78,18 @@ def build_dict(config, env=os.environ):
     d['nightly_build'] = substs.get('NIGHTLY_BUILD') == '1'
     d['release_or_beta'] = substs.get('RELEASE_OR_BETA') == '1'
     d['devedition'] = substs.get('MOZ_DEV_EDITION') == '1'
     d['pgo'] = substs.get('MOZ_PGO') == '1'
     d['crashreporter'] = bool(substs.get('MOZ_CRASHREPORTER'))
     d['datareporting'] = bool(substs.get('MOZ_DATA_REPORTING'))
     d['healthreport'] = substs.get('MOZ_SERVICES_HEALTHREPORT') == '1'
     d['sync'] = substs.get('MOZ_SERVICES_SYNC') == '1'
-    d['stylo'] = substs.get('MOZ_STYLO_ENABLE') == '1'
+    # FIXME(emilio): We need to update a lot of WPT expectations before removing this.
+    d['stylo'] = True
     d['asan'] = substs.get('MOZ_ASAN') == '1'
     d['tsan'] = substs.get('MOZ_TSAN') == '1'
     d['ubsan'] = substs.get('MOZ_UBSAN') == '1'
     d['telemetry'] = substs.get('MOZ_TELEMETRY_REPORTING') == '1'
     d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1"
     d['bin_suffix'] = substs.get('BIN_SUFFIX', '')
     d['addon_signing'] = substs.get('MOZ_ADDON_SIGNING') == '1'
     d['require_signing'] = substs.get('MOZ_REQUIRE_SIGNING') == '1'
--- a/testing/awsy/mach_commands.py
+++ b/testing/awsy/mach_commands.py
@@ -64,19 +64,16 @@ class MachCommands(MachCommandBase):
             kwargs['perTabPause'] = 1
             kwargs['settleWaitTime'] = 1
 
         if 'single_stylo_traversal' in kwargs and kwargs['single_stylo_traversal']:
             os.environ['STYLO_THREADS'] = '1'
         else:
             os.environ['STYLO_THREADS'] = '4'
 
-        if 'enable_stylo' in kwargs and kwargs['enable_stylo']:
-            os.environ['STYLO_FORCE_ENABLED'] = '1'
-
         if 'enable_webrender' in kwargs and kwargs['enable_webrender']:
             os.environ['MOZ_WEBRENDER'] = '1'
             os.environ['MOZ_ACCELERATED'] = '1'
 
         runtime_testvars = {}
         for arg in ('webRootDir', 'pageManifest', 'resultsDir', 'entities', 'iterations',
                     'perTabPause', 'settleWaitTime', 'maxTabs', 'dmd'):
             if kwargs[arg]:
@@ -200,19 +197,16 @@ class MachCommands(MachCommandBase):
     @CommandArgument('--per-tab-pause', group='AWSY', action='store', type=int,
                      dest='perTabPause',
                      help='Seconds to wait in between opening tabs. '
                      'Defaults to %s.' % PER_TAB_PAUSE)
     @CommandArgument('--settle-wait-time', group='AWSY', action='store', type=int,
                      dest='settleWaitTime',
                      help='Seconds to wait for things to settled down. '
                      'Defaults to %s.' % SETTLE_WAIT_TIME)
-    @CommandArgument('--enable-stylo', group='AWSY', action='store_true',
-                     dest='enable_stylo', default=False,
-                     help='Enable Stylo.')
     @CommandArgument('--single-stylo-traversal', group='AWSY', action='store_true',
                      dest='single_stylo_traversal', default=False,
                      help='Set STYLO_THREADS=1.')
     @CommandArgument('--enable-webrender', group='AWSY', action='store_true',
                      dest='enable_webrender', default=False,
                      help='Enable WebRender.')
     @CommandArgument('--dmd', group='AWSY', action='store_true',
                      dest='dmd', default=False,
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -158,22 +158,16 @@ class DesktopUnittest(TestingMixin, Merc
                     "the GL compositor."}
          ],
         [["--single-stylo-traversal"], {
             "action": "store_true",
             "dest": "single_stylo_traversal",
             "default": False,
             "help": "Forcibly enable single thread traversal in Stylo with STYLO_THREADS=1"}
          ],
-        [["--enable-stylo"], {
-            "action": "store_true",
-            "dest": "enable_stylo",
-            "default": False,
-            "help": "Run tests with Stylo enabled"}
-         ],
         [["--enable-webrender"], {
             "action": "store_true",
             "dest": "enable_webrender",
             "default": False,
             "help": "Tries to enable the WebRender compositor."}
          ],
     ] + copy.deepcopy(testing_config_options) + \
         copy.deepcopy(blobupload_config_options) + \
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -83,28 +83,16 @@ class WebPlatformTest(TestingMixin, Merc
             "help": "Specify headless fake screen height (default: 1200)."}
          ],
         [["--single-stylo-traversal"], {
             "action": "store_true",
             "dest": "single_stylo_traversal",
             "default": False,
             "help": "Forcibly enable single thread traversal in Stylo with STYLO_THREADS=1"}
          ],
-        [["--enable-stylo"], {
-            "action": "store_true",
-            "dest": "enable_stylo",
-            "default": False,
-            "help": "Run tests with Stylo enabled"}
-         ],
-        [["--disable-stylo"], {
-            "action": "store_true",
-            "dest": "disable_stylo",
-            "default": False,
-            "help": "Run tests with Stylo disabled"}
-         ],
     ] + copy.deepcopy(testing_config_options) + \
         copy.deepcopy(blobupload_config_options) + \
         copy.deepcopy(code_coverage_config_options)
 
     def __init__(self, require_config_file=True):
         super(WebPlatformTest, self).__init__(
             config_options=self.config_options,
             all_actions=[
@@ -317,30 +305,21 @@ class WebPlatformTest(TestingMixin, Merc
         if self.config['enable_webrender']:
             env['MOZ_WEBRENDER'] = '1'
             env['MOZ_ACCELERATED'] = '1'
         if self.config['headless']:
             env['MOZ_HEADLESS'] = '1'
             env['MOZ_HEADLESS_WIDTH'] = self.config['headless_width']
             env['MOZ_HEADLESS_HEIGHT'] = self.config['headless_height']
 
-        if self.config['disable_stylo']:
-            if self.config['single_stylo_traversal']:
-                self.fatal("--disable-stylo conflicts with --single-stylo-traversal")
-            if self.config['enable_stylo']:
-                self.fatal("--disable-stylo conflicts with --enable-stylo")
-
         if self.config['single_stylo_traversal']:
             env['STYLO_THREADS'] = '1'
         else:
             env['STYLO_THREADS'] = '4'
 
-        if self.config['enable_stylo']:
-            env['STYLO_FORCE_ENABLED'] = '1'
-
         env = self.query_env(partial_env=env, log_level=INFO)
 
         start_time = datetime.now()
         max_verify_time = timedelta(minutes=60)
         max_verify_tests = 10
         verified_tests = 0
 
         if self.config.get("verify") is True:
--- a/toolkit/library/rust/gkrust-features.mozbuild
+++ b/toolkit/library/rust/gkrust-features.mozbuild
@@ -1,23 +1,18 @@
 # -*- Mode: python; c-basic-offset: 4; 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/.
 
-gkrust_features = []
-if CONFIG['MOZ_STYLO']:
-    gkrust_features += ['servo']
+gkrust_features = ['servo', 'bindgen']
 
-    if CONFIG['MOZ_STYLO_BINDGEN']:
-        gkrust_features += ['bindgen']
-
-    if CONFIG['MOZ_DEBUG']:
-        gkrust_features += ['gecko_debug']
+if CONFIG['MOZ_DEBUG']:
+    gkrust_features += ['gecko_debug']
 
 if CONFIG['MOZ_BUILD_WEBRENDER']:
     gkrust_features += ['quantum_render']
 
 if CONFIG['MOZ_PULSEAUDIO']:
     gkrust_features += ['cubeb_pulse_rust']
 
 if CONFIG['MOZ_RUST_SIMD']:
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -329,16 +329,10 @@ this.AppConstants = Object.freeze({
 
   HAVE_SHELL_SERVICE:
 #ifdef HAVE_SHELL_SERVICE
     true,
 #else
     false,
 #endif
 
-  MOZ_STYLO:
-#ifdef MOZ_STYLO
-    true,
-#else
-    false,
-#endif
-
+  MOZ_STYLO: true,
 });
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -545,57 +545,16 @@ simple_keyfile('Google API')
 id_and_secret_keyfile('Bing API')
 
 simple_keyfile('Adjust SDK')
 
 id_and_secret_keyfile('Leanplum SDK')
 
 simple_keyfile('Pocket API')
 
-# Servo integration
-# ==============================================================
-option('--enable-stylo', nargs='?', choices=('build',),
-       help='Include Stylo in the build.  "build" means to disable Stylo at ' +
-            'runtime.')
-
-@depends('--enable-stylo', '--help')
-def stylo_config(value, _):
-    # If nothing is specified, default to building and enabling Stylo,
-    # and not building the old style system.
-    build_stylo = True
-    enable_stylo = True
-    old_style = None
-
-    if len(value) and value[0] == 'build':
-        # Build but disable by request.
-        enable_stylo = None
-        old_style = True
-    elif value.origin != 'default' and not bool(value):
-        # Disable stylo entirely.
-        old_style = True
-        build_stylo = None
-        enable_stylo = None
-
-    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('--enable-stylo-build-bindgen', '--enable-compile-environment')
-def building_stylo_bindgen(bindgen_enabled, compile_environment):
-    if not compile_environment:
-        return False
-    if not bindgen_enabled:
-        return False
-    return True
-
 # We support setting up the appropriate options for Stylo's build-time
 # bindings generation via setting LLVM_CONFIG or by providing explicit
 # configure options.  The Windows installer of LLVM/Clang doesn't provide
 # llvm-config, so we need both methods to support all of our tier-1
 # platforms.
 @depends(host)
 @imports('which')
 @imports('os')
@@ -635,171 +594,161 @@ def llvm_config_paths(host):
                                         os.path.expanduser(os.path.join('~', '.mozbuild')))
     bootstrap_llvm_config = os.path.join(mozbuild_state_dir, 'clang', 'bin', 'llvm-config')
 
     llvm_config_progs.append(bootstrap_llvm_config)
 
     return llvm_config_progs
 
 llvm_config = check_prog('LLVM_CONFIG', llvm_config_paths,
-                         when=building_stylo_bindgen,
                          what='llvm-config', allow_missing=True)
 
-with only_when(building_stylo_bindgen):
-    option('--with-libclang-path', nargs=1,
-           help='Absolute path to a directory containing Clang/LLVM libraries for Stylo (version 3.9.x or above)')
-    option('--with-clang-path', nargs=1,
-           help='Absolute path to a Clang binary for Stylo bindgen (version 3.9.x or above)')
-
-    def invoke_llvm_config(llvm_config, *options):
-        '''Invoke llvm_config with the given options and return the first line of
-        output.'''
-        lines = check_cmd_output(llvm_config, *options).splitlines()
-        return lines[0]
+option('--with-libclang-path', nargs=1,
+       help='Absolute path to a directory containing Clang/LLVM libraries for Stylo (version 3.9.x or above)')
+option('--with-clang-path', nargs=1,
+       help='Absolute path to a Clang binary for Stylo bindgen (version 3.9.x or above)')
 
-    @imports(_from='textwrap', _import='dedent')
-    def check_minimum_llvm_config_version(llvm_config):
-        version = Version(invoke_llvm_config(llvm_config, '--version'))
-        min_version = Version('3.9.0')
-        if version < min_version:
-            die(dedent('''\
-            llvm installation {} is incompatible with Stylo bindgen.
+def invoke_llvm_config(llvm_config, *options):
+    '''Invoke llvm_config with the given options and return the first line of
+    output.'''
+    lines = check_cmd_output(llvm_config, *options).splitlines()
+    return lines[0]
 
-            To compile Stylo, please install version {} or greater of
-            Clang + LLVM and ensure that the 'llvm-config' from that
-            installation is first on your path.
-
-            You can verify this by typing 'llvm-config --version'.
-            '''.format(version, min_version)))
+@imports(_from='textwrap', _import='dedent')
+def check_minimum_llvm_config_version(llvm_config):
+    version = Version(invoke_llvm_config(llvm_config, '--version'))
+    min_version = Version('3.9.0')
+    if version < min_version:
+        die(dedent('''\
+        llvm installation {} is incompatible with Stylo bindgen.
 
-    @depends(llvm_config, '--with-libclang-path', '--with-clang-path',
-             host_library_name_info, host)
-    @imports('os.path')
-    @imports('glob')
-    @imports(_from='textwrap', _import='dedent')
-    def bindgen_config_paths(llvm_config, libclang_path, clang_path,
-                             library_name_info, host):
-        def search_for_libclang(path):
-            # Try to ensure that the clang shared library that bindgen is going
-            # to look for is actually present.  The files that we search for
-            # mirror the logic in clang-sys/build.rs.
-            libclang_choices = []
-            if host.os == 'WINNT':
-                libclang_choices.append('libclang.dll')
-            libclang_choices.append('%sclang%s' % (library_name_info.dll.prefix,
-                                                   library_name_info.dll.suffix))
-            if host.kernel == 'Linux':
-                libclang_choices.append('libclang.so.1')
+        To compile Stylo, please install version {} or greater of
+        Clang + LLVM and ensure that the 'llvm-config' from that
+        installation is first on your path.
+
+        You can verify this by typing 'llvm-config --version'.
+        '''.format(version, min_version)))
 
-            if host.os == 'OpenBSD':
-                libclang_choices = glob.glob(path + '/libclang.so.*.*')
-
-            # At least one of the choices must be found.
-            for choice in libclang_choices:
-                libclang = os.path.join(path, choice)
-                if os.path.exists(libclang):
-                    return (True, None)
-            else:
-                return (False, list(set(libclang_choices)))
+@depends(llvm_config, '--with-libclang-path', '--with-clang-path',
+         host_library_name_info, host)
+@imports('os.path')
+@imports('glob')
+@imports(_from='textwrap', _import='dedent')
+def bindgen_config_paths(llvm_config, libclang_path, clang_path,
+                         library_name_info, host):
+    def search_for_libclang(path):
+        # Try to ensure that the clang shared library that bindgen is going
+        # to look for is actually present.  The files that we search for
+        # mirror the logic in clang-sys/build.rs.
+        libclang_choices = []
+        if host.os == 'WINNT':
+            libclang_choices.append('libclang.dll')
+        libclang_choices.append('%sclang%s' % (library_name_info.dll.prefix,
+                                               library_name_info.dll.suffix))
+        if host.kernel == 'Linux':
+            libclang_choices.append('libclang.so.1')
 
-        if not libclang_path and not clang_path:
-            # We must have LLVM_CONFIG in this case.
-            if not llvm_config:
-                die(dedent('''\
-                Could not find LLVM/Clang installation for compiling stylo build-time
-                bindgen.  Please specify the 'LLVM_CONFIG' environment variable
-                (recommended), pass the '--with-libclang-path' and '--with-clang-path'
-                options to configure, or put 'llvm-config' in your PATH.  Altering your
-                PATH may expose 'clang' as well, potentially altering your compiler,
-                which may not be what you intended.'''))
+        if host.os == 'OpenBSD':
+            libclang_choices = glob.glob(path + '/libclang.so.*.*')
+
+        # At least one of the choices must be found.
+        for choice in libclang_choices:
+            libclang = os.path.join(path, choice)
+            if os.path.exists(libclang):
+                return (True, None)
+        else:
+            return (False, list(set(libclang_choices)))
 
-            check_minimum_llvm_config_version(llvm_config)
-            libclang_arg = '--bindir' if host.os == 'WINNT' else '--libdir'
-            libclang_path = invoke_llvm_config(llvm_config, libclang_arg)
-            clang_path = os.path.join(invoke_llvm_config(llvm_config, '--bindir'),
-                                      'clang')
-            libclang_path = normsep(libclang_path)
-            clang_path = normsep(clang_path)
-
-            # Debian-based distros, at least, can have llvm-config installed
-            # but not have other packages installed.  Since the user is trying
-            # to use their system packages, we can't be more specific about what
-            # they need.
-            clang_resolved = find_program(clang_path)
-            if not clang_resolved:
-                die(dedent('''\
-                The file {} returned by `llvm-config {}` does not exist.
-                clang is required to build Stylo.  Please install the necessary packages,
-                run `mach bootstrap`, or add --disable-stylo to your mozconfig.
-                '''.format(clang_path, '--bindir')))
+    if not libclang_path and not clang_path:
+        # We must have LLVM_CONFIG in this case.
+        if not llvm_config:
+            die(dedent('''\
+            Could not find LLVM/Clang installation for compiling stylo build-time
+            bindgen.  Please specify the 'LLVM_CONFIG' environment variable
+            (recommended), pass the '--with-libclang-path' and '--with-clang-path'
+            options to configure, or put 'llvm-config' in your PATH.  Altering your
+            PATH may expose 'clang' as well, potentially altering your compiler,
+            which may not be what you intended.'''))
 
-            if not os.path.exists(libclang_path):
-                die(dedent('''\
-                The directory {} returned by `llvm-config {}` does not exist.
-                clang is required to build Stylo.  Please install the necessary packages,
-                run `mach bootstrap`, or add --disable-stylo to your mozconfig.
-                '''.format(libclang_path, libclang_arg)))
-
-            (found, searched) = search_for_libclang(libclang_path)
-            if not found:
-                die(dedent('''\
-                Could not find the clang shared library in the path {}
-                returned by `llvm-config {}` (searched for files {}).
-                clang is required to build Stylo.  Please install the necessary packages,
-                run `mach bootstrap`, or add --disable-stylo to your mozconfig.
-                '''.format(libclang_path, libclang_arg, searched)))
+        check_minimum_llvm_config_version(llvm_config)
+        libclang_arg = '--bindir' if host.os == 'WINNT' else '--libdir'
+        libclang_path = invoke_llvm_config(llvm_config, libclang_arg)
+        clang_path = os.path.join(invoke_llvm_config(llvm_config, '--bindir'),
+                                  'clang')
+        libclang_path = normsep(libclang_path)
+        clang_path = normsep(clang_path)
 
-            return namespace(
-                libclang_path=libclang_path,
-                clang_path=clang_resolved,
-            )
-
-        if (not libclang_path and clang_path) or \
-           (libclang_path and not clang_path):
+        # Debian-based distros, at least, can have llvm-config installed
+        # but not have other packages installed.  Since the user is trying
+        # to use their system packages, we can't be more specific about what
+        # they need.
+        clang_resolved = find_program(clang_path)
+        if not clang_resolved:
             die(dedent('''\
-            You must provide both of --with-libclang-path and --with-clang-path
-            or neither of them.'''))
-
-        libclang_path = libclang_path[0]
-        clang_path = clang_path[0]
+            The file {} returned by `llvm-config {}` does not exist.
+            clang is required to build Firefox.  Please install the necessary
+            packages, or run `mach bootstrap`.
+            '''.format(clang_path, '--bindir')))
 
-        if not os.path.exists(libclang_path) or \
-           not os.path.isdir(libclang_path):
+        if not os.path.exists(libclang_path):
             die(dedent('''\
-            The argument to --with-libclang-path is not a directory: {}
-            '''.format(libclang_path)))
+            The directory {} returned by `llvm-config {}` does not exist.
+            clang is required to build Firefox.  Please install the necessary
+            packages, or run `mach bootstrap`.
+            '''.format(libclang_path, libclang_arg)))
 
         (found, searched) = search_for_libclang(libclang_path)
         if not found:
             die(dedent('''\
             Could not find the clang shared library in the path {}
-            specified by --with-libclang-path (searched for files {}).
-            '''.format(libclang_path, searched)))
-
-        clang_resolved = find_program(clang_path)
-        if not clang_resolved:
-            die(dedent('''\
-            The argument to --with-clang-path is not a file: {}
-            '''.format(clang_path)))
+            returned by `llvm-config {}` (searched for files {}).
+            clang is required to build Firefox.  Please install the necessary
+            packages, or run `mach bootstrap`.
+            '''.format(libclang_path, libclang_arg, searched)))
 
         return namespace(
             libclang_path=libclang_path,
             clang_path=clang_resolved,
         )
 
-    set_config('MOZ_LIBCLANG_PATH', bindgen_config_paths.libclang_path)
-    set_config('MOZ_CLANG_PATH', bindgen_config_paths.clang_path)
-    set_config('MOZ_STYLO_BINDGEN', depends_if('--enable-stylo-build-bindgen')(lambda _: True))
+    if (not libclang_path and clang_path) or \
+       (libclang_path and not clang_path):
+        die(dedent('''\
+        You must provide both of --with-libclang-path and --with-clang-path
+        or neither of them.'''))
+
+    libclang_path = libclang_path[0]
+    clang_path = clang_path[0]
+
+    if not os.path.exists(libclang_path) or \
+       not os.path.isdir(libclang_path):
+        die(dedent('''\
+        The argument to --with-libclang-path is not a directory: {}
+        '''.format(libclang_path)))
 
-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)
+    (found, searched) = search_for_libclang(libclang_path)
+    if not found:
+        die(dedent('''\
+        Could not find the clang shared library in the path {}
+        specified by --with-libclang-path (searched for files {}).
+        '''.format(libclang_path, searched)))
+
+    clang_resolved = find_program(clang_path)
+    if not clang_resolved:
+        die(dedent('''\
+        The argument to --with-clang-path is not a file: {}
+        '''.format(clang_path)))
+
+    return namespace(
+        libclang_path=libclang_path,
+        clang_path=clang_resolved,
+    )
+
+set_config('MOZ_LIBCLANG_PATH', bindgen_config_paths.libclang_path)
+set_config('MOZ_CLANG_PATH', bindgen_config_paths.clang_path)
 
 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]
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -86,23 +86,21 @@ ifdef ENABLE_MOZSEARCH_PLUGIN
           find . -type d -name save-analysis | xargs zip -r5D '$(ABS_DIST)/$(PKG_PATH)$(MOZSEARCH_RUST_ANALYSIS_BASENAME).zip'
 endif
 ifeq (Darwin, $(OS_ARCH))
 ifdef MOZ_ASAN
 	@echo "Rewriting ASan runtime dylib paths for all binaries in $(DIST)/$(MOZ_PKG_DIR)$(_BINPATH) ..."
 	$(PYTHON) $(MOZILLA_DIR)/build/unix/rewrite_asan_dylib.py $(DIST)/$(MOZ_PKG_DIR)$(_BINPATH)
 endif # MOZ_ASAN
 endif # Darwin
-ifdef MOZ_STYLO
 ifndef MOZ_ARTIFACT_BUILDS
 	@echo 'Packing stylo binding files...'
 	cd '$(DIST)/rust_bindings/style' && \
 		zip -r5D '$(ABS_DIST)/$(PKG_PATH)$(STYLO_BINDINGS_PACKAGE)' .
 endif # MOZ_ARTIFACT_BUILDS
-endif # MOZ_STYLO
 
 prepare-package: stage-package
 
 make-package-internal: prepare-package make-sourcestamp-file make-buildinfo-file make-mozinfo-file
 	@echo 'Compressing...'
 	cd $(DIST) && $(MAKE_PACKAGE)
 
 make-package: FORCE
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -402,35 +402,33 @@ UPLOAD_FILES= \
   $(call QUOTED_WILDCARD,$(MOZ_BUILDID_INFO_TXT_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_MOZINFO_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_TEST_PACKAGES_FILE)) \
   $(call QUOTED_WILDCARD,$(PKG_JSSHELL)) \
   $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip) \
   $(call QUOTED_WILDCARD,$(topobjdir)/$(MOZ_BUILD_APP)/installer/windows/instgen/setup.exe) \
   $(call QUOTED_WILDCARD,$(topobjdir)/$(MOZ_BUILD_APP)/installer/windows/instgen/setup-stub.exe) \
   $(call QUOTED_WILDCARD,$(topsrcdir)/toolchains.json) \
+  $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(STYLO_BINDINGS_PACKAGE)) \
   $(if $(UPLOAD_EXTRA_FILES), $(foreach f, $(UPLOAD_EXTRA_FILES), $(wildcard $(DIST)/$(f))))
 
 ifneq ($(filter-out en-US x-test,$(AB_CD)),)
   UPLOAD_FILES += \
     $(call QUOTED_WILDCARD,$(topobjdir)/$(MOZ_BUILD_APP)/installer/windows/l10ngen/setup.exe) \
     $(call QUOTED_WILDCARD,$(topobjdir)/$(MOZ_BUILD_APP)/installer/windows/l10ngen/setup-stub.exe)
 endif
 
 
 ifdef MOZ_CODE_COVERAGE
   UPLOAD_FILES += \
     $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(CODE_COVERAGE_ARCHIVE_BASENAME).zip) \
     $(call QUOTED_WILDCARD,$(topobjdir)/chrome-map.json) \
     $(NULL)
 endif
 
-ifdef MOZ_STYLO
-  UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(STYLO_BINDINGS_PACKAGE))
-endif
 
 ifdef ENABLE_MOZSEARCH_PLUGIN
   UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(MOZSEARCH_ARCHIVE_BASENAME).zip)
   UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(MOZSEARCH_RUST_ANALYSIS_BASENAME).zip)
 endif
 
 SIGN_CHECKSUM_CMD=
 ifdef MOZ_SIGN_CMD