Rules for win32 ld shouldn't fire when cross-compiling.
authorMikhail Glushenkov <foldr@codedgers.com>
Fri, 3 Sep 2010 09:57:52 +0000 (09:57 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Fri, 3 Sep 2010 09:57:52 +0000 (09:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112954 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules

index 59fa834b4cc3f9ae5811d2ae8277e3a7a9d4b5f9..41b5638e82fbcc7592a8e9fd94075e98cd1e3aff 100644 (file)
@@ -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.