summaryrefslogtreecommitdiff
path: root/solenv/gcc-wrappers/wrapper.cxx
AgeCommit message (Collapse)Author
2022-02-13may just as well use -Z7 if trying to avoid shared .pdb accessLuboš Luňák
-Z7 writes all debug info into the .obj file, so it avoids the .pdb altogether. Change-Id: I89265009782d0a901ba3583a7241da0daf83860e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129877 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-19Fix processing of first path in SOLARINCStephan Bergmann
...which does not have a space before the -I, so copying starting at pos+3 dropped the leading character from the path. This was apparently never a problem in practice, as the first path in SOLARINC happens to always be SRCDIR/include, which should not be needed anyway when building external projects with this GCC wrapper on Windows. (So this commit is a change in behavior, making SRCDIR/include available to those external project builds on Windows, but the follow-up commit <https://gerrit.libreoffice.org/c/core/+/128615> "Decouple SRCDIR/include from SOLARINC" will change the behavior back again.) Change-Id: I3f82a83683ed381b791d221fe1da78b9797aea94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128621 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-17support ccache for MSVC tooLuboš Luňák
There's no official MSVC support in ccache yet, but there are patches in progress of getting upstreamed. So right now it's necessary to get a patched ccache. Ccache cannot work with -Zi option, since sharing debuginfo in a .PDB cannot be cached. Added --enable-z7-symbols that gets enabled by default if ccache is detected. It works even with PCHs enabled, and externals seem to work too. I get almost 100% hit rate on a rebuild, although such a rebuild is slower than on Linux. Change-Id: I1d230ee1fccc441b9d9bec794cc2e1ec13161999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125179 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-03fix gcc-wrapper for ccache.exeLuboš Luňák
This reverts a part of 18cc01b63996f81b284e3bc827d1be7f3da8983a . Change-Id: Ib7abbc41eeb6abd573f540ae2d0d2822e68b9abb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124613 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-05drop 'using namespace std' in s* + toolkitJulien Nabet
Change-Id: Ibd0b983d46a5683df64b4de79cd444427705e9e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123118 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-07-23do not use "using namespace std" in headersCollabora
It's a bad style, doing that in headers can affect many source files (especially with PCH used). Change-Id: Ic9091a1d018e74606c9fa95df71a55faaa93d4ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119011 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-11-22Fix typosAndrea Gelmini
Change-Id: I89ffb8e99aef3e71f723d25a757a26520dcdf71a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106337 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2020-11-21firebird: build fixes (incl. parallel build)Jan-Marek Glogowski
The main idea is to get rid of the "unset MAKEFLAGS". AFAI can see, the whole CPU stuff isn't used anymore. So we can drop the whole FB_CPU_ARG handling. Since LO doesn't use any of make's implicit rules, the build breaks, but luckily it just requires a single rule for the btyacc build - just a Firebuild build tool. Then there is the whole broken handling of LIBTOMMATH and LIBATOMIC_OPS already in LO's configure.ac. I don't know if any internal build of Firebird with these as system libs would work. I guess people either have a system Firebird or also build with internal libtommath and libatomic_ops. This fixes just the obvious errors. I didn't try to build it, so there might still be typos (TBH I thought hard about just dropping the system build of these libraries, after seeing the broken configure.ac). And I'm not sure our / the system boost preprocessor library is ever used over the Firebird-internal copy. It also looks like it's also just used in an other build tool and nothing of the Firebird DB itself depends on it. Then there is the movement of the install_name_tool / otool patching on MacOS from the patch into the ExternalProject to further shrink the patches, as the build doesn't depend on it. This also introduces a different debug build mode for the gcc-/g++-wrapper: MSVC_USE_INDIVIDUAL_PDBS. It uses -Fd to write a separate PDB per output file instead of using -FS to use sync writes to a single PDB, which might work around the PDB access failures seen by Jenkins for linking executables. In theory it's also faster and should work with all the other wrapper users, but I don't want to open that can of additional build errors (yet), for eventually marginal gains. Change-Id: I8d4c5d2f17def9e840a67ef1004787e8baaffa83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105902 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-10-09Be more verbose why gcc-wrapper could not create processStephan Bergmann
Change-Id: I34f4209f1b830060a22ae38c05fe8a8e771c8f41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104111 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-11WIN cross: fix gpg-related library buildsJan-Marek Glogowski
Cross compiling these libraries requires to supply the cross- compiler via the CC_FOR_BUILD environment variable. Since we have to use the gcc-wrappers, we now need two different invocations with different inclues and libraries, but just have fixed environment variables. Also, the CC_FOR_BUILD clashes with LO's own variant, but that is easy to fix. So this change includes: - gcc-wrappers: new option --wrapper-env-prefix to add a prefix to the environment variable names - gcc-wrappers: new option --wrapper-print-cmdline to dump the real command called, when a verbose build is executed - gcc-wrappers: default to exe, if the output has no extension - unify build flags for gpg related libraries Change-Id: I4e6a6ba3c6e09237c8ffefa40ce61131290a3852 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102482 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-03-27revert the gyp-based nss build changesLuboš Luňák
https://lists.freedesktop.org/archives/libreoffice/2020-March/084769.html etc. This reverts commit c76fdcf1cfa1242e66b50ebe80d6eac1baae37a9. This reverts commit 10f52ab4d27263439d59f55f40e88ad2fde0cf71. This reverts commit eac806e8dcd9ee6439ac8695978ff6b62cc6b8d2. This reverts commit d591a682e46ff352f06a61c024ef661dd17f4ea4. This reverts commit 12235d3390a7fc5146bf65f9d6166034b8a048ee. This reverts commit 23245f723fb29262b8543d6447d1b0bb69cb50fb. This reverts commit 91658b402b66b67c785687d5b3a76e3183fe76bf. This reverts commit 5feadfad0cc3be2680213d2e5f6f786b2f4cc74f. This reverts commit fecca49c309fc723c524f12fa671114b316a5562. This reverts commit c6a9454e744289cf2004b42b3c90854b2db8382b. This reverts commit a1a62a70411cb6041b5930ead08280d5e1e7b5f9. This reverts commit 8512f4ca090c85477a6670438aeefe7fdfcf8a98. This reverts commit 532ffb7a297d55b495141ce33692df5d9917b54f. Change-Id: Iaa48d692bea2ca2468cdd5f8ad26ad91c0c31dde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91199 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-03-23build nss using gyp+ninja also on WindowsLuboš Luňák
Change-Id: I3acb0f2a93cee85e382e03c2b2fdd68273e12516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90117 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-01-08gcc-wrappers: always pass -debug to linkerMichael Stahl
... like gbuild does; this causes a PDB file to be created, which is required by BinScope. Stops complaints about firebird's DLLs, which are apparently the only DLLs linked with gcc-wrapper. Change-Id: Ibe0e8053e0556748b1562b5f50f08480b2f2f89b
2018-01-08gcc-wrappers: recognise -ggdb.* in addition to -g as debug flagMichael Stahl
Firebird uses -ggdb. This causes it to have 2 PDB files, however this isn't sufficient to make BinScope happy, more investigation needed. Change-Id: I5286964586eaffea36790ab7a7ca2df75d85f068
2017-09-19gpg4libre: have gcc-wrapper handle linking properlyDavid Ostrovsky
Change-Id: I83305f504f7d492195f07f11f06d2c9855d92400 Reviewed-on: https://gerrit.libreoffice.org/42441 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-02-23solenv(gcc-wrappers): remove trailing space of includepathMark Hung
Change-Id: Ic14140f197a2c5e1632fd27cfae38ca4eff9bd8c Reviewed-on: https://gerrit.libreoffice.org/34562 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-10-15clang-cl loplugin: solenvStephan Bergmann
Change-Id: I0a1075b92e787fc8bab7cfab5c3f24ad918a9181 Reviewed-on: https://gerrit.libreoffice.org/29850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-03Handle wchar_t as native C++11 type on windowsDavid Ostrovsky
The option /Zc:wchar_t- prevented to use wchar_t as a built-in type according to the C++ standard. In Visual C++ 6.0 and earlier, wchar_t was not implemented as a built-in type, but was declared in wchar.h as a typedef for unsigned short. Now, years later after the end of life this outdated toolchain, there is no reason not to use native type. The only issue could be the ABI compatibility. But on a quick look at least, it looks like none of the mangled C++ symbols in the stable URE interface actually depend on wchar_t. We forgot to get rid of /Zc:wchar_t- in 5.1. Do that for LibreOffice 5.2, though. Change-Id: I8d6b380660859efa44c83c830734978d31d756a0 Reviewed-on: https://gerrit.libreoffice.org/22589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-12-02For some odd reason, clang-cl.exe doesn't like being called by CreateProcessStephan Bergmann
...with the executable specified in the first arg, instead of as part of the second arg (i.e., the command line) Change-Id: Ie6e232f6880b5bfbb91a52ee5398b91a0ccddc4d
2015-12-02Filter out -fPIC tooStephan Bergmann
...which happens to be passed in when building external/poppler with clang-cl Change-Id: I2c17bec316081a0cdc789a84bb1447acf5e893c0
2015-12-02Be explicit about missing env varsStephan Bergmann
Change-Id: I1023779749c3ce114d637a39a72bc9038324f01d
2015-04-19tdf#82430: gcc-wrappers: command line *must* start with a spaceMichael Stahl
Yes, you read that right, if there's no space in front of the first argument, cl.exe will *ignore* it. Change-Id: I73d9bf026705538e53b5d91091a4c96eb15739b2
2015-03-19We require MSVC2013 (_MSC_VER == 1800) nowTor Lillqvist
Change-Id: Ice8504041f22e00f2e5010813d9dff1d2987c8d6
2014-10-30Fixed typos. No automatic tools (sed, and so on).Andrea Gelmini
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f Reviewed-on: https://gerrit.libreoffice.org/12150 Reviewed-by: Bryan Quigley <gquigs@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-08-18fdo#82430: gcc-wrappers: don't stop if REAL_CXX_FLAGS is emptyMichael Stahl
Hopefully should fix MSVC 2010 build... Change-Id: I3dc71acfa58cdf65dfc6d731d9ebb77fd18f7fac
2014-07-07Use -FS for VS 2013Tor Lillqvist
Change-Id: I3beea86e97a4217128383c01049b2fc19c85c67a
2014-05-17Correct common misspellings, and remove some ASCII art along the way.Chris Laplante
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c Reviewed-on: https://gerrit.libreoffice.org/9356 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2013-11-25Fix different typos for "unknown"Julien Nabet
Change-Id: Ib2ee00d4e9f4c6c05d090adfcd5fb791fcbca72c
2013-09-19Revert "gcc-wrapper: warn on invalid path names."Jan Holesovsky
This reverts commit 5f0145818cba17558708ef731e2bcc6a0b92a9f7. Breaks the tinderboxes, I am afraid.
2013-09-18gcc-wrapper: warn on invalid path names.Michael Meeks
Change-Id: Ib057d519485da3a454bad579675ae718c42155eb
2013-07-17gcc-wrapper: improve argument manglingMichael Stahl
- properly handle linker arguments which apparently need to be at the end; without this a configure test to determine name of generated executable fails in firebird with MSVC 2012 - support -o *.o - support -o *.dll - support -def:* - ignore -Wl,* Change-Id: Ia256cb10cc76ae834fc39264609bb120320821f6
2013-04-15gbuild: add support for building against MSVC debug runtimeMichael Stahl
Mainly this means using /MDd instead of /MD and /MTd instead of /MT in the CFLAGS, and also re-mapping of .lib files to ones with "d". Change-Id: Ifc56b53a66d5eb522c1695a34d68b08cad1d8338
2013-03-24fix liborcus on windowsPeter Foley
Change-Id: I852b4e159f818854fd2ac5bdcd14343b2a628134
2013-03-23make gcc-wrapper work with ccachePeter Foley
Change-Id: I4db04d8ce04c928b67d86172fcbe33adacbd85d8
2013-03-16add support for more options to gcc-wrapperPeter Foley
Change-Id: If43721642f2453671e74ccda9572f873360ca65a
2013-03-14add gcc-wrapperPeter Foley
Change-Id: I961bd23d1ec382d247a489cda42194ce9f4fe1da Reviewed-on: https://gerrit.libreoffice.org/2715 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>