summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-09-03 09:57:52 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-09-03 09:57:52 +0000
commit41d0a7705b2063676e41c2b773fd274552993d4c (patch)
tree9359d3229e2b1e8f9dcbed72294d7eb972110bc6 /Makefile.rules
parent850fcd4705177d8630530ea6a18538782eb68a39 (diff)
downloadllvm-41d0a7705b2063676e41c2b773fd274552993d4c.tar.gz
llvm-41d0a7705b2063676e41c2b773fd274552993d4c.tar.bz2
llvm-41d0a7705b2063676e41c2b773fd274552993d4c.tar.xz
Rules for win32 ld shouldn't fire when cross-compiling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 59fa834b4c..41b5638e82 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -972,7 +972,14 @@ LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile)
endif
# GNU ld Win32 accepts .DEF files that contain "DATA" entries.
+# This doesn't work when cross-compiling, though.
ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ifneq ($(LLVM_CROSS_COMPILING),1)
+HAVE_WIN32_GNU_LD=1
+endif
+endif
+
+ifeq ($(HAVE_WIN32_GNU_LD),1)
NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE:.exports=.def))
# LLVMLibsOptions is invalidated at processing tools/llvm-shlib.