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 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 |