[llvm-commits] CVS: llvm/test/Libraries/Makefile.libs

Chris Lattner lattner at cs.uiuc.edu
Thu May 22 15:28:01 PDT 2003


Changes in directory llvm/test/Libraries:

Makefile.libs updated: 1.5 -> 1.6

---
Log message:

add support for an explicit EXPORTED_SYMBOL_LIST


---
Diffs of the changes:

Index: llvm/test/Libraries/Makefile.libs
diff -u llvm/test/Libraries/Makefile.libs:1.5 llvm/test/Libraries/Makefile.libs:1.6
--- llvm/test/Libraries/Makefile.libs:1.5	Wed May 14 08:09:57 2003
+++ llvm/test/Libraries/Makefile.libs	Thu May 22 15:27:30 2003
@@ -7,6 +7,9 @@
 #
 # 1. LEVEL - Must be set as per normal semantics: The depth from the top of tree
 # 2. LIBNAME - Name of library to link together.  Forms lib<LIBNAME>.bc
+# 3. EXPORTED_SYMBOL_LIST - If this symbol is defined, it contains a comma
+#    separated list of symbols that are exported by the library.  All other
+#    symbols are marked internal, reducing namespace pollution.
 #
 
 DESTLIBDIR  := $(LEVEL)/test/Libraries/Output
@@ -22,10 +25,16 @@
 
 .PRECIOUS: $(LObjects)
 
+# If the library specified a list of symbols to export, add an internalize pass
+# to the link options.
+ifdef EXPORTED_SYMBOL_LIST
+LLINK_OPTS += -internalize -internalize-public-api-list=$(EXPORTED_SYMBOL_LIST)
+endif
+
 # Link the library, then perform postlink optimization...
-$(DESTLIBNAME): $(DESTLIBDIR)/.dir $(LObjects)
+$(DESTLIBNAME): $(DESTLIBDIR)/.dir $(LObjects) $(LLINK) $(LOPT)
 	$(LLINK) -f $(LObjects) $(LDFLAGS) | \
-	   $(LOPT) -f -funcresolve -deadtypeelim -globaldce -o $@
+	 $(LOPT) -f -q -funcresolve -deadtypeelim $(LLINK_OPTS) -globaldce -o $@
 
 # Install target for libraries: Copy into the gcc install directory.
 #





More information about the llvm-commits mailing list