diff options
author | 2021-01-19 22:34:10 +0800 | |
---|---|---|
committer | 2021-01-20 12:51:53 +0800 | |
commit | 1ec9b7d4bb0cce7a501686733565b0221ee1db69 (patch) | |
tree | 11f4ec8586a7aa4c7e56754e612e97943f8fa1e1 /sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch | |
parent | dev-util/hip: replace hcc with rocclr. (diff) | |
download | gentoo-1ec9b7d4bb0cce7a501686733565b0221ee1db69.tar.gz gentoo-1ec9b7d4bb0cce7a501686733565b0221ee1db69.tar.bz2 gentoo-1ec9b7d4bb0cce7a501686733565b0221ee1db69.zip |
sys-devel/llvm-roc: replace HIP finder with Gentoo paths.
remove isystem include path.
Set USE=runtime as default.
Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Suggested-by: Wilfried Holzke <gentoo@holzke.net>
Reference: https://github.com/justxi/rocm/issues/174#issuecomment-749479598
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch')
-rw-r--r-- | sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch new file mode 100644 index 00000000000..f14ec4ac0db --- /dev/null +++ b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch @@ -0,0 +1,29 @@ +Author: Wilfried (justxi) Holzke + +Adopted from https://github.com/justxi/rocm/blob/master/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch + +Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp +=================================================================== +--- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp ++++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp +@@ -326,11 +326,6 @@ void RocmInstallationDetector::AddHIPInc + // + // ROCm 3.5 does not fully support the wrapper headers. Therefore it needs + // a workaround. +- SmallString<128> P(D.ResourceDir); +- if (UsesRuntimeWrapper) +- llvm::sys::path::append(P, "include", "cuda_wrappers"); +- CC1Args.push_back("-internal-isystem"); +- CC1Args.push_back(DriverArgs.MakeArgString(P)); + } + + if (DriverArgs.hasArg(options::OPT_nogpuinc)) +@@ -341,8 +336,6 @@ void RocmInstallationDetector::AddHIPInc + return; + } + +- CC1Args.push_back("-internal-isystem"); +- CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath())); + if (UsesRuntimeWrapper) + CC1Args.append({"-include", "__clang_hip_runtime_wrapper.h"}); + } |