anchor.diff:      substituteInPlace unittests/Support/CMakeLists.txt \
         --replace "Path.cpp" ""
       rm unittests/Support/Path.cpp
  -  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
  +  '' + optionalString stdenv.hostPlatform.isMusl ''
       patch -p1 -i ${../TLI-musl.patch}
       substituteInPlace unittests/Support/CMakeLists.txt \
         --replace "add_subdirectory(DynamicLibrary)" ""
  
positive.code:     "-DLLVM_ENABLE_RTTI=ON"
      "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
      "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
      "-DLLVM_TARGETS_TO_BUILD=${llvmBackendList targets}"
  
      "-DLLVM_ENABLE_DUMP=ON"
    ]
    ++ stdenv.lib.optional enableSharedLibraries
      "-DLLVM_LINK_LLVM_DYLIB=ON"
    ++ stdenv.lib.optionals enableManpages [
      "-DLLVM_BUILD_DOCS=ON"
      "-DLLVM_ENABLE_SPHINX=ON"
      "-DSPHINX_OUTPUT_MAN=ON"
      "-DSPHINX_OUTPUT_HTML=OFF"
      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
    ]
    ++ stdenv.lib.optional (!isDarwin)
      "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
    ++ stdenv.lib.optionals (isDarwin) [
      "-DLLVM_ENABLE_LIBCXX=ON"
      "-DCAN_TARGET_i386=false"
    ]
    ++ stdenv.lib.optional enableWasm
     "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
    ;
  
    postBuild = ''
      rm -fR $out
  
negative.code:     mkdir -p $python/share
      mv $out/share/opt-viewer $python/share/opt-viewer
    ''
    + optionalString enableSharedLibraries ''
      moveToOutput "lib/libLLVM-*" "$lib"
      moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
      substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
        --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
    ''
    + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
      substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
        --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
      ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
  