We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06c3c3b commit 2bb6d7bCopy full SHA for 2bb6d7b
clang/tools/clang-repl/CMakeLists.txt
@@ -24,6 +24,11 @@ if(CLANG_PLUGIN_SUPPORT)
24
endif()
25
26
string(TOUPPER ${CMAKE_SYSTEM_PROCESSOR} system_processor)
27
-if(${system_processor} MATCHES "ARM")
28
- target_link_options(clang-repl PRIVATE LINKER:--long-plt)
+if(system_processor MATCHES "ARM")
+ set(FLAG_LONG_PLT "-Wl,--long-plt")
29
+ llvm_check_linker_flag(CXX ${FLAG_LONG_PLT} LINKER_HAS_FLAG_LONG_PLT)
30
+ # Linkers without this flag are assumed to have long PLTs by default
31
+ if(LINKER_HAS_FLAG_LONG_PLT)
32
+ target_link_options(clang-repl PRIVATE ${FLAG_LONG_PLT})
33
+ endif()
34
0 commit comments