diff options
Diffstat (limited to 'pkgs/test/cc-wrapper/default.nix')
-rw-r--r-- | pkgs/test/cc-wrapper/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix index 7bd82b4ab2a5..c0c89d63ffff 100644 --- a/pkgs/test/cc-wrapper/default.nix +++ b/pkgs/test/cc-wrapper/default.nix @@ -45,6 +45,14 @@ in stdenv.mkDerivation { NIX_LDFLAGS="-L$NIX_BUILD_TOP/foo/lib -rpath $NIX_BUILD_TOP/foo/lib" $CC -lfoo -o ldflags-check ${./ldflags-main.c} ./ldflags-check + printf "Check whether -nostdinc and -nostdinc++ is handled correctly" >&2 + mkdir -p std-include + cp ${./stdio.h} std-include/stdio.h + NIX_DEBUG=1 $CC -I std-include -nostdinc -o nostdinc-main ${./nostdinc-main.c} + ./nostdinc-main + $CXX -I std-include -nostdinc++ -o nostdinc-main++ ${./nostdinc-main.c} + ./nostdinc-main++ + ${optionalString sanitizersWorking '' printf "checking whether sanitizers are fully functional... ">&2 $CC -o sanitizers -fsanitize=address,undefined ${./sanitizers.c} |