[all-commits] [llvm/llvm-project] fb53a7: [OpenMP] Only enable version script if supported
Shilei Tian via All-commits
all-commits at lists.llvm.org
Sun Apr 30 20:35:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fb53a7044a04cc05001aaf96cf14d390ac5ec33a
https://github.com/llvm/llvm-project/commit/fb53a7044a04cc05001aaf96cf14d390ac5ec33a
Author: Shilei Tian <i at tianshilei.me>
Date: 2023-04-30 (Sun, 30 Apr 2023)
Changed paths:
M openmp/libomptarget/plugins-nextgen/CMakeLists.txt
M openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
M openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
M openmp/libomptarget/src/CMakeLists.txt
Log Message:
-----------
[OpenMP] Only enable version script if supported
The linker flag `--version-script` may not be supported by all linkers, such as
macOS's linker. `libomp` is already capable of detecting whether the linker supports
it and append the linker flag accordingly. Since currently we assume `libomptarget`
only works on Linux, we don't do the check accordingly. This patch simply adds
the check before adding it to linker flag. This will be the first patch to make
OpenMP target offloading work on macOS. Note that CMake files in `plugins` are
not touched before they are going to be removed pretty soon anyway.
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D149555
More information about the All-commits
mailing list