[clang] 3b0cb89 - [clang-repl][CMake][MSVC] Use LINKER: instead of `-Wl` (#118518)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 4 00:54:24 PST 2024
Author: Mészáros Gergely
Date: 2024-12-04T09:54:21+01:00
New Revision: 3b0cb8979624bc052587712650bfd52f77eb69d3
URL: https://github.com/llvm/llvm-project/commit/3b0cb8979624bc052587712650bfd52f77eb69d3
DIFF: https://github.com/llvm/llvm-project/commit/3b0cb8979624bc052587712650bfd52f77eb69d3.diff
LOG: [clang-repl][CMake][MSVC] Use LINKER: instead of `-Wl` (#118518)
This should be more portable, and avoids passing the option to
`clang-cl` when linking, because `clang-cl` accepts any `-W` flags
(normally warning flags) during linking (#118516).
Added:
Modified:
clang/tools/clang-repl/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/clang-repl/CMakeLists.txt b/clang/tools/clang-repl/CMakeLists.txt
index 7aebbe7a19436a..f9a911b0ae8e24 100644
--- a/clang/tools/clang-repl/CMakeLists.txt
+++ b/clang/tools/clang-repl/CMakeLists.txt
@@ -66,7 +66,7 @@ clang_target_link_libraries(clang-repl PRIVATE
# start to exceed this limit, e.g. when linking for arm-linux-gnueabihf with
# gold. This flag tells the linker to build a PLT for the full address range.
# Linkers without this flag are assumed to support proper PLTs by default.
-set(flag_long_plt "-Wl,--long-plt")
+set(flag_long_plt "LINKER:--long-plt")
check_linker_flag(CXX ${flag_long_plt} HAVE_LINKER_FLAG_LONG_PLT)
if(HAVE_LINKER_FLAG_LONG_PLT)
target_link_options(clang-repl PRIVATE ${flag_long_plt})
More information about the cfe-commits
mailing list