Unverified Commit a9680d1c authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

buildMozillaMach: remove obsolete patches (#406013)

parents 2a573ad8 03cbda6f
Loading
Loading
Loading
Loading
+0 −39
Original line number Diff line number Diff line
From 043ab6ab28df63fd1b3459df5c52fd8c87c0ba21 Mon Sep 17 00:00:00 2001
From: David Tolnay <dtolnay@gmail.com>
Date: Tue, 28 Nov 2023 11:21:18 -0800
Subject: [PATCH] Handle CXCursor_LinkageSpec in Clang 18+

(cherry picked from commit 86f3dbe846020e2ba573d6eb38d1434d0cbcbb40)
---
 third_party/rust/bindgen/.cargo-checksum.json | 2 +-
 third_party/rust/bindgen/ir/item.rs           | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/third_party/rust/bindgen/.cargo-checksum.json b/third_party/rust/bindgen/.cargo-checksum.json
index 2242180..88718bd 100644
--- a/third_party/rust/bindgen/.cargo-checksum.json
+++ b/third_party/rust/bindgen/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"ae6de5b309f8bf07c259436b1113ccf405b2d7dd862e1b289bfef47a550956d1","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","build.rs":"4a9c4ac3759572e17de312a9d3f4ced3b6fd3c71811729e5a8d06bfbd1ac8f82","callbacks.rs":"9cbda648159897f93a07dbe90a1ee9ba92e2b020a02bc9725b87db4d025df3b6","clang.rs":"a38d153516c6685b46723010793b2f4e8b16468f3cd3296781dea6e485cd66da","codegen/bitfield_unit.rs":"fddeaeab5859f4e82081865595b7705f5c0774d997df95fa5c655b81b9cae125","codegen/bitfield_unit_tests.rs":"9df86490de5e9d66ccea583dcb686dd440375dc1a3c3cf89a89d5de3883bf28a","codegen/dyngen.rs":"7d727a737c616f7f2d3a07d825be8baad9078b3f35ad96277904559b4534ffcc","codegen/error.rs":"5e308b8c54b68511fc8ea2ad15ddac510172c4ff460a80a265336440b0c9653d","codegen/helpers.rs":"5f24007a09e50db7bd2b49b07100cfed649c7b22232558e28c99c759d5d14152","codegen/impl_debug.rs":"71d8e28873ba2de466f2637a824746963702f0511728037d72ee5670c51194cb","codegen/impl_partialeq.rs":"f4599e32c66179ae515a6518a3e94b686689cf59f7dd9ab618c3fb69f17d2c77","codegen/mod.rs":"25ef86b9dd894b40724d78b99e2743654f09bb427a23ccf5940a620c6408688e","codegen/postprocessing/merge_extern_blocks.rs":"be5c5ff6d3d3d4e940814c4dc77f8d687aa6b053dcfbd2185c09616ba9022bf2","codegen/postprocessing/mod.rs":"d1e8c2864d5194a4cb2f6731c0ef582a55b363df9c4f888c26942ff37f728e1c","codegen/postprocessing/sort_semantically.rs":"3071dd509f2e5d3dfd99cafa6ee19bbacb9fec1c61a0b3f6e284a75c1f2c3db6","codegen/serialize.rs":"b1d8fff0bd9717ee7ca883fd3f376cf7b93adb65dc5bb89ede467b087e985a5f","codegen/struct_layout.rs":"7dfc814d3c914a0c53d8ed031baf543dab1def5959e8ab85220cad69a506383a","deps.rs":"5ee2332fdb10325f3b0a0c6d9ba94e13eb631ef39e955fa958afc3625bdb5448","extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","features.rs":"af20bd617cce27f6716ab3d61a1c8ddfaa46227f4a0d435b08a19d5f277cf8ba","ir/analysis/derive.rs":"ec514585eb40f0e3306bf3302aec0152a2e95e8dce13a67c36b5f00c0cbb76ef","ir/analysis/has_destructor.rs":"7a82f01e7e0595a31b56f7c398fa3019b3fe9100a2a73b56768f7e6943dcc3ce","ir/analysis/has_float.rs":"58ea1e38a59ef208400fd65d426cb5b288949df2d383b3a194fa01b99d2a87fa","ir/analysis/has_type_param_in_array.rs":"d1b9eb119dc14f662eb9bd1394c859f485479e4912589709cdd33f6752094e22","ir/analysis/has_vtable.rs":"368cf30fbe3fab7190fab48718b948caac5da8c9e797b709488716b919315636","ir/analysis/mod.rs":"0c10d8eeb26d7e6f4ce18e9dfb74ea1f9deff5cd350298aca3dc1041b17c20c4","ir/analysis/sizedness.rs":"944443d6aab35d2dd80e4f5e59176ac1e1c463ba2f0eb25d33f1d95dfac1a6d0","ir/analysis/template_params.rs":"d3cc41041b1c45e0b5be2c9f3f1cc0c2341481b9ff51589cba2428df4e6a1ea9","ir/annotations.rs":"f79de09803a3f3ccb33e366a10a707da98cd00a56ba18312ea927d6c977220a4","ir/comment.rs":"5dcfab0095d967daad9b2927093fce3786b1a2146171580afbf526ba56855e36","ir/comp.rs":"b7b28b96e4206b3215881d814661c63c5dd182f34b1163d54bcedbe85998cb06","ir/context.rs":"a7608f7d3dd607647f2af5f45fc7c09483d2a694f91265bba353a71652e2d419","ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","ir/dot.rs":"2d79d698e6ac59ce032840e62ff11103abed1d5e9e700cf383b492333eeebe1f","ir/enum_ty.rs":"0b612e0b57112068455eee519f894016d0a8f425d6a67b98c56b858f57d99f4a","ir/function.rs":"60407267473d785ea33ac854a70c8ca34749bc868024270992deca68a951f74c","ir/int.rs":"68a86182743ec338d58e42203364dc7c8970cb7ec3550433ca92f0c9489b4442","ir/item.rs":"880c982df0843cbdff38b9f9c3829a2d863a224e4de2260c41c3ac69e9148ad4","ir/item_kind.rs":"7666a1ff1b8260978b790a08b4139ab56b5c65714a5652bbcec7faa7443adc36","ir/layout.rs":"61a0e4250ceab889606973f930f4d692837a13a69ae2579738ff09843fed3d65","ir/mod.rs":"713cd537434567003197a123cbae679602c715e976d22f7b23dafd0826ea4c70","ir/module.rs":"7cae5561bcf84a5c3b1ee8f1c3336a33b7f44f0d5ffe885fb108289983fe763e","ir/objc.rs":"4eecdb754542d78acea27d2f547d18d49164047e6efaff8a8d283d6c2dc9875b","ir/template.rs":"4f0e3736558aa8ec359cd9749dc48f87bfff494dd195a67b39cfee7d8a7542ef","ir/traversal.rs":"0c37a0898801ad39bffc8dddd1ee8baa61bb7cf4f3fdc25c8fdd56b6c96ada65","ir/ty.rs":"ba0d7b16a1080caf4960cc7dea0d0800365da0dd5c6e735d508ec448e87b1d40","ir/var.rs":"ced3496cf0683fef91ce94aa09b0ee37255db8425ea8634d52bd73b1b5c160f6","lib.rs":"0bed6f10b2dd25753a40e6e7fa11239f08c05be414ad264c6d7e2f7a8b71f1b2","log_stubs.rs":"9f974e041e35c8c7e29985d27ae5cd0858d68f8676d1dc005c6388d7d011707f","parse.rs":"ccb2c506f08123708ae673b8216404fb22b4c951330662f9b7140b412b063260","regex_set.rs":"7dcc1ad52194f057ea00e8ebc9c23c465ffa6761eed6ba41560d2d02e03c43a6","time.rs":"8efe317e7c6b5ba8e0865ce7b49ca775ee8a02590f4241ef62f647fa3c22b68e"},"package":"c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4"}
\ No newline at end of file
+{"files":{"Cargo.toml":"ae6de5b309f8bf07c259436b1113ccf405b2d7dd862e1b289bfef47a550956d1","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","build.rs":"4a9c4ac3759572e17de312a9d3f4ced3b6fd3c71811729e5a8d06bfbd1ac8f82","callbacks.rs":"9cbda648159897f93a07dbe90a1ee9ba92e2b020a02bc9725b87db4d025df3b6","clang.rs":"a38d153516c6685b46723010793b2f4e8b16468f3cd3296781dea6e485cd66da","codegen/bitfield_unit.rs":"fddeaeab5859f4e82081865595b7705f5c0774d997df95fa5c655b81b9cae125","codegen/bitfield_unit_tests.rs":"9df86490de5e9d66ccea583dcb686dd440375dc1a3c3cf89a89d5de3883bf28a","codegen/dyngen.rs":"7d727a737c616f7f2d3a07d825be8baad9078b3f35ad96277904559b4534ffcc","codegen/error.rs":"5e308b8c54b68511fc8ea2ad15ddac510172c4ff460a80a265336440b0c9653d","codegen/helpers.rs":"5f24007a09e50db7bd2b49b07100cfed649c7b22232558e28c99c759d5d14152","codegen/impl_debug.rs":"71d8e28873ba2de466f2637a824746963702f0511728037d72ee5670c51194cb","codegen/impl_partialeq.rs":"f4599e32c66179ae515a6518a3e94b686689cf59f7dd9ab618c3fb69f17d2c77","codegen/mod.rs":"25ef86b9dd894b40724d78b99e2743654f09bb427a23ccf5940a620c6408688e","codegen/postprocessing/merge_extern_blocks.rs":"be5c5ff6d3d3d4e940814c4dc77f8d687aa6b053dcfbd2185c09616ba9022bf2","codegen/postprocessing/mod.rs":"d1e8c2864d5194a4cb2f6731c0ef582a55b363df9c4f888c26942ff37f728e1c","codegen/postprocessing/sort_semantically.rs":"3071dd509f2e5d3dfd99cafa6ee19bbacb9fec1c61a0b3f6e284a75c1f2c3db6","codegen/serialize.rs":"b1d8fff0bd9717ee7ca883fd3f376cf7b93adb65dc5bb89ede467b087e985a5f","codegen/struct_layout.rs":"7dfc814d3c914a0c53d8ed031baf543dab1def5959e8ab85220cad69a506383a","deps.rs":"5ee2332fdb10325f3b0a0c6d9ba94e13eb631ef39e955fa958afc3625bdb5448","extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","features.rs":"af20bd617cce27f6716ab3d61a1c8ddfaa46227f4a0d435b08a19d5f277cf8ba","ir/analysis/derive.rs":"ec514585eb40f0e3306bf3302aec0152a2e95e8dce13a67c36b5f00c0cbb76ef","ir/analysis/has_destructor.rs":"7a82f01e7e0595a31b56f7c398fa3019b3fe9100a2a73b56768f7e6943dcc3ce","ir/analysis/has_float.rs":"58ea1e38a59ef208400fd65d426cb5b288949df2d383b3a194fa01b99d2a87fa","ir/analysis/has_type_param_in_array.rs":"d1b9eb119dc14f662eb9bd1394c859f485479e4912589709cdd33f6752094e22","ir/analysis/has_vtable.rs":"368cf30fbe3fab7190fab48718b948caac5da8c9e797b709488716b919315636","ir/analysis/mod.rs":"0c10d8eeb26d7e6f4ce18e9dfb74ea1f9deff5cd350298aca3dc1041b17c20c4","ir/analysis/sizedness.rs":"944443d6aab35d2dd80e4f5e59176ac1e1c463ba2f0eb25d33f1d95dfac1a6d0","ir/analysis/template_params.rs":"d3cc41041b1c45e0b5be2c9f3f1cc0c2341481b9ff51589cba2428df4e6a1ea9","ir/annotations.rs":"f79de09803a3f3ccb33e366a10a707da98cd00a56ba18312ea927d6c977220a4","ir/comment.rs":"5dcfab0095d967daad9b2927093fce3786b1a2146171580afbf526ba56855e36","ir/comp.rs":"b7b28b96e4206b3215881d814661c63c5dd182f34b1163d54bcedbe85998cb06","ir/context.rs":"a7608f7d3dd607647f2af5f45fc7c09483d2a694f91265bba353a71652e2d419","ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","ir/dot.rs":"2d79d698e6ac59ce032840e62ff11103abed1d5e9e700cf383b492333eeebe1f","ir/enum_ty.rs":"0b612e0b57112068455eee519f894016d0a8f425d6a67b98c56b858f57d99f4a","ir/function.rs":"60407267473d785ea33ac854a70c8ca34749bc868024270992deca68a951f74c","ir/int.rs":"68a86182743ec338d58e42203364dc7c8970cb7ec3550433ca92f0c9489b4442","ir/item.rs":"f215cc40c013cdd6151149dd92b73e13a635a1056f5724174c0f0ff7da9286f8","ir/item_kind.rs":"7666a1ff1b8260978b790a08b4139ab56b5c65714a5652bbcec7faa7443adc36","ir/layout.rs":"61a0e4250ceab889606973f930f4d692837a13a69ae2579738ff09843fed3d65","ir/mod.rs":"713cd537434567003197a123cbae679602c715e976d22f7b23dafd0826ea4c70","ir/module.rs":"7cae5561bcf84a5c3b1ee8f1c3336a33b7f44f0d5ffe885fb108289983fe763e","ir/objc.rs":"4eecdb754542d78acea27d2f547d18d49164047e6efaff8a8d283d6c2dc9875b","ir/template.rs":"4f0e3736558aa8ec359cd9749dc48f87bfff494dd195a67b39cfee7d8a7542ef","ir/traversal.rs":"0c37a0898801ad39bffc8dddd1ee8baa61bb7cf4f3fdc25c8fdd56b6c96ada65","ir/ty.rs":"ba0d7b16a1080caf4960cc7dea0d0800365da0dd5c6e735d508ec448e87b1d40","ir/var.rs":"ced3496cf0683fef91ce94aa09b0ee37255db8425ea8634d52bd73b1b5c160f6","lib.rs":"0bed6f10b2dd25753a40e6e7fa11239f08c05be414ad264c6d7e2f7a8b71f1b2","log_stubs.rs":"9f974e041e35c8c7e29985d27ae5cd0858d68f8676d1dc005c6388d7d011707f","parse.rs":"ccb2c506f08123708ae673b8216404fb22b4c951330662f9b7140b412b063260","regex_set.rs":"7dcc1ad52194f057ea00e8ebc9c23c465ffa6761eed6ba41560d2d02e03c43a6","time.rs":"8efe317e7c6b5ba8e0865ce7b49ca775ee8a02590f4241ef62f647fa3c22b68e"},"package":"c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4"}
\ No newline at end of file
diff --git a/third_party/rust/bindgen/ir/item.rs b/third_party/rust/bindgen/ir/item.rs
index 40f6f7d..d443bda 100644
--- a/third_party/rust/bindgen/ir/item.rs
+++ b/third_party/rust/bindgen/ir/item.rs
@@ -1427,8 +1427,9 @@ impl Item {
             }
         }
 
-        // Guess how does clang treat extern "C" blocks?
-        if cursor.kind() == CXCursor_UnexposedDecl {
+        // On Clang 18+, extern "C" is reported accurately as a LinkageSpec.
+        // Older LLVM treat it as UnexposedDecl.
+        if cursor.kind() == CXCursor_LinkageSpec || cursor.kind() == CXCursor_UnexposedDecl {
             Err(ParseError::Recurse)
         } else {
             // We allowlist cursors here known to be unhandled, to prevent being
-- 
2.44.0
+3 −55
Original line number Diff line number Diff line
@@ -306,71 +306,19 @@ buildStdenv.mkDerivation {
      ./env_var_for_system_dir-ff111.patch
    ]
    ++ lib.optionals (lib.versionAtLeast version "133") [ ./env_var_for_system_dir-ff133.patch ]
    ++ lib.optionals (lib.versionAtLeast version "96" && lib.versionOlder version "121") [
      ./no-buildconfig-ffx96.patch
    ]
    ++ lib.optionals (lib.versionAtLeast version "121" && lib.versionOlder version "136") [
      ./no-buildconfig-ffx121.patch
    ]
    ++ lib.optionals (lib.versionAtLeast version "136") [ ./no-buildconfig-ffx136.patch ]
    ++
      lib.optionals
        (
          lib.versionOlder version "128.2"
          || (lib.versionAtLeast version "129" && lib.versionOlder version "130")
        )
        [
          (fetchpatch {
            # https://bugzilla.mozilla.org/show_bug.cgi?id=1912663
            name = "cbindgen-0.27.0-compat.patch";
            url = "https://hg.mozilla.org/integration/autoland/raw-rev/98cd34c7ff57";
            hash = "sha256-MqgWHgbDedVzDOqY2/fvCCp+bGwFBHqmaJLi/mllZug=";
          })
        ]
    ++ lib.optionals (lib.versionOlder version "122") [ ./bindgen-0.64-clang-18.patch ]
    ++ lib.optionals (lib.versionOlder version "123") [
      (fetchpatch {
        name = "clang-18.patch";
        url = "https://hg.mozilla.org/mozilla-central/raw-rev/ba6abbd36b496501cea141e17b61af674a18e279";
        hash = "sha256-2IpdSyye3VT4VB95WurnyRFtdN1lfVtYpgEiUVhfNjw=";
      })
    ]
    ++
      lib.optionals
        (
          (lib.versionAtLeast version "129" && lib.versionOlder version "134")
          || lib.versionOlder version "128.6.0"
        )
        [
          # Python 3.12.8 compat
          # https://bugzilla.mozilla.org/show_bug.cgi?id=1935621
          # https://phabricator.services.mozilla.com/D231480
          ./mozbz-1935621-attachment-9442305.patch
        ]
    ++ [
      # LLVM 19 turned on WASM reference types by default, exposing a bug
      # that broke the Mozilla WASI build. Supposedly, it has been fixed
      # upstream in LLVM, but the build fails in the same way for us even
      # with LLVM 19 versions that contain the upstream patch.
      #
      # Apply the temporary patch Mozilla used to work around this bug
      # for now until someone can investigate what’s going on here.
      #
      # TODO: Please someone figure out what’s up with this.
      #
      # See: <https://bugzilla.mozilla.org/show_bug.cgi?id=1905251>
      # See: <https://github.com/llvm/llvm-project/pull/97451>
      (fetchpatch {
        name = "wasi-sdk-disable-reference-types.patch";
        url = "https://hg.mozilla.org/integration/autoland/raw-rev/23a9f6555c7c";
        hash = "sha256-CRywalJlRMFVLITEYXxpSq3jLPbUlWKNRHuKLwXqQfU=";
      })
      # Fix for missing vector header on macOS
      # https://bugzilla.mozilla.org/show_bug.cgi?id=1939405
      # https://bugzilla.mozilla.org/show_bug.cgi?id=1959377
      # Fixed on Firefox 139
      ./firefox-mac-missing-vector-header.patch

      # https://bugzilla.mozilla.org/show_bug.cgi?id=1962497
      # https://phabricator.services.mozilla.com/D246545
      # Fixed on Firefox 140
      ./build-fix-RELRHACK_LINKER-setting-when-linker-name-i.patch
    ]
    ++ extraPatches;
+0 −119
Original line number Diff line number Diff line
diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py
--- a/python/mach/mach/site.py
+++ b/python/mach/mach/site.py
@@ -15,10 +15,11 @@
 import site
 import subprocess
 import sys
 import sysconfig
 import tempfile
+import warnings
 from contextlib import contextmanager
 from pathlib import Path
 from typing import Callable, Optional
 
 from mach.requirements import (
@@ -817,37 +818,79 @@
 
 class PythonVirtualenv:
     """Calculates paths of interest for general python virtual environments"""
 
     def __init__(self, prefix):
-        if _is_windows:
-            self.bin_path = os.path.join(prefix, "Scripts")
-            self.python_path = os.path.join(self.bin_path, "python.exe")
-        else:
-            self.bin_path = os.path.join(prefix, "bin")
-            self.python_path = os.path.join(self.bin_path, "python")
         self.prefix = os.path.realpath(prefix)
+        self.paths = self._get_sysconfig_paths(self.prefix)
 
-    @functools.lru_cache(maxsize=None)
-    def resolve_sysconfig_packages_path(self, sysconfig_path):
-        # macOS uses a different default sysconfig scheme based on whether it's using the
-        # system Python or running in a virtualenv.
-        # Manually define the scheme (following the implementation in
-        # "sysconfig._get_default_scheme()") so that we're always following the
-        # code path for a virtualenv directory structure.
-        if os.name == "posix":
-            scheme = "posix_prefix"
-        else:
-            scheme = os.name
+        # Name of the Python executable to use in virtual environments.
+        # An executable with the same name as sys.executable might not exist in
+        # virtual environments. An executable with 'python' as the steam —
+        # without version numbers or ABI flags — will always be present in
+        # virtual environments, so we use that.
+        python_exe_name = "python" + sysconfig.get_config_var("EXE")
+
+        self.bin_path = self.paths["scripts"]
+        self.python_path = os.path.join(self.bin_path, python_exe_name)
 
-        sysconfig_paths = sysconfig.get_paths(scheme)
-        data_path = Path(sysconfig_paths["data"])
-        path = Path(sysconfig_paths[sysconfig_path])
-        relative_path = path.relative_to(data_path)
+    @staticmethod
+    def _get_sysconfig_paths(prefix):
+        """Calculate the sysconfig paths of a virtual environment in the given prefix.
 
-        # Path to virtualenv's "site-packages" directory for provided sysconfig path
-        return os.path.normpath(os.path.normcase(Path(self.prefix) / relative_path))
+        The virtual environment MUST be using the same Python distribution as us.
+        """
+        # Determine the sysconfig scheme used in virtual environments
+        if "venv" in sysconfig.get_scheme_names():
+            # A 'venv' scheme was added in Python 3.11 to allow users to
+            # calculate the paths for a virtual environment, since the default
+            # scheme may not always be the same as used on virtual environments.
+            # Some common examples are the system Python distributed by macOS,
+            # Debian, and Fedora.
+            # For more information, see https://github.com/python/cpython/issues/89576
+            venv_scheme = "venv"
+        elif os.name == "nt":
+            # We know that before the 'venv' scheme was added, on Windows,
+            # the 'nt' scheme was used in virtual environments.
+            venv_scheme = "nt"
+        elif os.name == "posix":
+            # We know that before the 'venv' scheme was added, on POSIX,
+            # the 'posix_prefix' scheme was used in virtual environments.
+            venv_scheme = "posix_prefix"
+        else:
+            # This should never happen with upstream Python, as the 'venv'
+            # scheme should always be available on >=3.11, and no other
+            # platforms are supported by the upstream on older Python versions.
+            #
+            # Since the 'venv' scheme isn't available, and we have no knowledge
+            # of this platform/distribution, fallback to the default scheme.
+            #
+            # Hitting this will likely be the result of running a custom Python
+            # distribution targetting a platform that is not supported by the
+            # upstream.
+            # In this case, unless the Python vendor patched the Python
+            # distribution in such a way as the default scheme may not always be
+            # the same scheme, using the default scheme should be correct.
+            # If the vendor did patch Python as such, to work around this issue,
+            # I would recommend them to define a 'venv' scheme that matches
+            # the layout used on virtual environments in their Python distribution.
+            # (rec. signed Filipe Laíns — upstream sysconfig maintainer)
+            venv_scheme = sysconfig.get_default_scheme()
+            warnings.warn(
+                f"Unknown platform '{os.name}', using the default install scheme '{venv_scheme}'. "
+                "If this is incorrect, please ask your Python vendor to add a 'venv' sysconfig scheme "
+                "(see https://github.com/python/cpython/issues/89576, or check the code comment).",
+                stacklevel=2,
+            )
+        # Build the sysconfig config_vars dictionary for the virtual environment.
+        venv_vars = sysconfig.get_config_vars().copy()
+        venv_vars["base"] = venv_vars["platbase"] = prefix
+        # Get sysconfig paths for the virtual environment.
+        return sysconfig.get_paths(venv_scheme, vars=venv_vars)
+
+    def resolve_sysconfig_packages_path(self, sysconfig_path):
+        return self.paths[sysconfig_path]
 
     def site_packages_dirs(self):
         dirs = []
         if sys.platform.startswith("win"):
             dirs.append(os.path.normpath(os.path.normcase(self.prefix)))
+0 −27
Original line number Diff line number Diff line
diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp
index e7be91a248..5eb98534ee 100644
--- a/docshell/base/nsAboutRedirector.cpp
+++ b/docshell/base/nsAboutRedirector.cpp
@@ -66,9 +66,6 @@ static const RedirEntry kRedirMap[] = {
     {"about", "chrome://global/content/aboutAbout.html", 0},
     {"addons", "chrome://mozapps/content/extensions/aboutaddons.html",
      nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI},
-    {"buildconfig", "chrome://global/content/buildconfig.html",
-     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
-         nsIAboutModule::IS_SECURE_CHROME_UI},
     {"checkerboard", "chrome://global/content/aboutCheckerboard.html",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::ALLOW_SCRIPT},
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
index 74c0ae8f34..a5d9645a96 100644
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -41,8 +41,6 @@ toolkit.jar:
    content/global/plugins.css
    content/global/plugins.js
 #endif
-*   content/global/buildconfig.html
-   content/global/buildconfig.css
    content/global/contentAreaUtils.js
    content/global/datepicker.xhtml
 #ifndef MOZ_FENNEC