solenv/gcc-wrappers/wrapper.cxx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
New commits: commit c5e29ad23da99913a73e28e7d5d1c096c7b9e312 Author: Luboš Luňák <l.lu...@centrum.cz> AuthorDate: Sat Feb 12 23:40:20 2022 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Sun Feb 13 13:17:34 2022 +0100 may just as well use -Z7 if trying to avoid shared .pdb access -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.lu...@collabora.com> diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx index c97b57808be9..c84fd4990b75 100644 --- a/solenv/gcc-wrappers/wrapper.cxx +++ b/solenv/gcc-wrappers/wrapper.cxx @@ -107,11 +107,12 @@ std::string processccargs(const std::vector<std::string>& rawargs, std::string & std::string linkargs; bool block_linkargs = false; - // instead of using synced PDB access (-FS), use individual PDB files based on output + // Instead of using synced PDB access (-FS), use individual PDB files based on output. + // In fact, simply use -Z7, which doesn't use PDB files at all and writes all debug into the .obj file. const char *const pEnvIndividualPDBs(getenv("MSVC_USE_INDIVIDUAL_PDBS")); const bool bIndividualPDBs = (pEnvIndividualPDBs && !strcmp(pEnvIndividualPDBs, "TRUE")); const char *const pEnvEnableZ7Debug(getenv("ENABLE_Z7_DEBUG")); - const bool bEnableZ7Debug = (pEnvEnableZ7Debug && !strcmp(pEnvEnableZ7Debug, "TRUE")); + const bool bEnableZ7Debug = (pEnvEnableZ7Debug && !strcmp(pEnvEnableZ7Debug, "TRUE")) || bIndividualPDBs; for(std::vector<std::string>::const_iterator i = rawargs.begin(); i != rawargs.end(); ++i) { if (env_prefix_next_arg) @@ -152,21 +153,12 @@ std::string processccargs(const std::vector<std::string>& rawargs, std::string & << (*i) << "\"" << std::endl; exit(1); } - - if (bIndividualPDBs && !bEnableZ7Debug) - { - if (dot == std::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")) { if(!bEnableZ7Debug) { args.append("-Zi"); - if (!bIndividualPDBs) - args.append(" -FS"); + args.append(" -FS"); } else {