summaryrefslogtreecommitdiff
path: root/solenv/gcc-wrappers
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@centrum.cz>2022-02-12 23:40:20 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-02-13 13:17:34 +0100
commitc5e29ad23da99913a73e28e7d5d1c096c7b9e312 (patch)
treea9c910ef047a148c3259789039de872ecb3337a5 /solenv/gcc-wrappers
parentbff93ba74ec9fdb21ab5aba9df33c181d5a7408f (diff)
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.lunak@collabora.com>
Diffstat (limited to 'solenv/gcc-wrappers')
-rw-r--r--solenv/gcc-wrappers/wrapper.cxx16
1 files changed, 4 insertions, 12 deletions
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
{