mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
A few minor path fixes for Windows.
When launching argdumper, there are a few problems with the current logic. First, on Windows, the file is called argdumper.exe, not argdumper. Second, Windows paths have backslashes in them, and JSON treats <backslash><char> as an escape sequence. To fix the second problem, on Windows we convert backslashes to forward slashes, since backslash isn't a valid filename character anyway this shouldn't be a problem. llvm-svn: 229784
This commit is contained in:
@@ -1122,7 +1122,11 @@ Platform::LaunchProcess (ProcessLaunchInfo &launch_info)
|
||||
error.SetErrorString("could not find argdumper tool");
|
||||
return error;
|
||||
}
|
||||
#if defined(_WIN32)
|
||||
glob_tool_spec.AppendPathComponent("argdumper.exe");
|
||||
#else
|
||||
glob_tool_spec.AppendPathComponent("argdumper");
|
||||
#endif
|
||||
if (!glob_tool_spec.Exists())
|
||||
{
|
||||
error.SetErrorString("could not find argdumper tool");
|
||||
@@ -1131,7 +1135,9 @@ Platform::LaunchProcess (ProcessLaunchInfo &launch_info)
|
||||
|
||||
std::string quoted_cmd_string;
|
||||
launch_info.GetArguments().GetQuotedCommandString(quoted_cmd_string);
|
||||
|
||||
#if defined(_WIN32)
|
||||
std::replace(quoted_cmd_string.begin(), quoted_cmd_string.end(), '\\', '/');
|
||||
#endif
|
||||
StreamString glob_command;
|
||||
|
||||
glob_command.Printf("%s %s",
|
||||
|
||||
Reference in New Issue
Block a user