diff options
author | ed <ed@FreeBSD.org> | 2009-07-04 13:58:26 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-07-04 13:58:26 +0000 |
commit | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (patch) | |
tree | 84360c8989c912127a383af37c4b1aa5767bd16e /Makefile.rules | |
parent | cf5cd875b51255602afaed29deb636b66b295671 (diff) | |
download | FreeBSD-src-72621d11de5b873f1695f391eb95f0b336c3d2d4.zip FreeBSD-src-72621d11de5b873f1695f391eb95f0b336c3d2d4.tar.gz |
Import LLVM 74788.
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Makefile.rules b/Makefile.rules index a1a1924..3ae2db8 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -201,15 +201,19 @@ LIBRARYNAME := $(patsubst %,plugin_llvmc_%,$(LLVMC_PLUGIN)) CPP.Flags += -DLLVMC_PLUGIN_NAME=$(LLVMC_PLUGIN) REQUIRES_EH := 1 +ifeq ($(ENABLE_LLVMC_DYNAMIC),1) + LD.Flags += -lCompilerDriver +endif + # Build a dynamic library if the user runs `make` directly from the plugin # directory. ifndef LLVMC_BUILTIN_PLUGIN -LOADABLE_MODULE = 1 + LOADABLE_MODULE = 1 endif # TableGen stuff... ifneq ($(BUILT_SOURCES),) -LLVMC_BUILD_AUTOGENERATED_INC=1 + LLVMC_BUILD_AUTOGENERATED_INC=1 endif endif # LLVMC_PLUGIN @@ -217,10 +221,16 @@ endif # LLVMC_PLUGIN ifdef LLVMC_BASED_DRIVER TOOLNAME = $(LLVMC_BASED_DRIVER) -LLVMLIBS = CompilerDriver.a -LINK_COMPONENTS = support system + REQUIRES_EH := 1 +ifeq ($(ENABLE_LLVMC_DYNAMIC),1) + LD.Flags += -lCompilerDriver +else + LLVMLIBS = CompilerDriver.a + LINK_COMPONENTS = support system +endif + # Preprocessor magic that generates references to static variables in built-in # plugins. ifneq ($(LLVMC_BUILTIN_PLUGINS),) @@ -502,8 +512,7 @@ ifeq ($(OS),Darwin) else ifeq ($(OS),Cygwin) SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \ - -Wl,--enable-auto-import -Wl,--enable-auto-image-base \ - -Wl,--enable-runtime-pseudo-relocs + -Wl,--enable-auto-import -Wl,--enable-auto-image-base else SharedLinkOptions=-shared endif |