[llvm-commits] [llvm] r74784 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac lib/CompilerDriver/BuiltinOptions.cpp lib/CompilerDriver/Makefile

Mikhail Glushenkov foldr at codedgers.com
Fri Jul 3 20:55:25 PDT 2009


Author: foldr
Date: Fri Jul  3 22:55:25 2009
New Revision: 74784

URL: http://llvm.org/viewvc/llvm-project?rev=74784&view=rev
Log:
LLVMC can be now compiled w/o dynamic plugin support.

Controlled via the --enable-llvmc-dynamic-plugins option.

Modified:
    llvm/trunk/Makefile.config.in
    llvm/trunk/autoconf/configure.ac
    llvm/trunk/lib/CompilerDriver/BuiltinOptions.cpp
    llvm/trunk/lib/CompilerDriver/Makefile

Modified: llvm/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=74784&r1=74783&r2=74784&view=diff

==============================================================================
--- llvm/trunk/Makefile.config.in (original)
+++ llvm/trunk/Makefile.config.in Fri Jul  3 22:55:25 2009
@@ -303,3 +303,8 @@
 # (Windows).
 ENABLE_LLVMC_DYNAMIC = 0
 #@ENABLE_LLVMC_DYNAMIC@
+
+# When ENABLE_LLVMC_DYNAMIC_PLUGINS is enabled, LLVMC will have dynamic plugin
+# support (via the -load option).
+ENABLE_LLVMC_DYNAMIC_PLUGINS = 1
+#@ENABLE_LLVMC_DYNAMIC_PLUGINS@

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=74784&r1=74783&r2=74784&view=diff

==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Fri Jul  3 22:55:25 2009
@@ -605,12 +605,23 @@
 --enable-llvmc-dynamic,
 [Link LLVMC dynamically (default is NO, unless on Win32)]),,
 enableval=$llvmc_dynamic)
-if test ${enableval} = "yes" && test "$ENABLE_PIC" -eq 1; then
+if test ${enableval} = "yes" && test "$ENABLE_PIC" -eq 1 ; then
    AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[ENABLE_LLVMC_DYNAMIC=1]])
 else
    AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[]])
 fi
 
+dnl --enable-llvmc-dynamic-plugins : should LLVMC support dynamic plugins?
+AC_ARG_ENABLE(llvmc-dynamic-plugins,AS_HELP_STRING(
+--enable-llvmc-dynamic-plugins,
+[Enable dynamic LLVMC plugins (default is YES)]),,
+enableval=yes)
+if test ${enableval} = "yes" ; then
+   AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[ENABLE_LLVMC_DYNAMIC_PLUGINS=1]])
+else
+   AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[]])
+fi
+
 dnl===-----------------------------------------------------------------------===
 dnl===
 dnl=== SECTION 4: Check for programs we need and that they are the right version

Modified: llvm/trunk/lib/CompilerDriver/BuiltinOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/BuiltinOptions.cpp?rev=74784&r1=74783&r2=74784&view=diff

==============================================================================
--- llvm/trunk/lib/CompilerDriver/BuiltinOptions.cpp (original)
+++ llvm/trunk/lib/CompilerDriver/BuiltinOptions.cpp Fri Jul  3 22:55:25 2009
@@ -12,7 +12,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/CompilerDriver/BuiltinOptions.h"
+
+#ifdef ENABLE_LLVMC_DYNAMIC_PLUGINS
 #include "llvm/Support/PluginLoader.h"
+#endif
 
 namespace cl = llvm::cl;
 

Modified: llvm/trunk/lib/CompilerDriver/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/Makefile?rev=74784&r1=74783&r2=74784&view=diff

==============================================================================
--- llvm/trunk/lib/CompilerDriver/Makefile (original)
+++ llvm/trunk/lib/CompilerDriver/Makefile Fri Jul  3 22:55:25 2009
@@ -25,6 +25,10 @@
 
 include $(LEVEL)/Makefile.common
 
+ifeq ($(ENABLE_LLVMC_DYNAMIC_PLUGINS), 1)
+    CPP.Flags += -DENABLE_LLVMC_DYNAMIC_PLUGINS
+endif
+
 # Copy libCompilerDriver to the bin dir so that llvmc can find it.
 ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
 





More information about the llvm-commits mailing list