about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-04-22 18:35:18 -0700
committerAdam Joseph <adam@westernsemico.com>2023-04-22 18:41:35 -0700
commit954e7dc3d1bd11001d4edc995f8980adf33d85db (patch)
tree10f7844608c0d10012f8c919c26a8958a76c7abd /pkgs
parentf6f7b673d451c4f320a5dd52dc1da67f3b587833 (diff)
chromium: (cross) strip aarch64-linux-gnu- toolprefix only for native builds
Our existing chromium expression strips the `aarch64-linux-gnu-`
prefix off of toolchain names (like `aarch64-linux-gnu-gcc`) for all
`Aarch64` builds.  But when we are doing a cross compile *to* an
`Aarch64` hostPlatform we need to leave those prefixes in place.

This commit makes the prefix-stripping conditional on the build
being a native build.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index e6dcf83e3f3ed..0840fd079e7c7 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -239,7 +239,7 @@ let
       # Allow building against system libraries in official builds
       sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' tools/generate_shim_headers/generate_shim_headers.py
 
-    '' + lib.optionalString stdenv.isAarch64 ''
+    '' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch64) ''
       substituteInPlace build/toolchain/linux/BUILD.gn \
         --replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""'
     '' + lib.optionalString ungoogled ''