From dee928eaab852889d7db95b5afe55211010bbe3d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 8 Mar 2014 01:19:37 +0000 Subject: [PATCH] Add an option to disable plugins in clang. An option with the same name already exists in the makefile build. The name CLANG_IS_PRODUCTION is historical. We should probably change it, but should change the configure build at the same time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203325 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/driver/CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt index 289de3d0fa..c003df8486 100644 --- a/tools/driver/CMakeLists.txt +++ b/tools/driver/CMakeLists.txt @@ -16,8 +16,13 @@ set( LLVM_LINK_COMPONENTS Vectorize ) -# Support plugins. -set(LLVM_NO_DEAD_STRIP 1) +option(CLANG_IS_PRODUCTION "Build clang without plugin support" OFF) + +# Support plugins. This must be before add_clang_executable as it reads +# LLVM_NO_DEAD_STRIP. +if(NOT CLANG_IS_PRODUCTION) + set(LLVM_NO_DEAD_STRIP 1) +endif() add_clang_executable(clang driver.cpp @@ -33,7 +38,11 @@ target_link_libraries(clang ) set_target_properties(clang PROPERTIES VERSION ${CLANG_EXECUTABLE_VERSION}) -set_target_properties(clang PROPERTIES ENABLE_EXPORTS 1) + +# Support plugins. +if(NOT CLANG_IS_PRODUCTION) + set_target_properties(clang PROPERTIES ENABLE_EXPORTS 1) +endif() add_dependencies(clang clang-headers) -- 2.40.0