diff options
author | Dan Gohman <gohman@apple.com> | 2010-09-03 17:29:33 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-09-03 17:29:33 +0000 |
commit | 9a7570c85618d353e9d4963bfa9de7b66af0d78f (patch) | |
tree | 8f3359b55bb7754e3fcdd184106b6ee663ce3fa3 /Makefile.rules | |
parent | ba4d0a005ce1450635faa87337db8cfd746ae6fc (diff) |
Fix Windows stuff to follow the existing source organization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Makefile.rules b/Makefile.rules index 59fa834b4c..2e18c66e2b 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -961,23 +961,9 @@ $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir clean-local:: -$(Verb) $(RM) -f $(NativeExportsFile) else -NativeExportsFile := $(EXPORTED_SYMBOL_FILE) -endif -endif - -# Now add the linker command-line options to use the native export file. - -ifeq ($(HOST_OS),Darwin) -LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile) -endif - -# GNU ld Win32 accepts .DEF files that contain "DATA" entries. ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +# GNU ld Win32 accepts .DEF files that contain "DATA" entries. NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE:.exports=.def)) - -# LLVMLibsOptions is invalidated at processing tools/llvm-shlib. -SharedLinkOptions += $(NativeExportsFile) - $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir $(Echo) Generating $(notdir $@) $(Verb) $(ECHO) "EXPORTS" > $@ @@ -985,12 +971,28 @@ $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir clean-local:: -$(Verb) $(RM) -f $(NativeExportsFile) else +# Default behavior: just use the exports file verbatim. +NativeExportsFile := $(EXPORTED_SYMBOL_FILE) +endif +endif +endif + +# Now add the linker command-line options to use the native export file. + +# Darwin +ifeq ($(HOST_OS),Darwin) +LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile) +endif # gold, bfd ld, etc. ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) LLVMLibsOptions += -Wl,--version-script,$(NativeExportsFile) endif +# Windows +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +# LLVMLibsOptions is invalidated at processing tools/llvm-shlib. +SharedLinkOptions += $(NativeExportsFile) endif endif |