Parallelize symbol collection for renaming (#27819)

This commit is contained in:
Kai Pastor 2022-11-16 18:02:05 +01:00 committed by GitHub
parent 90b5fb836c
commit dca3c4f948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,46 @@
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 382d2bc..d9f0144 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -274,6 +274,25 @@ endif
# But don't hide symbols that start with "libintl_locale", for the reason
# stated in localename-table.h.
all check install: config.h
+%_exported:
+ @d=`echo "$@" | sed -e 's,/[^/]*$$,,'`; \
+ test "$$d" = "$@" || mkdir -p "$$d" ; \
+ true >"$@" || exit 1 ; \
+ f=`echo "$@" | sed -e 's,_exported$$,,'`; \
+ case $$f in \
+ *.res.lo ) ;; \
+ *.c | *.$(OBJEXT) | *.lo ) \
+ sf=`echo "$$f" | sed -e 's,\\.[^.]*$$,,'`.c; \
+ test -f $$sf || sf=$(srcdir)/$$sf; \
+ of=`echo "$$f" | sed -e 's,^.*/,,' -e 's,\\.[^.]*$$,,'`.$(OBJEXT); \
+ echo "$(COMPILE) -c $$sf && sh ./exported.sh $$of 1>>$@" ; \
+ $(COMPILE) -c $$sf || exit 1; \
+ sh ./exported.sh $$of 1>>"$@"; \
+ rm -f $$of `echo "$$of" | sed -e 's,\\.$(OBJEXT)$$,.lo,'`; \
+ ;; \
+ esac
+libunistring_la_EXPORTED = $(libunistring_la_SOURCES:%=%_exported) $(libunistring_la_LIBADD:%=%_exported)
+exported: $(libunistring_la_EXPORTED)
config.h: $(BUILT_SOURCES) $(srcdir)/libunistring.sym
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
: "Avoid double inclusion, to avoid a warning about redefinitions."; \
@@ -285,10 +304,14 @@ config.h: $(BUILT_SOURCES) $(srcdir)/libunistring.sym
echo '#endif /* UNISTRING_CONFIG_H */'; \
} > config.h && \
if test -n "$(NAMESPACING)" && test -n "$(HAVE_GLOBAL_SYMBOL_PIPE)"; then \
+ echo "Collecting symbols to be renamed"; \
+ $(MAKE) exported && \
{ \
{ \
- for f in $(libunistring_la_SOURCES) $(libunistring_la_LIBADD); do \
+ for f in $(libunistring_la_EXPORTED); do \
case $$f in \
+ *_exported ) cat $$f 1>&5; ;; \
+ * ) ;; \
*.res.lo ) ;; \
*.c | *.$(OBJEXT) | *.lo ) \
sf=`echo "$$f" | sed -e 's,\\.[^.]*$$,,'`.c; \

View File

@ -16,6 +16,7 @@ vcpkg_extract_source_archive(SOURCE_PATH
PATCHES
disable-gnulib-fetch.patch
disable-subdirs.patch
parallelize-symbol-collection.patch
)
vcpkg_configure_make(

View File

@ -1,7 +1,7 @@
{
"name": "libunistring",
"version": "1.1",
"port-version": 1,
"port-version": 2,
"description": "GNU libunistring provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.",
"homepage": "https://www.gnu.org/software/libunistring/",
"license": "LGPL-3.0-or-later OR GPL-2.0-or-later",

View File

@ -4322,7 +4322,7 @@
},
"libunistring": {
"baseline": "1.1",
"port-version": 1
"port-version": 2
},
"liburing": {
"baseline": "2.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8bcb2f939ea16732abab03352b951cf12713bc54",
"version": "1.1",
"port-version": 2
},
{
"git-tree": "a5511958230904a505b18af4043c5b51512d8684",
"version": "1.1",