Call cl::ParseCommandLineOptions from the driver.
Thanks to Rui for the suggestion; this simplifies things. llvm-svn: 265213
This commit is contained in:
parent
e70901552c
commit
abd25c9b3e
|
@ -91,7 +91,6 @@ struct Configuration {
|
|||
uint16_t EMachine = llvm::ELF::EM_NONE;
|
||||
uint64_t EntryAddr = -1;
|
||||
unsigned LtoO;
|
||||
std::vector<const char *> MLlvm;
|
||||
unsigned Optimize;
|
||||
};
|
||||
|
||||
|
|
|
@ -309,9 +309,11 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
|
|||
for (auto *Arg : Args.filtered(OPT_undefined))
|
||||
Config->Undefined.push_back(Arg->getValue());
|
||||
|
||||
Config->MLlvm.push_back("lld (LLVM option parsing)");
|
||||
std::vector<const char *> Argv;
|
||||
Argv.push_back("lld (LLVM option parsing)");
|
||||
for (auto *Arg : Args.filtered(OPT_mllvm))
|
||||
Config->MLlvm.push_back(Arg->getValue());
|
||||
Argv.push_back(Arg->getValue());
|
||||
cl::ParseCommandLineOptions(Argv.size(), Argv.data());
|
||||
}
|
||||
|
||||
void LinkerDriver::createFiles(opt::InputArgList &Args) {
|
||||
|
|
|
@ -143,8 +143,6 @@ std::unique_ptr<InputFile> BitcodeCompiler::compile() {
|
|||
internalize(*GV);
|
||||
}
|
||||
|
||||
cl::ParseCommandLineOptions(Config->MLlvm.size(), Config->MLlvm.data());
|
||||
|
||||
if (Config->SaveTemps)
|
||||
saveBCFile(Combined, ".lto.bc");
|
||||
|
||||
|
|
Loading…
Reference in New Issue