diff --git a/pkgs/development/compilers/llvm/common/clang/default.nix b/pkgs/development/compilers/llvm/common/clang/default.nix index e597ec4d604b..dc175e085f0b 100644 --- a/pkgs/development/compilers/llvm/common/clang/default.nix +++ b/pkgs/development/compilers/llvm/common/clang/default.nix @@ -198,7 +198,7 @@ let ''; }) // (lib.optionalAttrs (lib.versionAtLeast release_version "15") { - env = lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) { + env = lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform && !stdenv.hostPlatform.useLLVM) { # The following warning is triggered with (at least) gcc >= # 12, but appears to occur only for cross compiles. NIX_CFLAGS_COMPILE = "-Wno-maybe-uninitialized";