summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
diff options
context:
space:
mode:
authorDavid Tenty <daltenty@ibm.com>2019-11-06 13:05:32 -0500
committerDavid Tenty <daltenty@ibm.com>2019-11-06 14:32:35 -0500
commit6740a88dc18d0be14926a5e709bd5062e31ee81c (patch)
tree4db20a759b9aa442bbbfc6cd8b3952207ceed89c /llvm/cmake/modules
parent52af7aedfe5dd5cfb1a6f486040a2549bbdbcf93 (diff)
downloadbcm5719-llvm-6740a88dc18d0be14926a5e709bd5062e31ee81c.tar.gz
bcm5719-llvm-6740a88dc18d0be14926a5e709bd5062e31ee81c.zip
[NFC] Add SUPPORT_PLUGINS to add_llvm_executable()
Summary: this allows us to move logic about when it is appropriate set LLVM_NO_DEAD_STRIP out of each tool and into add_llvm_executable, which will enable future platform specific handling. This is a follow on to the reverted D69356 Reviewers: hubert.reinterpretcast, beanz, lhames Reviewed By: beanz Subscribers: mgorny, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D69638
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 63f6fc7bf5d..0508b621622 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -732,7 +732,7 @@ endmacro(add_llvm_library name)
macro(add_llvm_executable name)
cmake_parse_arguments(ARG
- "DISABLE_LLVM_LINK_LLVM_DYLIB;IGNORE_EXTERNALIZE_DEBUGINFO;NO_INSTALL_RPATH"
+ "DISABLE_LLVM_LINK_LLVM_DYLIB;IGNORE_EXTERNALIZE_DEBUGINFO;NO_INSTALL_RPATH;SUPPORT_PLUGINS"
"ENTITLEMENTS;BUNDLE_PATH"
"DEPENDS"
${ARGN})
@@ -782,6 +782,11 @@ macro(add_llvm_executable name)
if(NOT LLVM_ENABLE_OBJLIB)
llvm_update_compile_flags(${name})
endif()
+
+ if (ARG_SUPPORT_PLUGINS)
+ set(LLVM_NO_DEAD_STRIP On)
+ endif()
+
add_link_opts( ${name} )
# Do not add -Dname_EXPORTS to the command-line when building files in this
OpenPOWER on IntegriCloud