-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff --git a/clang/tools/amdgpu-arch/CMakeLists.txt b/clang/tools/amdgpu-arch/CMakeLists.txt | ||
index b37a6c998..403064d3a 100644 | ||
--- a/clang/tools/amdgpu-arch/CMakeLists.txt | ||
+++ b/clang/tools/amdgpu-arch/CMakeLists.txt | ||
@@ -12,14 +12,7 @@ find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/ | ||
|
||
add_clang_tool(amdgpu-arch AMDGPUArch.cpp) | ||
|
||
-# If we find the HSA runtime we link with it directly. | ||
-find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm) | ||
-if(hsa-runtime64_FOUND AND NOT (LLVM_BUILD_32_BITS OR CMAKE_SIZEOF_VOID_P EQUAL 4)) | ||
- message(STATUS "Building amdgpu-arch linked against libhsa") | ||
- set_target_properties(amdgpu-arch PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON) | ||
- target_link_libraries(amdgpu-arch PRIVATE hsa-runtime64::hsa-runtime64 clangBasic) | ||
-else() | ||
- message(STATUS "Building amdgpu-arch for dlopened libhsa") | ||
- target_compile_definitions(amdgpu-arch PRIVATE "DYNAMIC_HSA") | ||
- target_link_libraries(amdgpu-arch PRIVATE clangBasic) | ||
-endif() | ||
+# Do not link static hsa-runtime64 since it depends on higher libstdc++ version | ||
+message(STATUS "Building amdgpu-arch for dlopened libhsa") | ||
+target_compile_definitions(amdgpu-arch PRIVATE "DYNAMIC_HSA") | ||
+target_link_libraries(amdgpu-arch PRIVATE clangBasic) |