[clang] 11c2a85 - [NFC] Rename LLVM_NO_DEAD_STRIP
David Tenty via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 06:37:44 PDT 2019
Author: David Tenty
Date: 2019-10-25T09:32:00-04:00
New Revision: 11c2a85db8849db1a5907e80d9966592248ef825
URL: https://github.com/llvm/llvm-project/commit/11c2a85db8849db1a5907e80d9966592248ef825
DIFF: https://github.com/llvm/llvm-project/commit/11c2a85db8849db1a5907e80d9966592248ef825.diff
LOG: [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
Added:
Modified:
clang/tools/driver/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/tools/bugpoint/CMakeLists.txt
llvm/tools/llc/CMakeLists.txt
llvm/tools/opt/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/driver/CMakeLists.txt b/clang/tools/driver/CMakeLists.txt
index 590d708d837c..5a8f57eb4668 100644
--- a/clang/tools/driver/CMakeLists.txt
+++ b/clang/tools/driver/CMakeLists.txt
@@ -20,9 +20,9 @@ set( LLVM_LINK_COMPONENTS
option(CLANG_PLUGIN_SUPPORT "Build clang with plugin support" ON)
# Support plugins. This must be before add_clang_executable as it reads
-# LLVM_NO_DEAD_STRIP.
+# LLVM_SUPPORT_PLUGINS.
if(CLANG_PLUGIN_SUPPORT)
- set(LLVM_NO_DEAD_STRIP 1)
+ set(LLVM_SUPPORT_PLUGINS 1)
endif()
if(NOT CLANG_BUILT_STANDALONE)
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index b5f612469ff9..41e72c7e9bcc 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -228,7 +228,7 @@ function(add_link_opts target_name)
# to enable. See https://sourceware.org/bugzilla/show_bug.cgi?id=17704.
endif()
- if(NOT LLVM_NO_DEAD_STRIP)
+ if(NOT LLVM_SUPPORT_PLUGINS)
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
@@ -245,7 +245,7 @@ function(add_link_opts target_name)
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--gc-sections")
endif()
- else() #LLVM_NO_DEAD_STRIP
+ else() #LLVM_SUPPORT_PLUGINS
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-bnogc")
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index a84aff104a44..75c2df9eb559 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -772,7 +772,7 @@ endif()
# 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_NO_DEAD_STRIP is set.
+# flags instead if LLVM_SUPPORT_PLUGINS is set.
if(NOT CYGWIN AND NOT WIN32)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND
NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
diff --git a/llvm/tools/bugpoint/CMakeLists.txt b/llvm/tools/bugpoint/CMakeLists.txt
index 031f51480cce..8b468691fa6b 100644
--- a/llvm/tools/bugpoint/CMakeLists.txt
+++ b/llvm/tools/bugpoint/CMakeLists.txt
@@ -22,7 +22,7 @@ set(LLVM_LINK_COMPONENTS
)
# Support plugins.
-set(LLVM_NO_DEAD_STRIP 1)
+set(LLVM_SUPPORT_PLUGINS 1)
add_llvm_tool(bugpoint
BugDriver.cpp
diff --git a/llvm/tools/llc/CMakeLists.txt b/llvm/tools/llc/CMakeLists.txt
index 300efdab10d0..8435b9de6fb4 100644
--- a/llvm/tools/llc/CMakeLists.txt
+++ b/llvm/tools/llc/CMakeLists.txt
@@ -20,7 +20,7 @@ set(LLVM_LINK_COMPONENTS
)
# Support plugins.
-set(LLVM_NO_DEAD_STRIP 1)
+set(LLVM_SUPPORT_PLUGINS 1)
add_llvm_tool(llc
llc.cpp
diff --git a/llvm/tools/opt/CMakeLists.txt b/llvm/tools/opt/CMakeLists.txt
index cb4ba5cfbced..4f74a0571203 100644
--- a/llvm/tools/opt/CMakeLists.txt
+++ b/llvm/tools/opt/CMakeLists.txt
@@ -25,7 +25,7 @@ set(LLVM_LINK_COMPONENTS
)
# Support plugins.
-set(LLVM_NO_DEAD_STRIP 1)
+set(LLVM_SUPPORT_PLUGINS 1)
add_llvm_tool(opt
AnalysisWrappers.cpp
More information about the cfe-commits
mailing list