aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-15 22:50:50 +0000
committerChris Lattner <sabre@nondot.org>2008-01-15 22:50:50 +0000
commit27f0779f5af4689d80de6c81784bad327b4be6f8 (patch)
treebc92642dadff6f4a91eb2554435e0f4d4c9d66ec
parent200c7f2f4e46b4ee64ea5c2837230401cd9b2b62 (diff)
downloadexternal_llvm-27f0779f5af4689d80de6c81784bad327b4be6f8.zip
external_llvm-27f0779f5af4689d80de6c81784bad327b4be6f8.tar.gz
external_llvm-27f0779f5af4689d80de6c81784bad327b4be6f8.tar.bz2
improve compatibility with mingw, patch by Alain Frisch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46026 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Makefile.config.in8
-rw-r--r--lib/VMCore/Makefile2
2 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.config.in b/Makefile.config.in
index d066e77..94dce30 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -265,3 +265,11 @@ BINDINGS_TO_BUILD := @BINDINGS_TO_BUILD@
ALL_BINDINGS := @ALL_BINDINGS@
OCAML_LIBDIR := @OCAML_LIBDIR@
+# When compiling under Mingw/Cygwin, executables such as tblgen
+# expect Windows paths, whereas the build system uses Unix paths.
+# The function SYSPATH transforms Unix paths into Windows paths.
+ifneq (,$(findstring -mno-cygwin, $(CXX)))
+ SYSPATH = $(shell echo $(1) | cygpath -m -f -)
+else
+ SYSPATH = $(1)
+endif
diff --git a/lib/VMCore/Makefile b/lib/VMCore/Makefile
index 2e283ec..35ef865 100644
--- a/lib/VMCore/Makefile
+++ b/lib/VMCore/Makefile
@@ -21,7 +21,7 @@ INTRINSICTDS := $(wildcard $(PROJ_SRC_ROOT)/include/llvm/Intrinsics*.td)
$(ObjDir)/Intrinsics.gen.tmp: $(ObjDir)/.dir $(INTRINSICTDS) $(TBLGEN)
$(Echo) Building Intrinsics.gen.tmp from Intrinsics.td
- $(Verb) $(TableGen) $(INTRINSICTD) -o $@ -gen-intrinsic
+ $(Verb) $(TableGen) $(call SYSPATH, $(INTRINSICTD)) -o $(call SYSPATH, $@) -gen-intrinsic
$(GENFILE): $(ObjDir)/Intrinsics.gen.tmp
$(Verb) $(CMP) -s $@ $< || ( $(CP) $< $@ && \