summary refs log tree commit diff
diff options
context:
space:
mode:
authorAnthony Cowley <acowley@gmail.com>2017-04-28 21:30:55 -0400
committerAnthony Cowley <acowley@gmail.com>2017-04-28 21:30:55 -0400
commit0059131f54c82e7714d458c0b17335c3364033a4 (patch)
treedf4d62ebbbc17d909f2d666cada7f96a643130e8
parentce6eb0cbbe5398329a490b54dc2d259d9d48007b (diff)
downloadnixpkgs-0059131f54c82e7714d458c0b17335c3364033a4.tar
nixpkgs-0059131f54c82e7714d458c0b17335c3364033a4.tar.gz
nixpkgs-0059131f54c82e7714d458c0b17335c3364033a4.tar.bz2
nixpkgs-0059131f54c82e7714d458c0b17335c3364033a4.tar.lz
nixpkgs-0059131f54c82e7714d458c0b17335c3364033a4.tar.xz
nixpkgs-0059131f54c82e7714d458c0b17335c3364033a4.tar.zst
nixpkgs-0059131f54c82e7714d458c0b17335c3364033a4.zip
llvm: Add the LLVM OpenMP components
Needed to build an executable that uses OpenMP with clang. This
includes a header file and a library that clang will link into an
executable whose source makes use of ‘omp‘ pragmas.
-rw-r--r--pkgs/development/compilers/llvm/4/default.nix2
-rw-r--r--pkgs/development/compilers/llvm/4/openmp.nix25
2 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/4/default.nix b/pkgs/development/compilers/llvm/4/default.nix
index 4be621adb5c..15918f9c1eb 100644
--- a/pkgs/development/compilers/llvm/4/default.nix
+++ b/pkgs/development/compilers/llvm/4/default.nix
@@ -24,6 +24,8 @@ let
 
     clang = wrapCC self.clang-unwrapped;
 
+    openmp = callPackage ./openmp.nix {};
+
     libcxxClang = ccWrapperFun {
       cc = self.clang-unwrapped;
       isClang = true;
diff --git a/pkgs/development/compilers/llvm/4/openmp.nix b/pkgs/development/compilers/llvm/4/openmp.nix
new file mode 100644
index 00000000000..c8ba770e241
--- /dev/null
+++ b/pkgs/development/compilers/llvm/4/openmp.nix
@@ -0,0 +1,25 @@
+{ stdenv
+, fetch
+, cmake
+, zlib
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  name = "openmp-${version}";
+
+  src = fetch "openmp" "09kf41zgv551fnv628kqhlwgqkd2bkiwii9gqi6q12djgdddhmfv";
+
+  buildInputs = [ cmake llvm perl ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Components required to build an executable OpenMP program";
+    homepage    = http://openmp.llvm.org/;
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}