diff options
author | Rui Ueyama <ruiu@google.com> | 2017-04-26 21:27:33 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-04-26 21:27:33 +0000 |
commit | cf8247ef4850f4568dc54295a2e673b87065c436 (patch) | |
tree | feb775812ecbb5a0aca1c0b92cbb92a6f63c083a | |
parent | 08af54c3043e274b696e5b6e2018f8c8a227fec1 (diff) | |
download | bcm5719-llvm-cf8247ef4850f4568dc54295a2e673b87065c436.tar.gz bcm5719-llvm-cf8247ef4850f4568dc54295a2e673b87065c436.zip |
Do flag compatibility check in checkOptions. NFC.
llvm-svn: 301476
-rw-r--r-- | lld/ELF/Driver.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 3e5b8dceeff..d6aa946d327 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -242,6 +242,9 @@ static void checkOptions(opt::InputArgList &Args) { if (Config->Pie && Config->Shared) error("-shared and -pie may not be used together"); + if (!Config->Shared && !Config->AuxiliaryList.empty()) + error("-f may not be used without -shared"); + if (Config->Relocatable) { if (Config->Shared) error("-r and -shared may not be used together"); @@ -708,9 +711,6 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) { std::tie(Config->SysvHash, Config->GnuHash) = getHashStyle(Args); std::tie(Config->BuildId, Config->BuildIdVector) = getBuildId(Args); - if (!Config->Shared && !Config->AuxiliaryList.empty()) - error("-f may not be used without -shared"); - if (auto *Arg = Args.getLastArg(OPT_symbol_ordering_file)) if (Optional<MemoryBufferRef> Buffer = readFile(Arg->getValue())) Config->SymbolOrderingFile = getLines(*Buffer); |