anchor.diff:  , version
   , release_version
   , zlib
  +, buildPackages
  +, fetchpatch
   , debugVersion ? false
   , enableManpages ? false
  +, enableTargets ? [ stdenv.hostPlatform stdenv.targetPlatform ]
   , enableSharedLibraries ? true
  -, enableWasm ? true
   }:
   
   let
  +  inherit (stdenv.lib) optional optionals optionalString;
  +
     src = fetch "llvm" "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn";
   
     # Used when creating a version-suffixed symlink of libLLVM.dylib
     shortVersion = with stdenv.lib;
       concatStringsSep "." (take 2 (splitString "." release_version));
  +
  +  inherit
  +    (import ../common.nix { inherit (stdenv) lib; })
  +    llvmBackendList;
  +
   in stdenv.mkDerivation (rec {
     name = "llvm-${version}";
   
  
positive.code:     mkdir -p $python/share
      mv $out/share/opt-viewer $python/share/opt-viewer
    ''
    + stdenv.lib.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) ''
      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
  
negative.code:     "-DLLVM_BUILD_TESTS=ON"
      "-DLLVM_ENABLE_FFI=ON"
      "-DLLVM_ENABLE_RTTI=ON"
      "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
      "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
      "-DLLVM_TARGETS_TO_BUILD=${llvmBackendList enableTargets}"
      "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
      "-DLLVM_ENABLE_DUMP=ON"
    ] ++ optionals enableSharedLibraries [
      "-DLLVM_LINK_LLVM_DYLIB=ON"
    ] ++ optionals enableManpages [
      "-DLLVM_BUILD_DOCS=ON"
      "-DLLVM_ENABLE_SPHINX=ON"
      "-DSPHINX_OUTPUT_MAN=ON"
      "-DSPHINX_OUTPUT_HTML=OFF"
      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
    ] ++ optionals (!isDarwin) [
      "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
    ] ++ optionals (isDarwin) [
      "-DLLVM_ENABLE_LIBCXX=ON"
      "-DCAN_TARGET_i386=false"
    ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
      "-DCMAKE_CROSSCOMPILING=True"
      "-DLLVM_TABLEGEN=${buildPackages.llvm_6}/bin/llvm-tblgen"
    ];
  
    postBuild = ''
      rm -fR $out
  