option(CLANG_PLUGIN_SUPPORT "Build clang with plugin support" ON)
# Support plugins. This must be before add_clang_executable as it reads
-# LLVM_SUPPORT_PLUGINS.
+# LLVM_NO_DEAD_STRIP.
if(CLANG_PLUGIN_SUPPORT)
- set(LLVM_SUPPORT_PLUGINS 1)
+ set(LLVM_NO_DEAD_STRIP 1)
endif()
if(NOT CLANG_BUILT_STANDALONE)
# to enable. See https://sourceware.org/bugzilla/show_bug.cgi?id=17704.
endif()
- if(NOT LLVM_SUPPORT_PLUGINS)
+ if(NOT LLVM_NO_DEAD_STRIP)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# ld64's implementation of -dead_strip breaks tools that use plugins.
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--gc-sections")
endif()
- else() #LLVM_SUPPORT_PLUGINS
+ else() #LLVM_NO_DEAD_STRIP
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-bnogc")
# Add flags for add_dead_strip().
# FIXME: With MSVS, consider compiling with /Gy and linking with /OPT:REF?
# But MinSizeRel seems to add that automatically, so maybe disable these
-# flags instead if LLVM_SUPPORT_PLUGINS is set.
+# flags instead if LLVM_NO_DEAD_STRIP is set.
if(NOT CYGWIN AND NOT WIN32)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND
NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
)
# Support plugins.
-set(LLVM_SUPPORT_PLUGINS 1)
+set(LLVM_NO_DEAD_STRIP 1)
add_llvm_tool(bugpoint
BugDriver.cpp
)
# Support plugins.
-set(LLVM_SUPPORT_PLUGINS 1)
+set(LLVM_NO_DEAD_STRIP 1)
add_llvm_tool(llc
llc.cpp
)
# Support plugins.
-set(LLVM_SUPPORT_PLUGINS 1)
+set(LLVM_NO_DEAD_STRIP 1)
add_llvm_tool(opt
AnalysisWrappers.cpp