[lld] r310864 - Add a comment and remove a TODO.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 10:48:30 PDT 2017
Author: ruiu
Date: Mon Aug 14 10:48:30 2017
New Revision: 310864
URL: http://llvm.org/viewvc/llvm-project?rev=310864&view=rev
Log:
Add a comment and remove a TODO.
A TODO is not a todo unless we really have to do it, but
they are not required at the moment.
Modified:
lld/trunk/ELF/Driver.cpp
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=310864&r1=310863&r2=310864&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Mon Aug 14 10:48:30 2017
@@ -701,6 +701,7 @@ void LinkerDriver::readConfigs(opt::Inpu
Config->ZText = !hasZOption(Args, "notext");
Config->ZWxneeded = hasZOption(Args, "wxneeded");
+ // Parse LTO plugin-related options for compatibility with gold.
for (auto *Arg : Args.filtered(OPT_plugin_opt, OPT_plugin_opt_eq)) {
StringRef S = Arg->getValue();
if (S == "disable-verify")
@@ -713,13 +714,12 @@ void LinkerDriver::readConfigs(opt::Inpu
Config->LTOPartitions = parseInt(S.substr(15), Arg);
else if (S.startswith("jobs="))
Config->ThinLTOJobs = parseInt(S.substr(5), Arg);
- // Ignore some options always passed by gcc.
- // FIXME: support --plugin-opt=mcpu= and --plugin-opt=thinlto.
else if (!S.startswith("/") && !S.startswith("-fresolution=") &&
!S.startswith("-pass-through=") && !S.startswith("mcpu=") &&
!S.startswith("thinlto"))
error(Arg->getSpelling() + ": unknown option: " + S);
}
+
if (Config->LTOO > 3)
error("invalid optimization level for LTO: " + Twine(Config->LTOO));
if (Config->LTOPartitions == 0)
@@ -727,8 +727,8 @@ void LinkerDriver::readConfigs(opt::Inpu
if (Config->ThinLTOJobs == 0)
error("--thinlto-jobs: number of threads must be > 0");
+ // Parse ELF{32,64}{LE,BE} and CPU type.
if (auto *Arg = Args.getLastArg(OPT_m)) {
- // Parse ELF{32,64}{LE,BE} and CPU type.
StringRef S = Arg->getValue();
std::tie(Config->EKind, Config->EMachine, Config->OSABI) =
parseEmulation(S);
More information about the llvm-commits
mailing list