summaryrefslogtreecommitdiff
path: root/www-client/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'www-client/chromium')
-rw-r--r--www-client/chromium/Manifest11
-rw-r--r--www-client/chromium/chromium-134.0.6998.3.ebuild (renamed from www-client/chromium/chromium-134.0.6988.2.ebuild)29
-rw-r--r--www-client/chromium/files/chromium-134-bindgen-custom-toolchain.patch123
3 files changed, 139 insertions, 24 deletions
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index 182e00ebd2f1..d0062a774fc9 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -3,6 +3,7 @@ AUX chromium-111-InkDropHost-crash.patch 1066 BLAKE2B ee0b42803a59ef4731e4f31684
AUX chromium-131-oauth2-client-switches.patch 1991 BLAKE2B 846bfe0368e432d1ed15598d939e7ef925611ac56e9dee49d342617d8df061d9d4154fdbefcb9669129770b9c1349a1f3ce25cf6fa86da22fdec206807a47d33 SHA512 654bf8a29709e0cb3adb877d210a9a093ff589b31caef95426d41f79b4f8028be7eaa0b58dc50c174deae3f37a47d2f68f08bcaa0d74da35468566f2dd2dafdd
AUX chromium-131-unbundle-icu-target.patch 504 BLAKE2B 9f29fa863e218bc9e6761795cd86f9e4621ee8d3105ea20e5c7acf2895c89d566e526daebadf6cd9c33ca7e4e228eac2cf8f2e61b0880bdcd1b54237ed1bf9a8 SHA512 6fb097dbc59326b078ed0e19a7d0301c5dd68f6a4a77533732c24396361019c2aa4480776604cacf6670a8ac943557c58fdaab99c9104078935409b430b29de9
AUX chromium-132-bindgen-custom-toolchain.patch 4011 BLAKE2B 928f6bbf9ceedb063744d985b0da69e28dba37a9da33758700cf64d69a4dddfd1bf27753f9b5972ce36a09f3586b7e67448cb5de1871f8b15cccffa90dd483f3 SHA512 cb2e6e11d0d49810064586916166af2cfe7d60eae1363835081937a03708d74c80bdeffa82cd51a848ba31eaf0667abdbeaf3001bc3dbdae29a30e1857d6ee8e
+AUX chromium-134-bindgen-custom-toolchain.patch 4838 BLAKE2B 196c183b5d23243310bb3cc418cdc288cc5af832b936e50dfaf9918a538fdfc4417e9655b362fd992507458309d34c954534c9bc97abe90008b30bf4b9a3f8cd SHA512 7501cc1eb69670f655b85be5fcabb5f2c0614c32bd393abebd2983f1bf4bff0201cddf871d404c834498c76b0f1e4e37f6d60286c1921f2b18c30b288cb39572
AUX chromium-134-oauth2-client-switches.patch 1867 BLAKE2B e5266308b7c1506f82b811e865b482886530c4c26d062d6e15155e5ef4031d7c8d680730e5fc8ab1df899d9ffacd8be01db3b43c2817a756a1cfc5d54296a9c7 SHA512 a8d95d5c10b2561fa30bf593aaf177507666cc46dd966ea048e6ee99db6dfd3a7b11962203374770ec2d508198ba14fceeb93dd5795276794a2e7adb58a363fe
AUX chromium-134-qt5-optional.patch 4140 BLAKE2B 2a5879384a95fa0a9edf2e6506b2f374f6366ef0bd5f248b14333cbe721c5ad85d04101cf7a15a207c476525a8ba22645d8446c684363b3fa8b9c642c89b8fbf SHA512 b9fba4b3d33430a9565a6605f8d525618e6691622095bfe17f781e030e4395cb5ed25242625761ca16b19da8014e4afa1335fc6719cae78c8b3594c9e9092978
AUX chromium-browser.xml 407 BLAKE2B 168d78b0855546ca559cfb51aff0bc85d5e6ae974c25eb76e4a02f6d11659489c6e40397a0b2f7bc1fda336fd2c6dd8c863fccc3340719210b41c7fef51927f4 SHA512 b767fb4fd1925029d95560fc14cb7ab12ae43b2fe923e92d75e733b9723cbe1dcdf6df041a2b62554e98b79b47ef3f6028c773e72e6fd53166a021d49657aeca
@@ -17,20 +18,20 @@ DIST chromium-133.0.6943.27-linux-testdata.tar.xz 299232560 BLAKE2B 88cd384d378b
DIST chromium-133.0.6943.27-linux.tar.xz 2300194124 BLAKE2B 7219cc54f799cc5ab4d64c90454f47495028ff291d4b96a5c504efdffc993e75d60b906b59211e681263276e1292f0fdcbb46c32c409f9d5dd72aa6d726b66fe SHA512 e7c0fd65782de14b3f9a2be5f2bb5a8ac8cf26216b3924026d0257d94bd82558ea349bfa6f34cff9768a39d7670dcb9144873a4d46ef63b9d4c93c4056a6f728
DIST chromium-133.0.6943.53-linux-testdata.tar.xz 299288504 BLAKE2B 4ad9c3115b9e1b37ee49aef22d91af3df26b28f771b1aa217a1d7bdb3023608b3483bd98c0e77f9f2a22f7edd12fb6e63515225957555b93fabf0d0739439ec8 SHA512 517a1635baf033a00df5fff8aea22c1150b4ca97b6f9aebecfb0681c81f2708700a536a837c13bbd5ffa9938c7f32a0cc65ac648474df2613f15bedbffafaa11
DIST chromium-133.0.6943.53-linux.tar.xz 2300503052 BLAKE2B 567e1e7f1722bc4ff118ac292ecfd59cf8d9380612ec8a36a65b8df84802d75042128f4b9b0366e4682e5d5c98981470df204fba8fc26a4d53d2d379d73421d1 SHA512 d7d0a7433190f15516950fbd4ccb5f13ab3f543388748d6c48f3d4b24a745c263b12ec56225259d93a697774ebc75b18cb4bc17cfd9e98e4c0f66df7a2eff4f8
-DIST chromium-134-clang.tar.xz 54177680 BLAKE2B ebe3e42ba0950f067b0febec65e575ec510f64a056e0a1a9dfffebde02809429c98461638784149dc31423ade29f1dbe4b060af06d8371c0ca8d10d83c7d8617 SHA512 4cf26e6f895ca1b268afcde296f2e7c761f99584170e1f3deecb1c5501be2121f173934a4598124bed69d0bd266f799bf03adfdb2190cb9f23c1212072a8bace
-DIST chromium-134-rust.tar.xz 124591376 BLAKE2B c062e7283994ef15055a37f66a1c01dfcbcf03d16b7de48e7d017cec479f306999112dcd0f016157cfd0334349b55ae29512be3063dc6c3de90311520e90a5c1 SHA512 09be07ff0adfcc2928b28f5763a7e18bb7ef1f0cbf4a2475e3e6ae19a0a310a4a8f323375b947a48247853412119781bc9fa1422e24b96423c071f68337d6766
-DIST chromium-134.0.6988.2-linux-testdata.tar.xz 299844124 BLAKE2B df40b1a459525bc23abbc3fe40ed9b6e532f18afc4c918995919bd66591a22599bd09dbb327679e51d997b9e4600bacafeaf9721d75891f55c57c7efbc90c7d3 SHA512 4c310193f2d244a8633a9c03c3ac1231d888094cfb6abe93af188bdf6a81961218b801ec596b4dee9f2454473c54d7e26f78ec0be29ee4a2b67ae75ba6deab43
-DIST chromium-134.0.6988.2-linux.tar.xz 2287904388 BLAKE2B 4ec7b0308e4d13ee008fd147d52ffb49e5755c8c89c3ffaf660f43b6f8550fff92cb419a8e9cfe32059b45ce1f7c433a1470b677854a5cc286221d538094b01c SHA512 199c6de63585a352956080613101bc22147335648624b66c73741962fe3502474648d42060945139bb7b13935e71bc1d35bb35ad73e2ae5dfabc0657a2ff2e64
+DIST chromium-134.0.6998.3-linux-testdata.tar.xz 299961832 BLAKE2B 1e6891cc56684fdfbedb5080b7ffe781519dece6eb087dd03667d889163776349c869c6d873f8c99ab479ac02248bec51685c56f117c2ede17f9616ab37f4fd6 SHA512 4fdeb80d43d6da74b5776253fed18b38d77f5ee6205e5ce459d8b57d2ef2c4690f15226ea2efdee925dc1ffdaa80648ff816afdf7fa7b0cc792cb5ccecbcbf13
+DIST chromium-134.0.6998.3-linux.tar.xz 2335399444 BLAKE2B b2fafc534e07ae48a3dcdd581e00a375626fffdbbb9e426eba507c922187f0b9ce167bc126d760eea14590134df2e583907214aeaa264f53061f64d7d5ff4007 SHA512 8bbcfac480a5325885129ea5c40187e174d65809234b307b0f83ec88cb59571709920917157128e7d02ea09c578819270fb0980438c1c989236d5edc9cba284f
+DIST chromium-clang-llvmorg-20-init-17108-g29ed6000-3.tar.xz 54170388 BLAKE2B 1383726ef2977ddb6ca9cef7eb7f5730e9635c570c1e20c3103922242e012579b87cf7ada668a6dedec375fa821115e5c79c32b12ab486a9e427f2e00344cfdc SHA512 a2aee165ee5581f442af222b23182370349a3b0b5412d05600c2d2258f31449e986bb7e88601b26049b4a926b15938238bfe8abd01ff6eaf2df84a64812007a1
DIST chromium-openpower-a85b64f07b.tar.bz2 387899 BLAKE2B b01fda2d64ce73068d1536a10cc0896f07a4b714cdb25698b1df8b3252baa0c21c4209b307cf1cb554854f6d0bfe3cd35e06aaa8d02ac5d409a119335084c324 SHA512 05eee81677e8766808441c939bee68e2e6c58ec91f471d88a40181d2eda78614a0a6d27d92ff8f9dda564d12f3451bace4ff2727594748c5c238a3533038019b
DIST chromium-openpower-c11b515d9a.tar.bz2 396039 BLAKE2B c05653e6bb62188c18864e783197853f4c41f88d1c928044a0ea0cb4677bc17806fac266ab100cbbcec3cb0d964bf2172917df95679927c1f1a88fa34aef4f53 SHA512 e9d9bbb2dd8d998060c78dfd5bbaedc548a8c44b442f6259304797326c585046144a6bb8aa4e24c44b3b56068189bee8a01267db2a392e90fd5603d06c0ef9ff
DIST chromium-patches-132.tar.bz2 5040 BLAKE2B d5bd84dd90b395c6a15135637f51f931c72a2f301b1c24e9b938c744f2767fa36857b8edfdf5c44cf085a1efcb40475401fec226ce43446442f32fb174b55355 SHA512 29833b306a34ab6562ee58eb03669818da7235cd36666b27d829bcbd3c4d0035a530fb6be1c33cf88c1c11d43e68e3781f9b9602c0c004e7a37ffa69f9ee17c7
DIST chromium-patches-133-1.tar.bz2 10661 BLAKE2B c8a141bd10e628533e373b08969f95443eb6ae7f4497359db02f370147ac6132fbc31db28915ebdd9f150c13be78f06af938bd7dffdf2c23d90e1b9e07bd92ab SHA512 48a356872acc41c96c92366bd09de5a1c4af87fe4c480dccc7bd7a2aae5c3be8e6411151ed36303a127022001248bd25ef8305e83bd0d533660e3f11943af686
DIST chromium-patches-134.tar.bz2 10184 BLAKE2B 5ff1022205ef3e0e88b43e6c20d33a86386d80b837135eaa5451b004f09290de3b765694e31c9e6e840ec7e0537bbe6164a61224a55e17cd04356f1d5af8ee37 SHA512 29fc1f70a95501e0f82e2bb66f7eefab2bd75995d660271ab0dd043b18663107547faddf71b555b82da39e31393c7220893e09d4b28a71b18855d82399e3512b
DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c
+DIST chromium-rust-toolchain-ad211ced81-1-llvmorg-20-init-17108-g29ed6000.tar.xz 124591376 BLAKE2B c062e7283994ef15055a37f66a1c01dfcbcf03d16b7de48e7d017cec479f306999112dcd0f016157cfd0334349b55ae29512be3063dc6c3de90311520e90a5c1 SHA512 09be07ff0adfcc2928b28f5763a7e18bb7ef1f0cbf4a2475e3e6ae19a0a310a4a8f323375b947a48247853412119781bc9fa1422e24b96423c071f68337d6766
DIST chromium-testfonts-f26f29c9d3.tar.gz 32750602 BLAKE2B 498f8b2e0811c98dc3d4aaa75559e69c782afb4bd12328cfdb7244ddba5cae7ee47becd27b2549d7b36bed417601f70f4c192934b0f08496cef1547d0502d93c SHA512 96b090446862997c8134e2971f0e38793ecc1208d547e554c9b651ccfb4127c4de86754903fea57a7292a2823c45117bae0ec13ed87aed20c248fb779579fbde
EBUILD chromium-132.0.6834.159.ebuild 48887 BLAKE2B 91e11fe757d39841e4d4b5b3f7ce13f7c1e7e1484c40c09277134f8d1575449314384df3affb51921cee7d2ded54e1df334810a4884ff8a16a133e1675cd307a SHA512 91db5ac8f55a5a45fa189fb05c2ecdd7130bccf65f129560fda75ff315cc8c84d2d849d429a85c9387d8b11ec74edd025b80faccf49a1ff915e6fbd9ea6a6d85
EBUILD chromium-132.0.6834.83.ebuild 49528 BLAKE2B cedc4f663fc50cd65ba4f43036e0825a034923e8018614101f486d4f67a7fd2a964fd44b876ac29bee63f12761ce2cf2c28f4ddb250bd0bd52f7cba24448eb47 SHA512 a6360a509c05ccb0a5d91dbae1b7311624b887590ab864b470eb108875edfa5058004ad6a2ed4cbd3c7600710751d82a3d148c16342e3ccdc67878489f9cac63
EBUILD chromium-133.0.6943.27.ebuild 48957 BLAKE2B 7521085b58aa3808a9f0f093365bbfc8727b87b0d4730a36467f93b3465ab2db9317e4982bca6881bac1d925a7b99ee3e0772a86464d2e3981939c388baf942d SHA512 177145373fbb79c9002ad2f2cd13a8e3d267808bc76d3023c59cafa46ff580246584bdec2e7233a3f7fc9a637c3ca7158cb9cb5028f67f0ba115089a25f8c744
EBUILD chromium-133.0.6943.53.ebuild 48957 BLAKE2B 719382ba5ee0b786513ea99d26b92ebcafecaf09e3321c4f461b512adfddb33783186a8c78aa3caef137b678c426f8c3f8d47e0746099c088a0f60c5edadeef8 SHA512 fd1e3e9663e9a373a56ca2a4eac4599453df4645ebba96208d77de08510dfb6e8aff4bbed2ff147fd3c4ca357d34bf346736ff06f3fd920d0468b56c006c1186
-EBUILD chromium-134.0.6988.2.ebuild 54736 BLAKE2B 5c5aa77e347f4f8d6764c8091da6de4455cf0067081ac3a2258c5c23564d77a1e6d8c6cad64711815ec9b14c42690833d8459236393b8942cd00703e0ab4547c SHA512 e0f0f2e919c73fbf3bcf230a74d87ca49738e23778dae080c7dcfaf2970ed894ec1514ef2491d74b46eb0e128a243ae3fb59f7166e9ecbc565df45f60cd3c283
+EBUILD chromium-134.0.6998.3.ebuild 54108 BLAKE2B c0c04287e66666b0539068147eed1394963bad13aa6de420850c605fe2a39b9ffdb8caf7acccdabb1a146de87080f724f367513ff4a071469859be88f9b99947 SHA512 136d8b0f2aa1ee29a14bec0fc8cf7e0b564a645358d1a6f1a29263609fcc0ddf1b2dfa9c1676079dbac78050cac2056f68c30498292ceb86b9358abab99a42e5
MISC metadata.xml 2090 BLAKE2B 1dc2cb3c8aad13022f4ec8ccae5f87635a5a7846f5a06c797e816322ab33d9ef2629a3409612020e42f981391d41bb501297360d9f777afc81c9fe65078ef059 SHA512 d543d25b779ea63edc5f94e564c2e2c40760b76b933e6e090a6c8c70f71720cf2f764a1fdba3c75efabff8cb0119348665c06657fc38fae615bd20882a06e2e9
diff --git a/www-client/chromium/chromium-134.0.6988.2.ebuild b/www-client/chromium/chromium-134.0.6998.3.ebuild
index f1390c2b8256..677e09a21ccf 100644
--- a/www-client/chromium/chromium-134.0.6988.2.ebuild
+++ b/www-client/chromium/chromium-134.0.6998.3.ebuild
@@ -25,8 +25,9 @@ EAPI=8
GN_MIN_VER=0.2207
# chromium-tools/get-chromium-toolchain-strings.py
TEST_FONT=f26f29c9d3bfae588207bbc9762de8d142e58935c62a86f67332819b15203b35
-BUNDLED_CLANG_VER=llvmorg-20-init-17108-g29ed6000-1
+BUNDLED_CLANG_VER=llvmorg-20-init-17108-g29ed6000-3
BUNDLED_RUST_VER=ad211ced81509462cdfe4c29ed10f97279a0acae-1
+RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
VIRTUALX_REQUIRED="pgo"
@@ -54,9 +55,9 @@ SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}-linux.tar.xz
)
bundled-toolchain? (
https://gsdview.appspot.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
- -> chromium-${PV%%\.*}-clang.tar.xz
+ -> chromium-clang-${BUNDLED_CLANG_VER}.tar.xz
https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
- -> chromium-${PV%%\.*}-rust.tar.xz
+ -> chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz
)
test? (
https://chromium-tarballs.distfiles.gentoo.org/${P}-linux-testdata.tar.xz
@@ -68,7 +69,7 @@ SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}-linux.tar.xz
pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )"
LICENSE="BSD"
-SLOT="0/dev"
+SLOT="0/beta"
# Dev exists mostly to give devs some breathing room for beta/stable releases;
# it shouldn't be keyworded but adventurous users can select it.
if [[ ${SLOT} != "0/dev" ]]; then
@@ -385,11 +386,12 @@ src_unpack() {
if use bundled-toolchain; then
einfo "Unpacking bundled Clang ..."
mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
- tar xf "${DISTDIR}/chromium-${PV%%\.*}-clang.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
+ tar xf "${DISTDIR}/chromium-clang-${BUNDLED_CLANG_VER}.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
einfo "Unpacking bundled Rust ..."
local rust_dir="${WORKDIR}/rust-toolchain"
- mkdir -p ${rust_dir} || die "Failed to create rust toolchain directory"
- tar xf "${DISTDIR}/chromium-${PV%%\.*}-rust.tar.xz" -C ${rust_dir} || die "Failed to unpack Rust"
+ mkdir -p "${rust_dir}" || die "Failed to create rust toolchain directory"
+ tar xf "${DISTDIR}/chromium-rust-toolchain-${RUST_SHORT_HASH}-${BUNDLED_CLANG_VER%-*}.tar.xz" -C "${rust_dir}" ||
+ die "Failed to unpack Rust"
fi
if use ppc64; then
@@ -407,6 +409,7 @@ src_prepare() {
"${FILESDIR}/chromium-111-InkDropHost-crash.patch"
"${FILESDIR}/chromium-131-unbundle-icu-target.patch"
"${FILESDIR}/chromium-134-oauth2-client-switches.patch"
+ "${FILESDIR}/chromium-134-bindgen-custom-toolchain.patch"
)
if use bundled-toolchain; then
@@ -429,18 +432,6 @@ src_prepare() {
cp "${WORKDIR}"/rust-toolchain/VERSION \
"${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
else
- # This patch breaks bundled-toolchain builds as the required path_suffix clearly differs
- # between the two. Probably just need to update the patch to gate updating this value on the 'unbundle'
- # toolchain? Alternative: move to chromium-patches, but this is probably something that we
- # can upstream, so let's try to do it properly. For now apply conditionally so that we have _a_ dev
- # channel ebuild.
- # Currently evaluates to:
- # `-resource-dir', `'../../third_party/llvm-build/Release+Asserts/include'`
- # This is correct if the first part of the concatenated variable points to /usr/lib/clang/<majver>
- # Correct for bundled toolchain is:
- # `-resource-dir', `'../../third_party/llvm-build/Release+Asserts/lib/clang/<majver>/include'`
- # TODO: fix before this leaves dev.
- PATCHES+=( "${FILESDIR}/chromium-132-bindgen-custom-toolchain.patch" )
# We don't need our toolchain patches if we're using the official toolchain
shopt -s globstar nullglob
# 130: moved the PPC64 patches into the chromium-patches repo
diff --git a/www-client/chromium/files/chromium-134-bindgen-custom-toolchain.patch b/www-client/chromium/files/chromium-134-bindgen-custom-toolchain.patch
new file mode 100644
index 000000000000..f5b0df87759b
--- /dev/null
+++ b/www-client/chromium/files/chromium-134-bindgen-custom-toolchain.patch
@@ -0,0 +1,123 @@
+From 04fe2f9010c2cc58eced407e6eb2124c67a60109 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kangie@gentoo.org>
+Date: Thu, 6 Feb 2025 11:40:08 +1000
+Subject: [PATCH] Make bindgen wrapper work with unbundled toolchain
+
+The `run_bindgen.py` wrapper takes a --libclang-path option
+and uses it to set the appropriate environment variable.
+
+This is currently hardcoded to use libclang shipped alongside
+bindgen (in our rust toolchain), but distributions may want to
+override this and use a system path.
+
+Additionally enable distros to feed in appropriate library paths.
+---
+ build/config/rust.gni | 11 +++++++++++
+ build/rust/rust_bindgen.gni | 12 ++++++------
+ build/rust/rust_bindgen_generator.gni | 22 ++++++++++++++++++----
+ 3 files changed, 35 insertions(+), 10 deletions(-)
+
+diff --git a/build/config/rust.gni b/build/config/rust.gni
+index 5b9e3e1e65..1e93be41ff 100644
+--- a/build/config/rust.gni
++++ b/build/config/rust.gni
+@@ -64,6 +64,17 @@ declare_args() {
+ # the bindgen exectuable).
+ rust_bindgen_root = "//third_party/rust-toolchain"
+
++ # Directory under which to find one of `libclang.{dll,so}` (a `lib[64]` or
++ # `bin` directory containing the libclang shared library).
++ # We don't need to worry about multlib, but specify the full path here
++ # in case a distribution does.
++ if (host_os == "win") {
++ bindgen_libclang_path = "//third_party/rust-toolchain/bin"
++ } else {
++ bindgen_libclang_path = "//third_party/rust-toolchain/lib"
++ }
++
++
+ # If you're using a Rust toolchain as specified by rust_sysroot_absolute,
+ # set this to the output of `rustc -V`. Changing this string will cause all
+ # Rust targets to be rebuilt, which allows you to update your toolchain and
+diff --git a/build/rust/rust_bindgen.gni b/build/rust/rust_bindgen.gni
+index 5c809c6932..a493daa909 100644
+--- a/build/rust/rust_bindgen.gni
++++ b/build/rust/rust_bindgen.gni
+@@ -17,13 +17,13 @@ if (host_os == "win") {
+ _bindgen_path = "${_bindgen_path}.exe"
+ }
+
+-# On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
+-# ../lib.
+-_libclang_path = rust_bindgen_root
+-if (host_os == "win") {
+- _libclang_path += "/bin"
++if (clang_base_path != default_clang_base_path && custom_toolchain == "//build/toolchain/linux/unbundle:default") {
++ # Assume that the user has set this up properly, including handling multilib
++ _clang_libpath = clang_base_path + "/include"
++ _clang_ld_libpath = bindgen_libclang_path
+ } else {
+- _libclang_path += "/lib"
++ _clang_libpath = clang_base_path + "/lib/clang/" + clang_version
++ _clang_ld_libpath = clang_base_path + "/lib"
+ }
+
+ # Template to build Rust/C bindings with bindgen.
+diff --git a/build/rust/rust_bindgen_generator.gni b/build/rust/rust_bindgen_generator.gni
+index c91916be93..6afbef2f31 100644
+--- a/build/rust/rust_bindgen_generator.gni
++++ b/build/rust/rust_bindgen_generator.gni
+@@ -151,7 +151,7 @@ template("rust_bindgen_generator") {
+ "--output",
+ rebase_path(output_file, root_build_dir),
+ "--libclang-path",
+- rebase_path(_libclang_path, root_build_dir),
++ rebase_path(bindgen_libclang_path, root_build_dir),
+ ]
+
+ if (_wrap_static_fns) {
+@@ -172,7 +172,7 @@ template("rust_bindgen_generator") {
+ # point to.
+ args += [
+ "--ld-library-path",
+- rebase_path(clang_base_path + "/lib", root_build_dir),
++ rebase_path(bindgen_libclang_path, root_build_dir),
+ ]
+ }
+
+@@ -215,9 +215,14 @@ template("rust_bindgen_generator") {
+ # says the wrong thing. We point it to our clang's resource dir which will
+ # make it behave consistently with our other command line flags and allows
+ # system headers to be found.
+- clang_resource_dir =
+- rebase_path(clang_base_path + "/lib/clang/" + clang_version,
++ if (clang_base_path != default_clang_base_path && custom_toolchain == "//build/toolchain/linux/unbundle:default") {
++ clang_resource_dir =
++ rebase_path(clang_base_path + "/include", root_build_dir)
++ } else {
++ clang_resource_dir =
++ rebase_path(clang_base_path + "/lib/clang/" + clang_version,
+ root_build_dir)
++ }
+ args += [
+ "-resource-dir",
+ clang_resource_dir,
+@@ -238,6 +243,15 @@ template("rust_bindgen_generator") {
+ }
+ }
+
++ if (custom_toolchain == "//build/toolchain/linux/unbundle:default") {
++ # We need to pass the path to the libstdc++ headers to bindgen so that it
++ # can find them when parsing C++ headers.
++ args += [
++ "-I",
++ rebase_path(clang_base_path + "/include/", root_build_dir),
++ ]
++ }
++
+ if (is_win) {
+ # On Windows we fall back to using system headers from a sysroot from
+ # depot_tools. This is negotiated by python scripts and the result is
+--
+2.48.0
+