fdo#82430: gcc-wrappers: don't stop if REAL_CXX_FLAGS is empty
Hopefully should fix MSVC 2010 build... Change-Id: I3dc71acfa58cdf65dfc6d731d9ebb77fd18f7fac
This commit is contained in:
parent
0e3a462c64
commit
a18ff3d5c7
4 changed files with 7 additions and 4 deletions
|
@ -13,7 +13,7 @@ int main(int argc, char *argv[]) {
|
|||
vector<string> rawargs(argv + 1, argv + argc);
|
||||
|
||||
string command=getexe("REAL_CXX");
|
||||
string flags=getexe("REAL_CXX_FLAGS");
|
||||
string flags=getexe("REAL_CXX_FLAGS", true);
|
||||
|
||||
string args=flags.empty() ? string() : flags + " ";
|
||||
args += processccargs(rawargs);
|
||||
|
|
|
@ -13,7 +13,7 @@ int main(int argc, char *argv[]) {
|
|||
vector<string> rawargs(argv + 1, argv + argc);
|
||||
|
||||
string command=getexe("REAL_CC");
|
||||
string flags=getexe("REAL_CC_FLAGS");
|
||||
string flags=getexe("REAL_CC_FLAGS", true);
|
||||
|
||||
string args=flags.empty() ? string() : flags + " ";
|
||||
args += processccargs(rawargs);
|
||||
|
|
|
@ -15,11 +15,14 @@
|
|||
|
||||
#define BUFLEN 2048
|
||||
|
||||
string getexe(string exename) {
|
||||
string getexe(string exename, bool maybeempty) {
|
||||
char* cmdbuf;
|
||||
size_t cmdlen;
|
||||
_dupenv_s(&cmdbuf,&cmdlen,exename.c_str());
|
||||
if(!cmdbuf) {
|
||||
if (maybeempty) {
|
||||
return string();
|
||||
}
|
||||
cout << "Error " << exename << " not defined. Did you forget to source the environment?" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
string getexe(string exename);
|
||||
string getexe(string exename, bool maybeempty = false);
|
||||
|
||||
void setupccenv();
|
||||
|
||||
|
|
Loading…
Reference in a new issue