diff options
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 b156c89dc220..733eed65d606 100644 --- a/solenv/gcc-wrappers/wrapper.cxx +++ b/solenv/gcc-wrappers/wrapper.cxx @@ -100,6 +100,10 @@ string processccargs(vector<string> rawargs) { // 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) { args.append(" "); if(*i == "-o") { @@ -127,10 +131,19 @@ string processccargs(vector<string> rawargs) { << (*i) << "\""; 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 |