Skip to content

Commit 11c2a85

Browse files
committed
[NFC] Rename LLVM_NO_DEAD_STRIP
Summary: The variable LLVM_NO_DEAD_STRIP is set in LLVM cmake files when building executables that might make use of plugins .The name of the variable does not convey the actual intended usage (i.e. for use with tools that have plugins), just what the eventual effect of setting in on some (i.e. not garbage collecting unused symbols). This patch renames it to LLVM_SUPPORT_PLUGINS to convey the intended usage, which will allow subsequent patches to add behavior to support that in different ways without confusion about whether it will do on, for example, non-gnu platforms. Reviewers: hubert.reinterpretcast, stevewan Reviewed By: stevewan Subscribers: cfe-commits, mgorny, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D69356
1 parent be29d92 commit 11c2a85

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

clang/tools/driver/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ set( LLVM_LINK_COMPONENTS
2020
option(CLANG_PLUGIN_SUPPORT "Build clang with plugin support" ON)
2121

2222
# Support plugins. This must be before add_clang_executable as it reads
23-
# LLVM_NO_DEAD_STRIP.
23+
# LLVM_SUPPORT_PLUGINS.
2424
if(CLANG_PLUGIN_SUPPORT)
25-
set(LLVM_NO_DEAD_STRIP 1)
25+
set(LLVM_SUPPORT_PLUGINS 1)
2626
endif()
2727

2828
if(NOT CLANG_BUILT_STANDALONE)

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function(add_link_opts target_name)
228228
# to enable. See https://sourceware.org/bugzilla/show_bug.cgi?id=17704.
229229
endif()
230230

231-
if(NOT LLVM_NO_DEAD_STRIP)
231+
if(NOT LLVM_SUPPORT_PLUGINS)
232232
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
233233
# ld64's implementation of -dead_strip breaks tools that use plugins.
234234
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
@@ -245,7 +245,7 @@ function(add_link_opts target_name)
245245
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
246246
LINK_FLAGS " -Wl,--gc-sections")
247247
endif()
248-
else() #LLVM_NO_DEAD_STRIP
248+
else() #LLVM_SUPPORT_PLUGINS
249249
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
250250
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
251251
LINK_FLAGS " -Wl,-bnogc")

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ endif()
772772
# Add flags for add_dead_strip().
773773
# FIXME: With MSVS, consider compiling with /Gy and linking with /OPT:REF?
774774
# But MinSizeRel seems to add that automatically, so maybe disable these
775-
# flags instead if LLVM_NO_DEAD_STRIP is set.
775+
# flags instead if LLVM_SUPPORT_PLUGINS is set.
776776
if(NOT CYGWIN AND NOT WIN32)
777777
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND
778778
NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")

llvm/tools/bugpoint/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set(LLVM_LINK_COMPONENTS
2222
)
2323

2424
# Support plugins.
25-
set(LLVM_NO_DEAD_STRIP 1)
25+
set(LLVM_SUPPORT_PLUGINS 1)
2626

2727
add_llvm_tool(bugpoint
2828
BugDriver.cpp

llvm/tools/llc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set(LLVM_LINK_COMPONENTS
2020
)
2121

2222
# Support plugins.
23-
set(LLVM_NO_DEAD_STRIP 1)
23+
set(LLVM_SUPPORT_PLUGINS 1)
2424

2525
add_llvm_tool(llc
2626
llc.cpp

llvm/tools/opt/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ set(LLVM_LINK_COMPONENTS
2525
)
2626

2727
# Support plugins.
28-
set(LLVM_NO_DEAD_STRIP 1)
28+
set(LLVM_SUPPORT_PLUGINS 1)
2929

3030
add_llvm_tool(opt
3131
AnalysisWrappers.cpp

0 commit comments

Comments
 (0)