cc-wrapper-test: do not test sanitizers when cross compiling

This commit is contained in:
Nick Cao 2022-12-02 14:22:33 +08:00 committed by Rick van Schijndel
parent 8643dbc57e
commit 42cd6aebe4

View file

@ -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)
);