[PATCH] [make & configure] Don't strip leading underscore on Win64

Keno Fischer kfischer at college.harvard.edu
Fri Aug 22 20:50:25 PDT 2014


Unlike the win32 abi, the win64 abi doesn't have leading underscores in symbols, so stripping them from the nm output causes symbols without leading underscores to not appear at all and symbols with leading underscores to be missing said underscore, causing an error when attempting to compile the shared library. This fixes that.

http://reviews.llvm.org/D5036

Files:
  tools/llvm-shlib/Makefile

Index: tools/llvm-shlib/Makefile
===================================================================
--- tools/llvm-shlib/Makefile
+++ tools/llvm-shlib/Makefile
@@ -88,11 +88,19 @@
 
 $(ObjDir)/$(LIBRARYNAME).exports: $(SHLIB_FRAGS) $(ObjDir)/.dir
 	$(Echo) Generating exports for $(LIBRARYNAME)
+ifeq ($(ARCH),x86_64)
+	$(Verb) ($(SED) -n \
+			-e "s/^.* T \([^.][^.]*\)$$/\1/p" \
+			-e "s/^.* [BDR] \([^.][^.]*\)$$/\1 DATA/p" \
+			$(SHLIB_FRAGS) \
+		 | sort -u) > $@
+else
 	$(Verb) ($(SED) -n \
 			-e "s/^.* T _\([^.][^.]*\)$$/\1/p" \
 			-e "s/^.* [BDR] _\([^.][^.]*\)$$/\1 DATA/p" \
 			$(SHLIB_FRAGS) \
 		 | sort -u) > $@
+endif
 
 $(ObjDir)/$(LIBRARYNAME).a.o: $(LLVMLibsPaths) $(ObjDir)/.dir
 	$(Echo) Linking all LLVMLibs together for $(LIBRARYNAME)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5036.12874.patch
Type: text/x-patch
Size: 764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140823/923df3af/attachment.bin>


More information about the llvm-commits mailing list