diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-03-06 17:05:21 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-03-23 14:31:51 +0100 |
commit | c6a9454e744289cf2004b42b3c90854b2db8382b (patch) | |
tree | 2105200ee584d30defffa2d251191add8cd2eab4 /external | |
parent | a1a62a70411cb6041b5930ead08280d5e1e7b5f9 (diff) |
build also PDBs for nss when using gyp
This should be the gyp variant of 54acab919e7c7c5d60fc697bda5427.
Change-Id: Ic50f5153c4b1f19ae74a52eb9bc0d7c6c23ae131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90118
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/nss/ExternalProject_nss.mk | 1 | ||||
-rw-r--r-- | external/nss/buildsystem-windows.patch.0 | 8 | ||||
-rw-r--r-- | external/nss/buildsystem.patch.0 | 71 |
3 files changed, 74 insertions, 6 deletions
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index f48d5b22dbde..ee1a9446d41d 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -45,6 +45,7 @@ $(call gb_ExternalProject_get_state_target,nss,build): \ ./build.sh -v --disable-tests --enable-libpkix \ $(if $(filter X86_64,$(CPUNAME)),--target=x64,--target=ia32) \ $(if $(ENABLE_DBGUTIL),,--opt) \ + $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED),--symbols) \ && rm -f $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/*.a \ ,nss) for f in $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/*.dll.lib; do mv "$$f" "$${f%.dll.lib}".lib; done diff --git a/external/nss/buildsystem-windows.patch.0 b/external/nss/buildsystem-windows.patch.0 index 7acda26fae45..f6e26d886df3 100644 --- a/external/nss/buildsystem-windows.patch.0 +++ b/external/nss/buildsystem-windows.patch.0 @@ -1,9 +1,9 @@ --- ./nss/coreconf/nspr.sh.sav 2019-11-19 20:55:30.000000000 +0100 +++ ./nss/coreconf/nspr.sh 2020-02-19 22:25:05.863542364 +0100 -@@ -31,10 +31,13 @@ - extra_params=(--prefix="$dist_dir"/out --libdir="$dist_dir"/out/lib --includedir="$dist_dir"/out/include) - if [ "$opt_build" = 1 ]; then - extra_params+=(--disable-debug --enable-optimize) +@@ -35,10 +35,13 @@ + else + extra_params+=(--disable-debug --enable-optimize) + fi + else + extra_params+=(--enable-debug-rtl) fi diff --git a/external/nss/buildsystem.patch.0 b/external/nss/buildsystem.patch.0 index a27408d32669..f4b876e67620 100644 --- a/external/nss/buildsystem.patch.0 +++ b/external/nss/buildsystem.patch.0 @@ -1,16 +1,52 @@ --- ./nss/coreconf/nspr.sh.sav 2019-11-19 20:55:30.000000000 +0100 +++ ./nss/coreconf/nspr.sh 2020-02-19 22:25:05.863542364 +0100 -@@ -28,7 +28,7 @@ +@@ -28,9 +28,13 @@ # These NSPR options are directory-specific, so they don't need to be # included in nspr_opt and changing them doesn't force a rebuild of NSPR. - extra_params=(--prefix="$dist_dir"/$target) + extra_params=(--prefix="$dist_dir"/out --libdir="$dist_dir"/out/lib --includedir="$dist_dir"/out/include) if [ "$opt_build" = 1 ]; then - extra_params+=(--disable-debug --enable-optimize) +- extra_params+=(--disable-debug --enable-optimize) ++ if [ "$symbols_build" = 1 ]; then ++ extra_params+=(--enable-debug-symbols --enable-optimize) ++ else ++ extra_params+=(--disable-debug --enable-optimize) ++ fi fi + if [ "$target_arch" = "x64" ]; then + extra_params+=(--enable-64bit) --- ./nss/build.sh.sav 2019-11-19 20:55:30.000000000 +0100 +++ ./nss/build.sh 2020-02-19 22:28:30.976068194 +0100 +@@ -50,6 +50,7 @@ + fi + + opt_build=0 ++symbols_build=0 + build_64=0 + clean=0 + rebuild_gyp=0 +@@ -96,6 +97,7 @@ + -j) ninja_params+=(-j "$2"); shift ;; + --gyp|-g) rebuild_gyp=1 ;; + --opt|-o) opt_build=1 ;; ++ --symbols) symbols_build=1 ;; + -m32|--m32) target_arch=ia32; echo 'Warning: use -t instead of -m32' 1>&2 ;; + -t|--target) target_arch="$2"; shift ;; + --target=*) target_arch="${1#*=}" ;; +@@ -139,7 +141,11 @@ + # Set the target architecture and build type. + gyp_params+=(-Dtarget_arch="$target_arch") + if [ "$opt_build" = 1 ]; then +- target=Release ++ if [ "$symbols_build" = 1 ]; then ++ target=ReleaseSymbols ++ else ++ target=Release ++ fi + else + target=Debug + fi @@ -243,10 +243,10 @@ exit 3 fi @@ -30,3 +66,34 @@ fi -run_scanbuild "$ninja" -C "$target_dir" "${ninja_params[@]}" +run_scanbuild setup-python "$ninja" -C "$target_dir" "${ninja_params[@]}" +--- ./nss/coreconf/config.gypi.sav 2020-03-06 16:10:17.371503700 +0100 ++++ ./nss/coreconf/config.gypi 2020-03-06 16:34:14.868824800 +0100 +@@ -612,6 +612,18 @@ + }, + }, + }, ++ 'ReleaseSymbols': { ++ 'inherit_from': ['Release'], ++ 'cflags': [ '-g' ], ++ 'msvs_settings': { ++ 'VCCLCompilerTool': { ++ 'DebugInformationFormat': '3', # /Zi ++ }, ++ 'VCLinkerTool': { ++ 'GenerateDebugInformation': '1', ++ }, ++ }, ++ }, + 'conditions': [ + [ 'OS=="win"', { + # The gyp ninja backend requires these. +@@ -624,6 +636,9 @@ + 'Release_x64': { + 'inherit_from': ['Release'], + }, ++ 'ReleaseSymbols_x64': { ++ 'inherit_from': ['ReleaseSymbols'], ++ }, + }], + ], + }, |