Loading pkgs/development/rocm-modules/6/llvm/default.nix +70 −88 Original line number Diff line number Diff line Loading @@ -212,13 +212,6 @@ let echo 'export CC=clang' >> $out/nix-support/setup-hook echo 'export CXX=clang++' >> $out/nix-support/setup-hook ''; # Removes patches which either aren't desired, or don't apply against ROCm LLVM removeInapplicablePatches = x: ( (lib.strings.hasSuffix "add-nostdlibinc-flag.patch" (baseNameOf x)) || (lib.strings.hasSuffix "clang-at-least-16-LLVMgold-path.patch" (baseNameOf x)) ); tablegenUsage = x: !(lib.strings.hasInfix "llvm-tblgen" x); llvmTargetsFlag = "-DLLVM_TARGETS_TO_BUILD=AMDGPU;${ { Loading Loading @@ -354,12 +347,7 @@ overrideLlvmPackagesRocm (s: { (s.prev.clang-unwrapped.override { enableClangToolsExtra = false; }).overrideAttrs ( old: let filteredPatches = builtins.filter (x: !(removeInapplicablePatches x)) old.patches; in { (old: { passthru = old.passthru // { inherit gcc-prefix; }; Loading @@ -372,7 +360,7 @@ overrideLlvmPackagesRocm (s: { relative = "clang"; }) ] ++ filteredPatches ++ old.patches ++ [ # Never add FHS include paths ./clang-bodge-ignore-systemwide-incls.diff Loading @@ -387,11 +375,6 @@ overrideLlvmPackagesRocm (s: { url = "https://github.com/GZGavinZhao/rocm-llvm-project/commit/6d296f879b0fed830c54b2a9d26240da86c8bb3a.patch"; relative = "clang"; }) # FIXME: Temporarily kept for rebuild avoidance # Should be dropped in followup and we no longer need to filter out the original application (replaceVars ./../../../compilers/llvm/common/clang/clang-at-least-16-LLVMgold-path.patch { libllvmLibdir = "${s.final.libllvm.lib}/lib"; }) ]; hardeningDisable = [ "all" ]; nativeBuildInputs = old.nativeBuildInputs ++ [ Loading Loading @@ -434,8 +417,7 @@ overrideLlvmPackagesRocm (s: { find $dev -type f -exec remove-references-to -t ${refsToRemove} {} + ''; meta = old.meta // llvmMeta; } ) }) ); # A clang that understands standard include searching in a GNU sysroot and will put GPU libs in include path # in the right order Loading Loading
pkgs/development/rocm-modules/6/llvm/default.nix +70 −88 Original line number Diff line number Diff line Loading @@ -212,13 +212,6 @@ let echo 'export CC=clang' >> $out/nix-support/setup-hook echo 'export CXX=clang++' >> $out/nix-support/setup-hook ''; # Removes patches which either aren't desired, or don't apply against ROCm LLVM removeInapplicablePatches = x: ( (lib.strings.hasSuffix "add-nostdlibinc-flag.patch" (baseNameOf x)) || (lib.strings.hasSuffix "clang-at-least-16-LLVMgold-path.patch" (baseNameOf x)) ); tablegenUsage = x: !(lib.strings.hasInfix "llvm-tblgen" x); llvmTargetsFlag = "-DLLVM_TARGETS_TO_BUILD=AMDGPU;${ { Loading Loading @@ -354,12 +347,7 @@ overrideLlvmPackagesRocm (s: { (s.prev.clang-unwrapped.override { enableClangToolsExtra = false; }).overrideAttrs ( old: let filteredPatches = builtins.filter (x: !(removeInapplicablePatches x)) old.patches; in { (old: { passthru = old.passthru // { inherit gcc-prefix; }; Loading @@ -372,7 +360,7 @@ overrideLlvmPackagesRocm (s: { relative = "clang"; }) ] ++ filteredPatches ++ old.patches ++ [ # Never add FHS include paths ./clang-bodge-ignore-systemwide-incls.diff Loading @@ -387,11 +375,6 @@ overrideLlvmPackagesRocm (s: { url = "https://github.com/GZGavinZhao/rocm-llvm-project/commit/6d296f879b0fed830c54b2a9d26240da86c8bb3a.patch"; relative = "clang"; }) # FIXME: Temporarily kept for rebuild avoidance # Should be dropped in followup and we no longer need to filter out the original application (replaceVars ./../../../compilers/llvm/common/clang/clang-at-least-16-LLVMgold-path.patch { libllvmLibdir = "${s.final.libllvm.lib}/lib"; }) ]; hardeningDisable = [ "all" ]; nativeBuildInputs = old.nativeBuildInputs ++ [ Loading Loading @@ -434,8 +417,7 @@ overrideLlvmPackagesRocm (s: { find $dev -type f -exec remove-references-to -t ${refsToRemove} {} + ''; meta = old.meta // llvmMeta; } ) }) ); # A clang that understands standard include searching in a GNU sysroot and will put GPU libs in include path # in the right order Loading