summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CompilerDriver
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-07-03 03:52:47 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-07-03 03:52:47 +0000
commitd6c39ae68cee3d295e35b1b8b82e8689df435d45 (patch)
treec5c84acc38cbd7f3d7c8e4a0ec755f63976ad592 /llvm/lib/CompilerDriver
parentd871cbcd5b03d90445bb94f87d9fe09d17fb353d (diff)
downloadbcm5719-llvm-d6c39ae68cee3d295e35b1b8b82e8689df435d45.tar.gz
bcm5719-llvm-d6c39ae68cee3d295e35b1b8b82e8689df435d45.zip
Add --enable-llvmc-dynamic configure option.
Controls whether libCompilerDriver should be loaded dynamically. By default this is needed only on Win32, to make dynamic plugins work. llvm-svn: 74759
Diffstat (limited to 'llvm/lib/CompilerDriver')
-rw-r--r--llvm/lib/CompilerDriver/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/llvm/lib/CompilerDriver/Makefile b/llvm/lib/CompilerDriver/Makefile
index 773eb5e8e1a..6084e885184 100644
--- a/llvm/lib/CompilerDriver/Makefile
+++ b/llvm/lib/CompilerDriver/Makefile
@@ -12,18 +12,26 @@ LEVEL = ../..
# We don't want this library to appear in `llvm-config --libs` output, so its
# name doesn't start with "LLVM".
-LIBRARYNAME = libCompilerDriver
-LLVMLIBS = LLVMSupport.a LLVMSystem.a
-LOADABLE_MODULE := 1
+ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
+ LIBRARYNAME = libCompilerDriver
+ LLVMLIBS = LLVMSupport.a LLVMSystem.a
+ LOADABLE_MODULE := 1
+else
+ LIBRARYNAME = CompilerDriver
+ LINK_COMPONENTS = support system
+endif
+
REQUIRES_EH := 1
include $(LEVEL)/Makefile.common
+# Copy libCompilerDriver to the bin dir so that llvmc can find it.
+ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
+
FullLibName = $(LIBRARYNAME)$(SHLIBEXT)
all-local:: $(ToolDir)/$(FullLibName)
-# Copy the library to the bin dir so that llvmc can find it.
$(ToolDir)/$(FullLibName): $(LibDir)/$(FullLibName) $(ToolDir)/.dir
$(Echo) Copying $(BuildMode) Shared Library $(FullLibName) to $@
-$(Verb) $(CP) $< $@
@@ -32,3 +40,4 @@ clean-local::
$(Echo) Removing $(BuildMode) Shared Library $(FullLibName) \
from $(ToolDir)
-$(Verb) $(RM) -f $(ToolDir)/$(FullLibName)
+endif
OpenPOWER on IntegriCloud