r203325 - Add an option to disable plugins in clang.

Rafael Espindola rafael.espindola at gmail.com
Fri Mar 7 17:19:37 PST 2014


Author: rafael
Date: Fri Mar  7 19:19:37 2014
New Revision: 203325

URL: http://llvm.org/viewvc/llvm-project?rev=203325&view=rev
Log:
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.

Modified:
    cfe/trunk/tools/driver/CMakeLists.txt

Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=203325&r1=203324&r2=203325&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Fri Mar  7 19:19:37 2014
@@ -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)
 





More information about the cfe-commits mailing list