summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Funk <juergen.funk_ml@cib.de>2020-01-30 11:28:38 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-02-19 13:54:52 +0100
commitd2fc4c27a4538c137c7df436b17e18c76b0193a5 (patch)
tree43469daf0b94a9594fbafe00a4f0d7a646254198
parentceb2f69e0ef2381ce6ed8c65ea45e72aa86cda56 (diff)
Optionally generate PDBs for external libs
also for C# Enables pdb generation for symbol builds, for: - cli_basetypes.dll - cli_cppuhelper.dll - cli_uno.dll - cli_ure.dll Not covered are: - cli_oootypes.dll - cli_uretypes.dll ..as sadly climaker generates those, and can't produce PDBs. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87727 (cherry picked from commit 1bbabd67720d6d2cfcca15d811c625562fcffad6) also for libxslt.dll Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87967 (cherry picked from commit 98c7c52e30a921a1bde3e4b2aa8c240d95ed577d) also for libxml.dll Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88156 (cherry picked from commit 52292c374c3a6a5b4d9c6ced616b0ddd505a5298) also for nss Enables pdb generation for symbol builds, for: - freebl3.dll - libeay32.dll - nspr4.dll - nss3.dll - nssckbi.dll - nssdbm3.dll - nssutil3.dll - plc4.dll - plds4.dll - smime3.dll - softokn3.dll - sqlite3.dll - ssl3.dll - ssleay32.dll Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88673 (cherry picked from commit 54acab919e7c7c5d60fc697bda54278861ac250e) all above Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> libxstl.dll: Reduce code when symboles enabled Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88157 Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 127d8c2abcae44869458b39a77f48c93bff8c327) Change-Id: I9db843a638cf9091fa49b21e27dcb578f98e95fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88933 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rwxr-xr-xbin/symstore.sh18
-rw-r--r--external/libxml2/UnpackedTarball_libxml2.mk4
-rw-r--r--external/libxml2/libxml2-icu-sym.patch.037
-rw-r--r--external/libxslt/UnpackedTarball_libxslt.mk4
-rw-r--r--external/libxslt/libxslt-msvc-sym.patch.216
-rw-r--r--external/nss/ExternalProject_nss.mk4
-rw-r--r--solenv/gbuild/CliLibrary.mk3
7 files changed, 82 insertions, 4 deletions
diff --git a/bin/symstore.sh b/bin/symstore.sh
index 564739a0279f..f4b0a5d13943 100755
--- a/bin/symstore.sh
+++ b/bin/symstore.sh
@@ -14,8 +14,22 @@ BLACK_LIST="python.exe"
# occurence in the build tree. Files _not_ included here will generate
# an error, if duplicates are found.
#
-# Same format as for BLACK_LIST above above
-MOREPDBS_OKLIST="libcurl.dll"
+# Same format as for BLACK_LIST above
+MOREPDBS_OKLIST="libcurl.dll
+freebl3.dll
+libeay32.dll
+nspr4.dll
+nss3.dll
+nssckbi.dll
+nssdbm3.dll
+nssutil3.dll
+plc4.dll
+plds4.dll
+smime3.dll
+softokn3.dll
+sqlite3.dll
+ssl3.dll
+ssleay32.dll"
add_pdb()
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk
index 3194f1e08e75..37b5bad97549 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -18,7 +18,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
external/libxml2/libxml2-global-symbols.patch \
external/libxml2/libxml2-vc10.patch \
$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
- external/libxml2/libxml2-icu.patch.0 \
+ $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
+ external/libxml2/libxml2-icu-sym.patch.0, \
+ external/libxml2/libxml2-icu.patch.0) \
external/libxml2/ubsan.patch.0 \
))
diff --git a/external/libxml2/libxml2-icu-sym.patch.0 b/external/libxml2/libxml2-icu-sym.patch.0
new file mode 100644
index 000000000000..aac9d09ef13e
--- /dev/null
+++ b/external/libxml2/libxml2-icu-sym.patch.0
@@ -0,0 +1,37 @@
+Find bundled ICU in workdir and use debug .libs when needed
+
+diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
+--- win32/Makefile.msvc.dt 2014-07-18 19:00:23.372103963 +0200
++++ win32/Makefile.msvc 2014-07-18 19:01:39.347982929 +0200
+@@ -46,6 +46,7 @@ CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
+ CC = cl.exe
+ CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /D "NOLIBTOOL" /W3 /wd4244 /wd4267 $(CRUNTIME)
+ CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
++CFLAGS = $(CFLAGS) /I$(WORKDIR)/UnpackedTarball/icu/source/i18n /I$(WORKDIR)/UnpackedTarball/icu/source/common
+ !if "$(WITH_THREADS)" != "no"
+ CFLAGS = $(CFLAGS) /D "_REENTRANT"
+ !endif
+@@ -62,7 +63,9 @@
+ # The linker and its options.
+ LD = link.exe
+ LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
++LDFLAGS = $(LDFLAGS) /LIBPATH:$(WORKDIR)/UnpackedTarball/icu/source/lib
+ LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
++LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF
+ LIBS =
+ !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
+ LIBS = $(LIBS) wsock32.lib ws2_32.lib
+@@ -74,9 +77,13 @@
+ !if "$(STATIC)" == "1"
+ LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
+ !else
++!if "$(WITH_RUN_DEBUG)" == "1"
++LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib
++!else
+ LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
+ !endif
+ !endif
++!endif
+ !if "$(WITH_ZLIB)" == "1"
+ # could be named differently zdll or zlib
+ # LIBS = $(LIBS) zdll.lib
diff --git a/external/libxslt/UnpackedTarball_libxslt.mk b/external/libxslt/UnpackedTarball_libxslt.mk
index b035e99f0a79..5bde97637e25 100644
--- a/external/libxslt/UnpackedTarball_libxslt.mk
+++ b/external/libxslt/UnpackedTarball_libxslt.mk
@@ -16,7 +16,9 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxslt))
$(eval $(call gb_UnpackedTarball_add_patches,libxslt,\
external/libxslt/libxslt-config.patch.1 \
external/libxslt/libxslt-internal-symbols.patch.1 \
- external/libxslt/libxslt-msvc.patch.2 \
+ $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED),\
+ external/libxslt/libxslt-msvc-sym.patch.2, \
+ external/libxslt/libxslt-msvc.patch.2) \
external/libxslt/libxslt-1.1.26-memdump.patch \
external/libxslt/rpath.patch.0 \
external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 \
diff --git a/external/libxslt/libxslt-msvc-sym.patch.2 b/external/libxslt/libxslt-msvc-sym.patch.2
new file mode 100644
index 000000000000..e4d4e673f339
--- /dev/null
+++ b/external/libxslt/libxslt-msvc-sym.patch.2
@@ -0,0 +1,16 @@
+--- build/libxslt-1.1.26/win32/Makefile.msvc.old 2019-10-20 01:02:55.359375000 +0200
++++ build/libxslt-1.1.26/win32/Makefile.msvc 2019-10-20 01:03:05.187500000 +0200
+@@ -54,11 +54,13 @@
+ CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /W3 /wd4244 /wd4267 $(CRUNTIME) /D "_REENTRANT"
+ CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(XSLT_SRCDIR) /I$(INCPREFIX)
+ CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
++CFLAGS = $(CFLAGS) -arch:SSE $(SOLARINC) -I$(WORKDIR)\UnpackedTarball\libxml2\include -I$(WORKDIR)/UnpackedTarball/icu/source/i18n -I$(WORKDIR)/UnpackedTarball/icu/source/common
+
+ # The linker and its options.
+ LD = link.exe
+ LDFLAGS = /nologo
+ LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
++LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF
+ LIBS =
+
+ # The archiver and its options.
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 2e93d7000c3a..3ff9951d6e65 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -19,6 +19,10 @@ ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecutable_get_dependencies,python)
$(call gb_ExternalProject_run,build,\
$(if $(MSVC_USE_DEBUG_RUNTIME),USE_DEBUG_RTL=1,BUILD_OPT=1) \
+ $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
+ MOZ_DEBUG_SYMBOLS=1 \
+ MOZ_DEBUG_FLAGS=" " \
+ OPT_CODE_SIZE=0) \
MOZ_MSVCVERSION=9 OS_TARGET=WIN95 \
$(if $(filter X86_64,$(CPUNAME)),USE_64=1) \
LIB="$(ILIB)" \
diff --git a/solenv/gbuild/CliLibrary.mk b/solenv/gbuild/CliLibrary.mk
index e0adb83db978..5c6c3f9b935d 100644
--- a/solenv/gbuild/CliLibrary.mk
+++ b/solenv/gbuild/CliLibrary.mk
@@ -41,6 +41,9 @@ $(call gb_Output_announce,$(2),$(true),CSC,3)
$(CLI_CSCFLAGS) \
-target:library \
-out:$(1) \
+ $(if $(call gb_LinkTarget__symbols_enabled,$(1)),\
+ -debug:pdbonly \
+ -pdb:$(call gb_LinkTarget__get_pdb_filename,$(WORKDIR)/LinkTarget/Library/$(notdir $(1)))) \
-keyfile:$(CLI_KEYFILE) \
-reference:System.dll \
$(foreach assembly,$(CLI_ASSEMBLIES),-reference:$(assembly)) \