diff options
Diffstat (limited to 'pkgs/development/rocm-modules/6/llvm/stage-3/openmp.nix')
-rw-r--r-- | pkgs/development/rocm-modules/6/llvm/stage-3/openmp.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/development/rocm-modules/6/llvm/stage-3/openmp.nix b/pkgs/development/rocm-modules/6/llvm/stage-3/openmp.nix new file mode 100644 index 000000000000..5fd7b6fd9aa3 --- /dev/null +++ b/pkgs/development/rocm-modules/6/llvm/stage-3/openmp.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, callPackage +, rocmUpdateScript +, llvm +, clang +, clang-unwrapped +, rocm-device-libs +, rocm-runtime +, rocm-thunk +, perl +, elfutils +, libdrm +, numactl +, lit +}: + +callPackage ../base.nix rec { + inherit stdenv rocmUpdateScript; + targetName = "openmp"; + targetDir = targetName; + extraNativeBuildInputs = [ perl ]; + + extraBuildInputs = [ + rocm-device-libs + rocm-runtime + rocm-thunk + elfutils + libdrm + numactl + ]; + + extraCMakeFlags = [ + "-DCMAKE_MODULE_PATH=/build/source/llvm/cmake/modules" # For docs + "-DCLANG_TOOL=${clang}/bin/clang" + "-DCLANG_OFFLOAD_BUNDLER_TOOL=${clang-unwrapped}/bin/clang-offload-bundler" + "-DPACKAGER_TOOL=${clang-unwrapped}/bin/clang-offload-packager" + "-DOPENMP_LLVM_TOOLS_DIR=${llvm}/bin" + "-DOPENMP_LLVM_LIT_EXECUTABLE=${lit}/bin/.lit-wrapped" + "-DDEVICELIBS_ROOT=${rocm-device-libs.src}" + ]; + + extraPostPatch = '' + # We can't build this target at the moment + substituteInPlace libomptarget/DeviceRTL/CMakeLists.txt \ + --replace "gfx1010" "" + + # No idea what's going on here... + cat ${./1000-openmp-failing-tests.list} | xargs -d \\n rm + ''; + + checkTargets = [ "check-${targetName}" ]; + extraLicenses = [ lib.licenses.mit ]; +} |