anchor.diff:    postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
       substituteInPlace cmake/config-ix.cmake \
         --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
  -  '' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
  +  '' + stdenv.lib.optionalString (useLLVM) ''
       substituteInPlace lib/builtins/int_util.c \
         --replace "#include <stdlib.h>" ""
       substituteInPlace lib/builtins/clear_cache.c \
  
positive.code:   # Hack around weird upsream RPATH bug
    postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
      ln -s "$out/lib"/*/* "$out/lib"
    '' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
      ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
      ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
      ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
  
negative.code: { stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
  
  let
  
    useLLVM = stdenv.hostPlatform.useLLVM or false;
    bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
    inherit (stdenv.hostPlatform) isMusl;
  
  in
  
  stdenv.mkDerivation rec {
    pname = "compiler-rt";
    inherit version;
  