Skip to content

Commit 3b0cb89

Browse files
authored
[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).
1 parent 4df18ab commit 3b0cb89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/tools/clang-repl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ clang_target_link_libraries(clang-repl PRIVATE
6666
# start to exceed this limit, e.g. when linking for arm-linux-gnueabihf with
6767
# gold. This flag tells the linker to build a PLT for the full address range.
6868
# Linkers without this flag are assumed to support proper PLTs by default.
69-
set(flag_long_plt "-Wl,--long-plt")
69+
set(flag_long_plt "LINKER:--long-plt")
7070
check_linker_flag(CXX ${flag_long_plt} HAVE_LINKER_FLAG_LONG_PLT)
7171
if(HAVE_LINKER_FLAG_LONG_PLT)
7272
target_link_options(clang-repl PRIVATE ${flag_long_plt})

0 commit comments

Comments
 (0)