Kaydet (Commit) 2291cada authored tarafından Stephan Bergmann's avatar Stephan Bergmann

For some odd reason, clang-cl.exe doesn't like being called by CreateProcess

...with the executable specified in the first arg, instead of as part of the
second arg (i.e., the command line)

Change-Id: Ie6e232f6880b5bfbb91a52ee5398b91a0ccddc4d
üst 895061b8
......@@ -194,18 +194,15 @@ int startprocess(string command, string args) {
command=command.substr(0,pos+strlen("ccache"))+".exe";
}
if (args[0] != ' ')
{
args.insert(0, " "); // lpCommandLine *must* start with space!
}
auto cmdline = "\"" + command + "\" " + args;
//cerr << "CMD= " << command << " " << args << endl;
// Commandline may be modified by CreateProcess
char* cmdline=_strdup(args.c_str());
char* cmdlineBuf=_strdup(cmdline.c_str());
if(!CreateProcess(command.c_str(), // Process Name
cmdline, // Command Line
if(!CreateProcess(nullptr, // Process Name
cmdlineBuf, // Command Line
NULL, // Process Handle not Inheritable
NULL, // Thread Handle not Inheritable
TRUE, // Handles are Inherited
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment