LLVMC can be now compiled w/o dynamic plugin support.
authorMikhail Glushenkov <foldr@codedgers.com>
Sat, 4 Jul 2009 03:55:25 +0000 (03:55 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Sat, 4 Jul 2009 03:55:25 +0000 (03:55 +0000)
Controlled via the --enable-llvmc-dynamic-plugins option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74784 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.config.in
autoconf/configure.ac
lib/CompilerDriver/BuiltinOptions.cpp
lib/CompilerDriver/Makefile

index e715902814625e8ff8463994170e281785c26730..e2d2c57b4d5fd2e059e6b1bd6cb0f08c3c253b35 100644 (file)
@@ -303,3 +303,8 @@ BINUTILS_INCDIR := @BINUTILS_INCDIR@
 # (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@
index 3812222c6dc48d34ba074880c3ed1279464a983e..6b3c4caac0ca5871e57141f7320044c04f5b323b 100644 (file)
@@ -605,12 +605,23 @@ AC_ARG_ENABLE(llvmc-dynamic,AS_HELP_STRING(
 --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
index c8b768219ab37cd49f23b03e367baa6b3859ac32..a3364e8a72f0ba4cbce8e6b6dfdf34cec7b04f98 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #include "llvm/CompilerDriver/BuiltinOptions.h"
+
+#ifdef ENABLE_LLVMC_DYNAMIC_PLUGINS
 #include "llvm/Support/PluginLoader.h"
+#endif
 
 namespace cl = llvm::cl;
 
index 6084e885184b9e5db9900ee499425ce7ce32fd4d..a5ecfd5d324ea60e82c4718b6cd2284364062c47 100644 (file)
@@ -25,6 +25,10 @@ REQUIRES_EH := 1
 
 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)