542575ad48
This also fixes the libunwind build (even with GCC 11 it fails with): /build/source/libunwind/src/libunwind.cpp:19:5: warning: "__has_feature" is not defined, evaluates to 0 [-Wundef] 19 | #if __has_feature(address_sanitizer) | ^~~~~~~~~~~~~ /build/source/libunwind/src/libunwind.cpp:19:18: error: missing binary operator before token "(" 19 | #if __has_feature(address_sanitizer) | ^ And the openmp build which failed with this error: /nix/store/a4yw1svqqk4d8lhwinn9xp847zz9gfma-bash-4.4-p23/bin/bash: CLANG_TOOL-NOTFOUND: command not found /nix/store/a4yw1svqqk4d8lhwinn9xp847zz9gfma-bash-4.4-p23/bin/bash: CLANG_TOOL-NOTFOUND: command not found make[2]: *** [libomptarget/deviceRTLs/amdgcn/CMakeFiles/libomptarget-amdgcn-gfx906.dir/build.make:307: libomptarget/deviceRTLs/amdgcn/task.gfx906.bc] Error 127 make[2]: *** [libomptarget/deviceRTLs/amdgcn/CMakeFiles/libomptarget-amdgcn-gfx900.dir/build.make:307: libomptarget/deviceRTLs/amdgcn/task.gfx900.bc] Error 127
39 lines
1 KiB
Nix
39 lines
1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, llvm_meta
|
|
, src
|
|
, cmake
|
|
, llvm
|
|
, perl
|
|
, version
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "openmp";
|
|
inherit version;
|
|
|
|
inherit src;
|
|
sourceRoot = "source/${pname}";
|
|
|
|
nativeBuildInputs = [ cmake perl ];
|
|
buildInputs = [ llvm ];
|
|
|
|
cmakeFlags = [
|
|
"-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" # Building the AMDGCN device RTL currently fails
|
|
];
|
|
|
|
meta = llvm_meta // {
|
|
homepage = "https://openmp.llvm.org/";
|
|
description = "Support for the OpenMP language";
|
|
longDescription = ''
|
|
The OpenMP subproject of LLVM contains the components required to build an
|
|
executable OpenMP program that are outside the compiler itself.
|
|
Contains the code for the runtime library against which code compiled by
|
|
"clang -fopenmp" must be linked before it can run and the library that
|
|
supports offload to target devices.
|
|
'';
|
|
# "All of the code is dual licensed under the MIT license and the UIUC
|
|
# License (a BSD-like license)":
|
|
license = with lib.licenses; [ mit ncsa ];
|
|
};
|
|
}
|