anchor.diff:      mkdir -p $python/share
       mv $out/share/opt-viewer $python/share/opt-viewer
     ''
  -  + stdenv.lib.optionalString enableSharedLibraries ''
  +  + 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-"
     ''
  -  + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
  +  + 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
  
positive.code:     "-DLLVM_BUILD_TESTS=ON"
      "-DLLVM_ENABLE_FFI=ON"
      "-DLLVM_ENABLE_RTTI=ON"
  
      "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
      "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
      "-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
  
      "-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:     substituteInPlace unittests/Support/CMakeLists.txt \
        --replace "Path.cpp" ""
      rm unittests/Support/Path.cpp
    '' + optionalString stdenv.hostPlatform.isMusl ''
      patch -p1 -i ${../TLI-musl.patch}
      substituteInPlace unittests/Support/CMakeLists.txt \
        --replace "add_subdirectory(DynamicLibrary)" ""
  