chromium: prepare for M134

This commit is contained in:
emilylange
2025-03-05 16:21:57 +01:00
parent 5a441b7836
commit 062eb42eba
3 changed files with 33 additions and 3 deletions
@@ -216,6 +216,7 @@ let
isElectron = packageName == "electron";
needsCompgen = chromiumVersionAtLeast "133";
rustcVersion = buildPackages.rustc.version;
chromiumDeps = lib.mapAttrs (
path: args:
@@ -522,6 +523,9 @@ let
revert = true;
hash = "sha256-PuinMLhJ2W4KPXI5K0ujw85ENTB1wG7Hv785SZ55xnY=";
})
]
++ lib.optionals (chromiumVersionAtLeast "134" && lib.versionOlder rustcVersion "1.86") [
./patches/chromium-134-rust-adler2.patch
];
postPatch =
@@ -726,7 +730,20 @@ 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}";
use_qt = false;
}
// (
# M134 changed use_qt to use_qt5 (and use_qt6)
if chromiumVersionAtLeast "134" then
{
use_qt5 = false;
use_qt6 = false;
}
else
{
use_qt = false;
}
)
// {
# To fix the build as we don't provide libffi_pic.a
# (ld.lld: error: unable to find library -l:libffi_pic.a):
use_system_libffi = true;
@@ -738,7 +755,7 @@ let
enable_rust = true;
# While we technically don't need the cache-invalidation rustc_version provides, rustc_version
# is still used in some scripts (e.g. build/rust/std/find_std_rlibs.py).
rustc_version = buildPackages.rustc.version;
rustc_version = rustcVersion;
}
// lib.optionalAttrs (!(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) {
# https://www.mail-archive.com/v8-users@googlegroups.com/msg14528.html
@@ -114,7 +114,7 @@ chromium.get_deps(
},
**{
f"checkout_{arch}": True
for arch in ["x64", "arm64", "arm", "x86", "mips", "mips64"]
for arch in ["x64", "arm64", "arm", "x86", "mips", "mips64", "ppc"]
},
},
"",
@@ -0,0 +1,13 @@
diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn
index 6b996aa1fe3865187d02c017e56c0918bcc9b8f4..68b085be200fa4f116aa709b9157c4d2efdf7d6a 100644
--- a/build/rust/std/BUILD.gn
+++ b/build/rust/std/BUILD.gn
@@ -89,7 +89,7 @@ if (toolchain_has_rust) {
# These are no longer present in the Windows toolchain.
stdlib_files += [
"addr2line",
- "adler2",
+ "adler",
"gimli",
"libc",
"memchr",