Loading
+23 −2
Original line number Diff line number Diff line
@@ -478,11 +478,16 @@ let
      # allowing us to use our rustc and our clang.
      ./patches/chromium-129-rust.patch
    ]
    ++ lib.optionals (chromiumVersionAtLeast "140") [
    ++ lib.optionals (versionRange "140" "141") [
      # Rebased variant of the patch above due to
      # https://chromium-review.googlesource.com/c/chromium/src/+/6665907
      ./patches/chromium-140-rust.patch
    ]
    ++ lib.optionals (chromiumVersionAtLeast "141") [
      # Rebased variant of the patch above due to
      # https://chromium-review.googlesource.com/c/chromium/src/+/6897026
      ./patches/chromium-141-rust.patch
    ]
    ++ lib.optionals stdenv.hostPlatform.isAarch64 [
      # Reverts decommit pooled pages which causes random crashes of tabs on systems
      # with page sizes different than 4k. It 'supports' runtime page sizes, but has
@@ -523,6 +528,17 @@ let
      # Rebased variant of the patch above for
      # electron 35 (M134) and 36 (M136)
      ./patches/chromium-134-rust-1.86-mismatched_lifetime_syntaxes.patch
    ]
    ++ lib.optionals (chromiumVersionAtLeast "141") [
      (fetchpatch {
        # Fix "invalid application of 'sizeof' to an incomplete type 'blink::CSSStyleSheet'"
        # by reverting https://chromium-review.googlesource.com/c/chromium/src/+/6892157
        name = "chromium-141-Revert-Remove-unnecessary-include-in-tree_scope.h.patch";
        url = "https://chromium.googlesource.com/chromium/src/+/0fc0e71aa1ca0419fae6d14255025543980d2cba^!?format=TEXT";
        decode = "base64 -d";
        revert = true;
        hash = "sha256-pnEus2NHpNWZ6ZSXLgdTn+it7oy1MPZPbD8SOAKLWbw=";
      })
    ];

    postPatch =
@@ -736,7 +752,12 @@ let
        # Disable PGO because the profile data requires a newer compiler version (LLVM 14 isn't sufficient):
        chrome_pgo_phase = 0;
        clang_base_path = "${llvmCcAndBintools}";

      }
      // lib.optionalAttrs (chromiumVersionAtLeast "141") {
        # TODO: remove opt-out of https://chromium.googlesource.com/chromium/src/+/main/docs/modules.md
        use_clang_modules = false;
      }
      // {
        use_qt5 = false;
        use_qt6 = false;

+142 −132

File changed.

Preview size limit exceeded, changes collapsed.

+21 −0
Original line number Diff line number Diff line
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 516f7d85fc5718a26707d988389081cd86da49bd..f4b5284ad90591a57cb803353bbe57fd4e213159 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1911,16 +1911,6 @@ config("runtime_library") {
     configs += [ "//build/config/c++:runtime_library" ]
   }
 
-  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
-  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
-  # library. The Rust symbols are marked as weak, so that they can be replaced by
-  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
-  # order to cause that replacement to occur by explicitly linking in clang's
-  # compiler-rt library.
-  if (is_clang && !(is_a_target_toolchain && is_cronet_build)) {
-    configs += [ "//build/config/clang:compiler_builtins" ]
-  }
-
   # TODO(crbug.com/40570904): Come up with a better name for is POSIX + Fuchsia
   # configuration.
   if (is_posix || is_fuchsia) {