diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-04-15 18:13:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 18:13:27 +0000 |
commit | dfd4f1430301305a0c543f034a95aaae6e3ce09d (patch) | |
tree | e451a4f3f1defad8765a1bdcee54846f014741fd /pkgs/development/compilers/llvm/12/lld/default.nix | |
parent | 80e725f3dc9daff0b720b4cb7d7088cdc65e015d (diff) | |
parent | bc5c0c559f1c93ccea9a7f21066b6314831bea3d (diff) | |
download | nixlib-dfd4f1430301305a0c543f034a95aaae6e3ce09d.tar nixlib-dfd4f1430301305a0c543f034a95aaae6e3ce09d.tar.gz nixlib-dfd4f1430301305a0c543f034a95aaae6e3ce09d.tar.bz2 nixlib-dfd4f1430301305a0c543f034a95aaae6e3ce09d.tar.lz nixlib-dfd4f1430301305a0c543f034a95aaae6e3ce09d.tar.xz nixlib-dfd4f1430301305a0c543f034a95aaae6e3ce09d.tar.zst nixlib-dfd4f1430301305a0c543f034a95aaae6e3ce09d.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/development/compilers/llvm/12/lld/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/12/lld/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/12/lld/default.nix b/pkgs/development/compilers/llvm/12/lld/default.nix new file mode 100644 index 000000000000..18b72a904071 --- /dev/null +++ b/pkgs/development/compilers/llvm/12/lld/default.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, llvm_meta +, fetch +, libunwind +, cmake +, libxml2 +, llvm +, version +}: + +stdenv.mkDerivation rec { + pname = "lld"; + inherit version; + + src = fetch pname "1zakyxk5bwnh7jarckcd4rbmzi58jgn2dbah5j5cwcyfyfbx9drc"; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ llvm libxml2 ]; + + postPatch = '' + substituteInPlace MachO/CMakeLists.txt --replace \ + '(''${LLVM_MAIN_SRC_DIR}/' '(' + mkdir -p libunwind/include + tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/" + ''; + + outputs = [ "out" "dev" ]; + + postInstall = '' + moveToOutput include "$dev" + moveToOutput lib "$dev" + ''; + + meta = llvm_meta // { + homepage = "https://lld.llvm.org/"; + description = "The LLVM linker"; + longDescription = '' + LLD is a linker from the LLVM project that is a drop-in replacement for + system linkers and runs much faster than them. It also provides features + that are useful for toolchain developers. + The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS) and + WebAssembly in descending order of completeness. Internally, LLD consists + of several different linkers. + ''; + }; +} |