diff options
Diffstat (limited to 'pkgs/development/rocm-modules/6/llvm/base.nix')
-rw-r--r-- | pkgs/development/rocm-modules/6/llvm/base.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/development/rocm-modules/6/llvm/base.nix b/pkgs/development/rocm-modules/6/llvm/base.nix index 95f57b052045e..88b384b43d8e6 100644 --- a/pkgs/development/rocm-modules/6/llvm/base.nix +++ b/pkgs/development/rocm-modules/6/llvm/base.nix @@ -72,7 +72,9 @@ in stdenv.mkDerivation (finalAttrs: { "info" # Avoid `attribute 'info' missing` when using with wrapCC ]; - patches = extraPatches; + patches = [ + ./add-compression-to-clang-offload-bundler.patch + ] ++ extraPatches; src = fetchFromGitHub { owner = "ROCm"; @@ -133,7 +135,14 @@ in stdenv.mkDerivation (finalAttrs: { "-DLLVM_EXTERNAL_LIT=${lit}/bin/.lit-wrapped" ] ++ extraCMakeFlags; - postPatch = lib.optionalString finalAttrs.passthru.isLLVM '' + prePatch = '' + cd ../ + chmod -R u+w . + ''; + + postPatch = '' + cd ${targetDir} + '' + lib.optionalString finalAttrs.passthru.isLLVM '' patchShebangs lib/OffloadArch/make_generated_offload_arch_h.sh '' + lib.optionalString (buildTests && finalAttrs.passthru.isLLVM) '' # FileSystem permissions tests fail with various special bits @@ -141,7 +150,7 @@ in stdenv.mkDerivation (finalAttrs: { rm unittests/Support/Path.cpp substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "Path.cpp" "" + --replace-fail "Path.cpp" "" '' + extraPostPatch; doCheck = buildTests; |