33 for(std::size_t i = 0; i < arguments.size(); i++)
36 if(std::string(arguments[i], 0, 2) ==
"--")
40 if(arguments[i] ==
"--verbosity")
42 if(i < arguments.size() - 1)
44 set(arguments[i], arguments[i + 1]);
49 else if(!arguments[i].empty() && arguments[i][0] ==
'@')
68 std::vector<std::string> arguments;
71 for(
int i = 1; i < argc; i++)
72 arguments.push_back(argv[i]);
74 return parse(arguments);
77 static std::istream &
my_wgetline(std::istream &in, std::wstring &dest)
106 dest += wchar_t(ch1 + (ch2 << 8));
115 std::ifstream infile(
file);
119 std::cerr <<
"failed to open response file '" <<
file <<
"'\n";
125 getline(infile, line);
127 line.size() >= 2 && line[0] ==
static_cast<char>(0xff) &&
128 line[1] ==
static_cast<char>(0xfe))
147 while(std::getline(infile2, wline))
153 line.size() >= 3 && line[0] ==
static_cast<char>(0xef) &&
154 line[1] ==
static_cast<char>(0xbb) && line[2] ==
static_cast<char>(0xbf))
160 while(getline(infile, line))
167 while(getline(infile, line))
185 std::vector<std::string> arguments;
187 bool in_quotes =
false;
188 for(std::size_t i = 0; i < line.size(); i++)
192 if(ch ==
' ' && !in_quotes)
195 arguments.push_back(option);
200 in_quotes = !in_quotes;
207 arguments.push_back(option);
222 std::cout <<
"Warning: uninterpreted non-LINK option '" << s <<
"'\n";
231 "ASSEMBLYLINKRESOURCE",
236 "CLRLOADEROPTIMIZATION",
237 "CLRSUPPORTLASTERROR",
238 "CLRTHREADATTRIBUTE",
239 "CLRUNMANAGEDCODECHECK",
276 "MANIFESTDEPENDENCY",
321 std::string result = s;
322 transform(result.begin(), result.end(), result.begin(), toupper);
331 if(s[0] !=
'/' && s[0] !=
'-')
341 to_upper_string(std::string(s, 1, std::string::npos)) == ms_link_option ||
342 to_upper_string(std::string(s, 1, ms_link_option.size() + 1)) == ms_link_option +
':')
346 if(!optnr.has_value())
358 if(s.size() > ms_link_option.size() + 1)
359 options[*optnr].values.push_back(
360 std::string(s, ms_link_option.size() + 2, std::string::npos));
367 std::cout <<
"Warning: uninterpreted LINK option '" << s <<
"'\n";