nixpkgs/pkgs/development/compilers/llvm/clang-system-llvm-libs.patch
Shea Levy 6e3cde6383 Enable building clang separately from llvm
Note that there is some duplication when building clang now. The llvm source
is unpacked twice, ./configure is run twice, and two small unit test
libraries are compiled twice. IMO this is a fair tradeoff for having
llvm be a separate build unaffected by changes to clang

svn path=/nixpkgs/trunk/; revision=29919
2011-10-19 20:57:18 +00:00

43 lines
1.9 KiB
Diff

diff -Naur llvm-2.9-orig/Makefile.rules llvm-2.9/Makefile.rules
--- llvm-2.9-orig/Makefile.rules 2011-03-25 02:26:58.000000000 -0400
+++ llvm-2.9/Makefile.rules 2011-10-19 15:31:38.538674143 -0400
@@ -941,7 +941,7 @@
@echo "*** llvm-config doesn't exist - rebuilding it."
@$(MAKE) -C $(PROJ_OBJ_ROOT)/tools/llvm-config
-$(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG)
+$(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT):
ifeq ($(ENABLE_SHARED), 1)
# We can take the "auto-import" feature to get rid of using dllimport.
@@ -1137,7 +1137,7 @@
else
SharedLibKindMessage := "Shared Library"
endif
-$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(SharedLibDir)/.dir
+$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(SharedLibDir)/.dir
$(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \
$(notdir $@)
$(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) \
@@ -1411,7 +1411,7 @@
$(ToolBuildPath): $(ToolDir)/.dir
endif
-$(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
+$(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths)
$(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
$(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
$(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
diff -Naur llvm-2.9-orig/unittests/Makefile.unittest llvm-2.9/unittests/Makefile.unittest
--- llvm-2.9-orig/unittests/Makefile.unittest 2011-02-04 12:12:18.000000000 -0500
+++ llvm-2.9/unittests/Makefile.unittest 2011-10-19 15:47:27.100035616 -0400
@@ -47,7 +47,7 @@
Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)"
endif
-$(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
+$(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths)
$(Echo) Linking $(BuildMode) unit test $(TESTNAME) $(StripWarnMsg)
$(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
$(TESTLIBS) $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)