[llvm-commits] [llvm-gcc-4.2] r76096 - /llvm-gcc-4.2/trunk/gcc/Makefile.in

Bob Wilson bob.wilson at apple.com
Thu Jul 16 12:02:21 PDT 2009


Author: bwilson
Date: Thu Jul 16 14:02:00 2009
New Revision: 76096

URL: http://llvm.org/viewvc/llvm-project?rev=76096&view=rev
Log:
When building llvm-gcc against an installed copy of llvm, do not go back to
the original llvm source directory to find headers.  If you're building
against an _uninstalled_ llvm, some of the headers are in the build directory
and some are in the source directory, but they're all in one place after
llvm is installed.

This fixes some bizarre build failures that I ran into recently when I
started editing my llvm source files while llvm-gcc was building.

Modified:
    llvm-gcc-4.2/trunk/gcc/Makefile.in

Modified: llvm-gcc-4.2/trunk/gcc/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/Makefile.in?rev=76096&r1=76095&r2=76096&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/Makefile.in (original)
+++ llvm-gcc-4.2/trunk/gcc/Makefile.in Thu Jul 16 14:02:00 2009
@@ -245,6 +245,11 @@
 else
 CPPFLAGS := @CPPFLAGS@ -DENABLE_LLVM $(shell $(LLVMBINPATH)/llvm-config --cppflags)
 
+ifeq ($(BUILDMODE),)
+# When building against an installed copy of llvm, do not go back to the
+# llvm source directory to find headers, since they should all be installed.
+LLVMSRCDIR = $(LLVMOBJDIR)
+else
 # Use llvm-config to get the srcdir that LLVM was configured with, to support
 # srcdir != objdir builds.
 ### FIXME: Relying upon llvm-config doesn't work if we built LLVM in one placed,
@@ -259,6 +264,7 @@
   fi);
 LLVMSRCDIR := $(shell echo "$(LLVMSRCDIR)" | sed -e 's,;,,')
 endif
+endif
 
 ifdef LLVM_VERSION_INFO
 CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"'





More information about the llvm-commits mailing list