-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang-repl][CMake][MSVC] Use LINKER: instead of -Wl
#118518
Conversation
This is supported since CMake 3.12, it should be more portable too. This also avoids passing the option to `clang-cl` when linking, because `clang-cl` accepts any `-W` flags (normally warning flags) during linking (llvm#118516).
|
@llvm/pr-subscribers-clang Author: Mészáros Gergely (Maetveis) ChangesThis is supported since CMake 3.12, it should be more portable too. This also avoids passing the option to Full diff: https://github.com/llvm/llvm-project/pull/118518.diff 1 Files Affected:
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})
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks! |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/11578 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/1628 Here is the relevant piece of the build log for the reference |
This should be more portable, and avoids passing the option to
clang-clwhen linking, becauseclang-claccepts any-Wflags (normally warning flags) during linking (#118516).