about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix20
1 files changed, 18 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix
index 705c5994bd14..a14823571e17 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
 
 let
 
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
   inherit version;
   src = fetch "compiler-rt" "0ipd4jdxpczgr2w6lzrabymz6dhzj69ywmyybjjc1q397zgrvziy";
 
-  nativeBuildInputs = [ cmake python3 llvm ];
+  nativeBuildInputs = [ cmake python3 llvm.dev ];
   buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
 
   NIX_CFLAGS_COMPILE = [
@@ -54,6 +54,7 @@ stdenv.mkDerivation {
     ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
     # https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce
     ../../common/compiler-rt/glibc.patch
+    ./gnu-install-dirs.patch
   ] ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
     ++ lib.optional (stdenv.hostPlatform.libc == "glibc") ./sys-ustat.patch
     ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
@@ -85,4 +86,19 @@ stdenv.mkDerivation {
     ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/crtendS.o
   '';
 
+  meta = llvm_meta // {
+    homepage = "https://compiler-rt.llvm.org/";
+    description = "Compiler runtime libraries";
+    longDescription = ''
+      The compiler-rt project provides highly tuned implementations of the
+      low-level code generator support routines like "__fixunsdfdi" and other
+      calls generated when a target doesn't have a short sequence of native
+      instructions to implement a core IR operation. It also provides
+      implementations of run-time libraries for dynamic testing tools such as
+      AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+    '';
+    # "All of the code in the compiler-rt project is dual licensed under the MIT
+    # license and the UIUC License (a BSD-like license)":
+    license = with lib.licenses; [ mit ncsa ];
+  };
 }