[llvm] [Offload] Find libc relative to DeviceRTL path (PR #118497)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 07:22:58 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Jan Patrick Lehr (jplehr)
<details>
<summary>Changes</summary>
This was discussed as a potential solution in https://github.com/llvm/llvm-project/pull/118173
---
Full diff: https://github.com/llvm/llvm-project/pull/118497.diff
1 Files Affected:
- (modified) offload/DeviceRTL/CMakeLists.txt (+2-2)
``````````diff
diff --git a/offload/DeviceRTL/CMakeLists.txt b/offload/DeviceRTL/CMakeLists.txt
index 3da83e5c307132..b52305b9516fb1 100644
--- a/offload/DeviceRTL/CMakeLists.txt
+++ b/offload/DeviceRTL/CMakeLists.txt
@@ -131,7 +131,7 @@ set(bc_flags -c -foffload-lto -std=c++17 -fvisibility=hidden
-DOMPTARGET_DEVICE_RUNTIME
-I${include_directory}
-I${devicertl_base_directory}/../include
- -I${LLVM_MAIN_SRC_DIR}/../libc
+ -I${devicertl_base_directory}/../../libc
${LIBOMPTARGET_LLVM_INCLUDE_DIRS_DEVICERTL}
)
@@ -276,7 +276,7 @@ function(compileDeviceRTLLibrary target_cpu target_name target_triple)
target_compile_definitions(${ide_target_name} PRIVATE SHARED_SCRATCHPAD_SIZE=512)
target_include_directories(${ide_target_name} PRIVATE
${include_directory}
- ${LLVM_MAIN_SRC_DIR}/../libc
+ ${devicertl_base_directory}/../../libc
${devicertl_base_directory}/../include
${LIBOMPTARGET_LLVM_INCLUDE_DIRS}
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/118497
More information about the llvm-commits
mailing list