When linking, make sure the project libraries are linked before the LLVM
authorReid Spencer <rspencer@reidspencer.com>
Tue, 16 May 2006 06:25:14 +0000 (06:25 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 16 May 2006 06:25:14 +0000 (06:25 +0000)
libraries. This ensures that the project's libraries (which most likely
depend on LLVM libraries) come first on the command line and can thus be
resolved by the LLVM libraries that appear later.

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

Makefile.rules

index aa9e592d0d79db9872266f3fd5177a73a31d504a..203bccf763ad3bc0463bf80f7327ef0e0a6d0eeb 100644 (file)
@@ -641,7 +641,7 @@ endif
 #---------------------------------------------------------
 # Some versions of gcc on Alpha produce too many symbols, so use a .a file
 ifeq ($(ARCH),Alpha)
-USEDLIBS :=  $(subst LLVMCore, LLVMCore.a, $(USEDLIBS))
+USEDLIBS := $(subst LLVMCore, LLVMCore.a, $(USEDLIBS))
 LLVMLIBS := $(subst LLVMCore, LLVMCore.a, $(LLVMLIBS))
 CORE_IS_ARCHIVE := 1
 else
@@ -950,8 +950,8 @@ endif
 
 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
        $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
-       $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(LLVMLibsOptions) \
-        $(ProjLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
+       $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
+       $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
        $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
           $(StripWarnMsg)