aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-05-29 02:49:00 -0700
committerStephen Hines <srhines@google.com>2014-05-29 02:49:00 -0700
commitdce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch)
treedcebc53f2b182f145a2e659393bf9a0472cedf23 /Makefile.rules
parent220b921aed042f9e520c26cffd8282a94c66c3d5 (diff)
downloadexternal_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip
external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz
external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules25
1 files changed, 20 insertions, 5 deletions
diff --git a/Makefile.rules b/Makefile.rules
index cb4abaf..9417971 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1063,8 +1063,9 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \
-L $(SharedLibDir)
endif
-LLVMLibsOptions += -lLLVM-$(LLVMVersion)
-LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT)
+LLVM_SO_NAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
+LLVMLibsOptions += -l$(LLVM_SO_NAME)
+LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)$(LLVM_SO_NAME)$(SHLIBEXT)
else
ifndef NO_LLVM_CONFIG
@@ -1180,7 +1181,12 @@ LibName.O := $(LibDir)/$(LIBRARYNAME).o
#---------------------------------------------------------
ifdef SHARED_LIBRARY
-all-local:: $(LibName.SO)
+all-local:: $(AliasName.SO)
+
+$(AliasName.SO): $(LibName.SO)
+ifdef SHARED_ALIAS
+ $(Verb) $(AliasTool) $(BaseLibName.SO) $(AliasName.SO)
+endif
ifdef EXPORTED_SYMBOL_FILE
$(LibName.SO): $(NativeExportsFile)
@@ -1232,12 +1238,15 @@ $(DestSharedLib): $(LibName.SO) $(DestSharedLibDir)
$(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib)
ifdef SHARED_ALIAS
$(Echo) Creating alias from $(DestSharedLib) to $(DestSharedAlias)
- $(Verb) $(AliasTool) $(DestSharedLib) $(DestSharedAlias)
+ $(Verb) $(AliasTool) $(BaseLibName.SO) $(DestSharedAlias)
endif
uninstall-local::
$(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
-$(Verb) $(RM) -f $(DestSharedLib)
+ifdef SHARED_ALIAS
+ -$(Verb) $(RM) -f $(DestSharedAlias)
+endif
endif
endif
@@ -1713,8 +1722,14 @@ $(ObjDir)/%GenDFAPacketizer.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
$(Echo) "Building $(<F) DFA packetizer tables with tblgen"
$(Verb) $(LLVMTableGen) -gen-dfa-packetizer -o $(call SYSPATH, $@) $<
+# Dump all the records to <target>.td.expanded. This is useful for debugging.
+$(TARGET:%=%.td.expanded): \
+%.td.expanded : %.td $(LLVM_TBLGEN)
+ $(Echo) "Building a fully expanded version of $(<F)"
+ $(Verb) $(LLVMTableGen) -o $(call SYSPATH, $@) $<
+
clean-local::
- -$(Verb) $(RM) -f $(INCFiles)
+ -$(Verb) $(RM) -f $(INCFiles) $(TARGET).td.expanded
endif # TARGET