about summary refs log tree commit diff
path: root/pkgs/test/cc-wrapper
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2022-12-02 14:22:33 +0800
committerRick van Schijndel <Mindavi@users.noreply.github.com>2022-12-25 09:19:28 +0100
commit42cd6aebe4465564b0fff7fdc19cc7daed0380e1 (patch)
tree59aea05ee42f841a07d3a26384767f05a44cbb7d /pkgs/test/cc-wrapper
parent8643dbc57e2d529eb4020b10d590ca3019e83d7c (diff)
cc-wrapper-test: do not test sanitizers when cross compiling
Diffstat (limited to 'pkgs/test/cc-wrapper')
-rw-r--r--pkgs/test/cc-wrapper/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix
index 57fb49828e964..b7c99cd5c87f0 100644
--- a/pkgs/test/cc-wrapper/default.nix
+++ b/pkgs/test/cc-wrapper/default.nix
@@ -3,7 +3,7 @@
 let
   # Sanitizers are not supported on Darwin.
   # Sanitizer headers aren't available in older libc++ stdenvs due to a bug
-  sanitizersWorking = !stdenv.isDarwin && !stdenv.hostPlatform.isMusl && (
+  sanitizersWorking = (stdenv.buildPlatform == stdenv.hostPlatform) && !stdenv.isDarwin && !stdenv.hostPlatform.isMusl && (
     (stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc.name) "5.0.0")
     || (stdenv.cc.isGNU && stdenv.isLinux)
   );