external/nss/ExternalProject_nss.mk | 43 ++++++-- external/nss/UnpackedTarball_gyp.mk | 6 + external/nss/UnpackedTarball_nss.mk | 6 + external/nss/buildsystem-windows.patch.0 | 135 +++++++++++++++++++++++++++ external/nss/buildsystem.patch.0 | 71 +++++++++++++- external/nss/gyp-buildsystem-windows.patch.0 | 10 ++ external/nss/nsinstall.py | 1 external/nss/python-cygwin-template | 24 ++++ solenv/gcc-wrappers/wrapper.cxx | 45 +++++---- 9 files changed, 308 insertions(+), 33 deletions(-)
New commits: commit c6a9454e744289cf2004b42b3c90854b2db8382b Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Fri Mar 6 17:05:21 2020 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Mon Mar 23 14:31:51 2020 +0100 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.lu...@collabora.com> 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'], ++ }, + }], + ], + }, commit a1a62a70411cb6041b5930ead08280d5e1e7b5f9 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Fri Mar 6 15:52:33 2020 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Mon Mar 23 14:31:33 2020 +0100 build nss using gyp+ninja also on Windows Change-Id: I3acb0f2a93cee85e382e03c2b2fdd68273e12516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90117 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index daee76fc8fa9..f48d5b22dbde 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -16,22 +16,38 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\ )) ifeq ($(OS),WNT) -$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecutable_get_dependencies,python) + +$(eval $(call gb_ExternalProject_use_autoconf,nss,build)) + +# The nss build system uses 'python', even recursively, so make it find our internal python if necessary. +nss_PYTHON := $(call gb_UnpackedTarball_get_dir,nss)/python +nss_SETUP_PYTHON := $(call gb_UnpackedTarball_get_dir,nss)/setup-python + +$(call gb_ExternalProject_get_state_target,nss,build): \ + $(call gb_ExternalExecutable_get_dependencies,python) \ + $(call gb_UnpackedTarball_get_target,gyp) | $(dir $(call gb_ExternalProject_get_target,gyp)).dir $(call gb_Trace_StartRange,nss,EXTERNAL) + cp $(SRCDIR)/external/nss/python-cygwin-template $(nss_PYTHON) + pythondir=$$($(call gb_ExternalExecutable_get_command,python) -c 'import sys; import os; sys.stdout.write(os.path.dirname(sys.executable))') \ + && echo PATH=\"$$pythondir:\$$PATH\" >>$(nss_PYTHON) + echo '$(call gb_ExternalExecutable_get_command,python)' \"$$\{args[@]\}\" >>$(nss_PYTHON) + chmod +x $(nss_PYTHON) + cp $(SRCDIR)/external/nss/setup-python $(nss_SETUP_PYTHON) + chmod +x $(nss_SETUP_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)" \ - XCFLAGS="-arch:SSE $(SOLARINC)" \ - $(MAKE) -j1 nss_build_all RC="rc.exe $(SOLARINC)" \ - NSINSTALL='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py' \ - NSS_DISABLE_GTESTS=1 \ + COMMA=$(COMMA) \ + PATH=$$(cygpath $(call gb_UnpackedTarball_get_dir,nss)):$$(cygpath $(call gb_UnpackedTarball_get_dir,gyp)):$$PATH \ + MAKE=$(MAKE) \ + NSINSTALL='$(SRCDIR)/external/nss/nsinstall.py' \ + LIB="$(ILIB)" \ + RC="rc.exe $(SOLARINC)" \ + CL="-arch:SSE" \ + ./build.sh -v --disable-tests --enable-libpkix \ + $(if $(filter X86_64,$(CPUNAME)),--target=x64,--target=ia32) \ + $(if $(ENABLE_DBGUTIL),,--opt) \ + && 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 $(call gb_Trace_EndRange,nss,EXTERNAL) else ifneq (,$(filter FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS))) # non-WNT gyp-based diff --git a/external/nss/UnpackedTarball_gyp.mk b/external/nss/UnpackedTarball_gyp.mk index 50f7ba9c52b2..ce44ae51f996 100644 --- a/external/nss/UnpackedTarball_gyp.mk +++ b/external/nss/UnpackedTarball_gyp.mk @@ -15,4 +15,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,gyp,\ external/nss/gyp-buildsystem.patch.0 \ )) +ifeq ($(OS),WNT) +$(eval $(call gb_UnpackedTarball_add_patches,gyp,\ + external/nss/gyp-buildsystem-windows.patch.0 \ +)) +endif + # vim: set noet sw=4 ts=4: diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index 4c6aa3db2030..2cffb09212d7 100644 --- a/external/nss/UnpackedTarball_nss.mk +++ b/external/nss/UnpackedTarball_nss.mk @@ -38,6 +38,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ external/nss/fix-cc-detect-with-ccache.patch.0 \ )) +ifeq ($(OS),WNT) +$(eval $(call gb_UnpackedTarball_add_patches,nss,\ + external/nss/buildsystem-windows.patch.0 \ +)) +endif + ifeq ($(COM_IS_CLANG),TRUE) ifneq ($(filter -fsanitize=%,$(CC)),) $(eval $(call gb_UnpackedTarball_add_patches,nss,\ diff --git a/external/nss/buildsystem-windows.patch.0 b/external/nss/buildsystem-windows.patch.0 new file mode 100644 index 000000000000..7acda26fae45 --- /dev/null +++ b/external/nss/buildsystem-windows.patch.0 @@ -0,0 +1,135 @@ +--- ./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) ++ else ++ extra_params+=(--enable-debug-rtl) + fi + if [ "$target_arch" = "x64" ]; then + extra_params+=(--enable-64bit) + fi ++ extra_params+=(--enable-win32-target=WIN95) + + echo "NSPR [1/5] configure ..." + pushd "$nspr_dir" >/dev/null +@@ -43,24 +46,24 @@ + run_verbose ../configure "${extra_params[@]}" "$@" + popd >/dev/null + echo "NSPR [2/5] make ..." +- run_verbose make -C "$nspr_dir" ++ run_verbose $MAKE -C $(cygpath -w "$nspr_dir") NSINSTALL=$NSINSTALL RC="$RC" + + if [ "$build_nspr_tests" = 1 ]; then + echo "NSPR [3/5] build tests ..." +- run_verbose make -C "$nspr_dir/pr/tests" ++ run_verbose $MAKE -C $(cygpath -w "$nspr_dir/pr/tests") + else + echo "NSPR [3/5] NOT building tests" + fi + + if [[ "$build_nspr_tests" = 1 && "$run_nspr_tests" = 1 ]]; then + echo "NSPR [4/5] run tests ..." +- run_verbose make -C "$nspr_dir/pr/tests" runtests ++ run_verbose $MAKE -C $(cygpath -w "$nspr_dir/pr/tests") runtests + else + echo "NSPR [4/5] NOT running tests" + fi + + echo "NSPR [5/5] install ..." +- run_verbose make -C "$nspr_dir" install ++ run_verbose $MAKE -C $(cygpath -w "$nspr_dir") install NSINSTALL=$NSINSTALL + } + + nspr_clean() +--- ./nss/build.sh.sav 2019-11-19 20:55:30.000000000 +0100 ++++ ./nss/build.sh 2020-02-19 22:28:30.976068194 +0100 +@@ -155,9 +155,10 @@ + gyp_params+=(-Dsanitizer_flags="$sanitizer_flags") + fi + +-if [ "$msvc" = 1 ]; then +- source "$cwd/coreconf/msvc.sh" +-fi ++# this breaks nspr ++#if [ "$msvc" = 1 ]; then ++# source "$cwd/coreconf/msvc.sh" ++#fi + + # -c = clean first + if [ "$clean" = 1 -o "$clean_only" = 1 ]; then +@@ -236,6 +237,9 @@ + exit 0 + fi + ++# set up for gyp ++source "$cwd/coreconf/msvc.sh" ++ + # gyp. + if [ "$rebuild_gyp" = 1 ]; then + if ! hash "$GYP" 2> /dev/null; then +@@ -263,4 +267,4 @@ + echo "Building NSS requires an installation of ninja: https://ninja-build.org/" 1>&2 + exit 3 + fi +-run_scanbuild setup-python "$ninja" -C "$target_dir" "${ninja_params[@]}" ++run_scanbuild setup-python $(cygpath -w $(which "$ninja")) -C $(cygpath -w "$target_dir") "${ninja_params[@]}" +--- ./nss/coreconf/msvc.sh.sav 2019-11-19 20:55:30.000000000 +0100 ++++ ./nss/coreconf/msvc.sh 2020-02-21 17:42:32.344129200 +0100 +@@ -2,6 +2,9 @@ + # This configures the environment for running MSVC. It uses vswhere, the + # registry, and a little knowledge of how MSVC is laid out. + ++PATH="$PATH:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/Installer/" ++set -o igncr ++ + if ! hash vswhere 2>/dev/null; then + echo "Can't find vswhere on the path, aborting" 1>&2 + exit 1 +@@ -17,11 +17,7 @@ + + # Turn a unix-y path into a windows one. + fixpath() { +- if hash cygpath 2>/dev/null; then +- cygpath --unix "$1" +- else # haxx +- echo "$1" | sed -e 's,\\,/,g;s,^\(.\):,/\L\1,;s,/$,,' +- fi ++ echo "$1" + } + + # Query the registry. This takes $1 and tags that on the end of several +@@ -94,6 +89,8 @@ + INCLUDE="${INCLUDE}:${UniversalCRTSdkDir}/include/${UCRTVersion}/um" + INCLUDE="${INCLUDE}:${UniversalCRTSdkDir}/include/${UCRTVersion}/winrt" + INCLUDE="${INCLUDE}:${UniversalCRTSdkDir}/include/${UCRTVersion}/cppwinrt" ++ # : -> ; as the separator ++ INCLUDE=$(echo "$INCLUDE" | sed 's/:C/;C/g') + export INCLUDE + + LIB="${VCINSTALLDIR}/lib/${m}" +--- ./nspr/configure.sav 2020-02-21 21:40:01.218554800 +0100 ++++ ./nspr/configure 2020-02-21 21:41:32.434189100 +0100 +@@ -5977,10 +5977,6 @@ + NSINSTALL=nsinstall + ;; + *-cygwin*|*-mks*) +- NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' +- if test `echo "${PATH}" | grep -c \;` = 0; then +- CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper' +- fi + ;; + *os2*) + ;; +--- nss/coreconf/config.gypi.sav 2019-11-19 20:55:30.000000000 +0100 ++++ nss/coreconf/config.gypi 2020-03-04 16:28:46.512443300 +0100 +@@ -44,7 +44,7 @@ + }], + ['OS=="win"', { + 'use_system_zlib%': 0, +- 'nspr_libs%': ['libnspr4.lib', 'libplc4.lib', 'libplds4.lib'], ++ 'nspr_libs%': ['nspr4.lib', 'plc4.lib', 'plds4.lib'], + 'zlib_libs%': [], + #TODO + 'moz_debug_flags%': '', diff --git a/external/nss/gyp-buildsystem-windows.patch.0 b/external/nss/gyp-buildsystem-windows.patch.0 new file mode 100644 index 000000000000..645690cdf10d --- /dev/null +++ b/external/nss/gyp-buildsystem-windows.patch.0 @@ -0,0 +1,10 @@ +--- pylib/gyp/msvs_emulation.py.sav 2020-02-19 21:45:13.150161000 +0100 ++++ pylib/gyp/msvs_emulation.py 2020-02-21 23:51:56.815937600 +0100 +@@ -996,6 +996,7 @@ + setting = os.path.dirname(sys.executable) + os.pathsep + setting + env[var.upper()] = setting + break ++ env['CL'] = '-arch:SSE' + for required in ('SYSTEMROOT', 'TEMP', 'TMP'): + if required not in env: + raise Exception('Environment variable "%s" ' diff --git a/external/nss/nsinstall.py b/external/nss/nsinstall.py old mode 100644 new mode 100755 index 31b3de3450c5..b73587dd9745 --- a/external/nss/nsinstall.py +++ b/external/nss/nsinstall.py @@ -1,3 +1,4 @@ +#! /usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # diff --git a/external/nss/python-cygwin-template b/external/nss/python-cygwin-template new file mode 100644 index 000000000000..baf437f5960c --- /dev/null +++ b/external/nss/python-cygwin-template @@ -0,0 +1,24 @@ +#! /bin/bash +args=() +# convert to Windows paths +while test -n "$1"; do + # convert path in each argument, if needed + if [[ "$1" =~ -(.*)=(.*) ]]; then # -option=value + arg=$(cygpath -w -- "${BASH_REMATCH[2]}" 2>/dev/null) + if test -n "$arg"; then # value is a path + args+=("-${BASH_REMATCH[1]}=$arg") + else + args+=("$1") + fi + else + arg=$(cygpath -w -- "$1" 2>/dev/null) + if test -n "$arg"; then + args+=("$arg") + else + args+=("$1") + fi + fi + shift +done +PATH=$(cygpath -w -p "$PATH") +# here belongs a line invoking python with ${args[@]} as arguments diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx index b156c89dc220..c320c722cc42 100644 --- a/solenv/gcc-wrappers/wrapper.cxx +++ b/solenv/gcc-wrappers/wrapper.cxx @@ -83,8 +83,7 @@ void setupccenv() { } string processccargs(vector<string> rawargs) { - // suppress the msvc banner - string args=" -nologo"; + string args; // TODO: should these options be enabled globally? args.append(" -EHsc"); const char *const pDebugRuntime(getenv("MSVC_USE_DEBUG_RUNTIME")); @@ -100,9 +99,15 @@ string processccargs(vector<string> rawargs) { // note: always use -debug so a PDB file is created string linkargs(" -link -debug"); + bool hasv = false; + for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) { args.append(" "); - if(*i == "-o") { + string a = *i; + // When building nss, there are strange trailing \'s (because of windows->cygwin?). + while( a.size() > 0 && a[a.size() - 1 ] == '\\') + a.resize(a.size() - 1 ); + if(a == "-o") { // TODO: handle more than just exe output ++i; size_t dot=(*i).find_last_of("."); @@ -128,40 +133,44 @@ string processccargs(vector<string> rawargs) { exit(1); } } - else if(*i == "-g" || !(*i).compare(0,5,"-ggdb")) { + else if(a == "-g" || !a.compare(0,5,"-ggdb")) { args.append("-Zi"); args.append(" -FS"); } - else if(!(*i).compare(0,2,"-D")) { + else if(!a.compare(0,2,"-D")) { // need to re-escape strings for preprocessor - for(size_t pos=(*i).find("\""); pos!=string::npos; pos=(*i).find("\"",pos)) { - (*i).replace(pos,0,"\\"); + for(size_t pos=a.find("\""); pos!=string::npos; pos=a.find("\"",pos)) { + a.replace(pos,0,"\\"); pos+=2; } - args.append(*i); + args.append(a); } - else if(!(*i).compare(0,2,"-L")) { - linkargs.append(" -LIBPATH:"+(*i).substr(2)); + else if(!a.compare(0,2,"-L")) { + linkargs.append(" -LIBPATH:"+a.substr(2)); } - else if(!(*i).compare(0,2,"-l") && (*i).compare(0,5,"-link")) { - linkargs.append(" "+(*i).substr(2)+".lib"); + else if(!a.compare(0,2,"-l") && a.compare(0,5,"-link")) { + linkargs.append(" "+a.substr(2)+".lib"); } - else if(!(*i).compare(0,5,"-def:") || !(*i).compare(0,5,"/def:")) { + else if(!a.compare(0,5,"-def:") || !a.compare(0,5,"/def:")) { // why are we invoked with /def:? cl.exe should handle plain // "foo.def" by itself - linkargs.append(" " + *i); + linkargs.append(" " + a); } - else if(!(*i).compare(0,12,"-fvisibility") || *i == "-fPIC") { + else if(!a.compare(0,12,"-fvisibility") || a == "-fPIC") { //TODO: drop other gcc-specific options } - else if(!(*i).compare(0,4,"-Wl,")) { + else if(!a.compare(0,4,"-Wl,")) { //TODO: drop other gcc-specific options } - else if(*i == "-Werror") + else if(a == "-Werror") args.append("-WX"); + else if(a == "-v") + hasv = true; else - args.append(*i); + args.append(a); } + if(!hasv) // suppress the msvc banner + args.append(" -nologo"); args.append(linkargs); return args; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits