anchor.diff:      printf "checking whether compiler uses NIX_LDFLAGS... " >&2
       mkdir -p foo/lib
       $CC -shared \
  -      ${stdenv.lib.optionalString stdenv.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \
  +      ${optionalString stdenv.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \
         -DVALUE=42 \
         -o foo/lib/libfoo${stdenv.hostPlatform.extensions.sharedLibrary} \
         ${./foo.c}
  
positive.code:     $CXX -o cxx-check ${./cxx-main.cc}
      ./cxx-check
  
      ${stdenv.lib.optionalString (stdenv.isDarwin && stdenv.cc.isClang) ''
        printf "checking whether compiler can build with CoreFoundation.framework... " >&2
        mkdir -p foo/lib
        $CC -framework CoreFoundation -o core-foundation-check ${./core-foundation-main.c}
  
negative.code: { stdenv }:
  with stdenv.lib;
  let
    # Sanitizer headers aren't available in older libc++ stdenvs due to a bug
    sanitizersBroken = stdenv.cc.isClang && builtins.compareVersions (getVersion stdenv.cc.name) "6.0.0" < 0;
  in stdenv.mkDerivation {
    name = "cc-wrapper-test";
  
    buildCommand = ''
  