mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-08 02:55:56 +01:00
Check if the arguments have spaces in them and add back the quotes argv
parsing removes. This fixes issues with the MT flag among others. -MT "stubdata.d stubdata.o stubdata.ao"
This commit is contained in:
parent
1ef9def644
commit
cb8e8a4579
@ -289,7 +289,14 @@ bool parse(int argc, char **argv, Target &target) {
|
||||
char *arg = argv[i];
|
||||
|
||||
if (*arg != '-') {
|
||||
target.args.push_back(arg);
|
||||
// Check if the argument has spaces, we need to add back the quotes if
|
||||
// that's the case
|
||||
std::string argument = arg;
|
||||
if (argument.find_first_of("\t\n ") != std::string::npos) {
|
||||
argument = "\"" + argument + "\"";
|
||||
}
|
||||
|
||||
target.args.push_back(argument);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user