1{ lib
2, stdenv
3, llvm_meta
4, src
5, cmake
6, llvm
7, perl
8, version
9}:
10
11stdenv.mkDerivation rec {
12 pname = "openmp";
13 inherit version;
14
15 inherit src;
16 sourceRoot = "source/${pname}";
17
18 nativeBuildInputs = [ cmake perl ];
19 buildInputs = [ llvm ];
20
21 cmakeFlags = [
22 "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" # Building the AMDGCN device RTL currently fails
23 ];
24
25 meta = llvm_meta // {
26 homepage = "https://openmp.llvm.org/";
27 description = "Support for the OpenMP language";
28 longDescription = ''
29 The OpenMP subproject of LLVM contains the components required to build an
30 executable OpenMP program that are outside the compiler itself.
31 Contains the code for the runtime library against which code compiled by
32 "clang -fopenmp" must be linked before it can run and the library that
33 supports offload to target devices.
34 '';
35 # "All of the code is dual licensed under the MIT license and the UIUC
36 # License (a BSD-like license)":
37 license = with lib.licenses; [ mit ncsa ];
38 };
39}