30 for(std::size_t i = 0; i < arguments.size(); i++)
33 if(std::string(arguments[i], 0, 2) ==
"--")
37 if(arguments[i] ==
"--verbosity")
39 if(i < arguments.size() - 1)
41 set(arguments[i], arguments[i + 1]);
46 else if(!arguments[i].empty() && arguments[i][0] ==
'@')
65 std::vector<std::string> arguments;
68 for(
int i = 1; i < argc; i++)
69 arguments.push_back(argv[i]);
71 return parse(arguments);
74 static std::istream &
my_wgetline(std::istream &in, std::wstring &dest)
103 dest += wchar_t(ch1 + (ch2 << 8));
112 std::ifstream infile(file);
116 std::cerr <<
"failed to open response file '" << file <<
"'\n";
122 getline(infile, line);
124 line.size() >= 2 && line[0] ==
static_cast<char>(0xff) &&
125 line[1] ==
static_cast<char>(0xfe))
144 while(std::getline(infile2, wline))
150 line.size() >= 3 && line[0] ==
static_cast<char>(0xef) &&
151 line[1] ==
static_cast<char>(0xbb) && line[2] ==
static_cast<char>(0xbf))
157 while(getline(infile, line))
164 while(getline(infile, line))
182 std::vector<std::string> arguments;
184 bool in_quotes =
false;
185 for(std::size_t i = 0; i < line.size(); i++)
189 if(ch ==
' ' && !in_quotes)
192 arguments.push_back(option);
197 in_quotes = !in_quotes;
204 arguments.push_back(option);
219 std::cout <<
"Warning: uninterpreted non-LINK option '" << s <<
"'\n";
228 "ASSEMBLYLINKRESOURCE",
233 "CLRLOADEROPTIMIZATION",
234 "CLRSUPPORTLASTERROR",
235 "CLRTHREADATTRIBUTE",
236 "CLRUNMANAGEDCODECHECK",
273 "MANIFESTDEPENDENCY",
318 std::string result = s;
319 transform(result.begin(), result.end(), result.begin(), toupper);
328 if(s[0] !=
'/' && s[0] !=
'-')
338 to_upper_string(std::string(s, 1, std::string::npos)) == ms_link_option ||
339 to_upper_string(std::string(s, 1, ms_link_option.size() + 1)) == ms_link_option +
':')
343 if(!optnr.has_value())
355 if(s.size() > ms_link_option.size() + 1)
356 options[*optnr].values.push_back(
357 std::string(s, ms_link_option.size() + 2, std::string::npos));
364 std::cout <<
"Warning: uninterpreted LINK option '" << s <<
"'\n";