diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-11-15 19:57:48 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-11-21 14:44:49 +0100 |
commit | 22b6cfa35c4cec8462785376b8543ce9cd4e422a (patch) | |
tree | 6fc9a712b579385ceeb8b3d0ce8de093966b4f4d /solenv/gcc-wrappers/wrapper.cxx | |
parent | 4486ab59348ddbfa4b050195477c2842c0a7de0a (diff) |
firebird: build fixes (incl. parallel build)
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>
Diffstat (limited to 'solenv/gcc-wrappers/wrapper.cxx')
-rw-r--r-- | solenv/gcc-wrappers/wrapper.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx index abc0ed2864fc..fabfbfc9b346 100644 --- a/solenv/gcc-wrappers/wrapper.cxx +++ b/solenv/gcc-wrappers/wrapper.cxx @@ -106,6 +106,10 @@ string processccargs(vector<string> rawargs, string &env_prefix, bool &verbose) // note: always use -debug so a PDB file is created string linkargs(" -link -debug"); + // instead of using synced PDB access (-FS), use inidividual PDB files based on output + const char *const pEnvIndividualPDBs(getenv("MSVC_USE_INDIVIDUAL_PDBS")); + const bool bIndividualPDBs = (pEnvIndividualPDBs && !strcmp(pEnvIndividualPDBs, "TRUE")); + for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) { if (env_prefix_next_arg) { @@ -145,10 +149,19 @@ string processccargs(vector<string> rawargs, string &env_prefix, bool &verbose) << (*i) << "\"" << endl; exit(1); } + + if (bIndividualPDBs) + { + if (dot == string::npos) + args.append(" -Fd" + *i + ".pdb"); + else + args.append(" -Fd" + (*i).substr(0, dot) + ".pdb"); + } } else if(*i == "-g" || !(*i).compare(0,5,"-ggdb")) { args.append("-Zi"); - args.append(" -FS"); + if (!bIndividualPDBs) + args.append(" -FS"); } else if(!(*i).compare(0,2,"-D")) { // need to re-escape strings for preprocessor |