summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-04-26 21:27:33 +0000
committerRui Ueyama <ruiu@google.com>2017-04-26 21:27:33 +0000
commitcf8247ef4850f4568dc54295a2e673b87065c436 (patch)
treefeb775812ecbb5a0aca1c0b92cbb92a6f63c083a
parent08af54c3043e274b696e5b6e2018f8c8a227fec1 (diff)
downloadbcm5719-llvm-cf8247ef4850f4568dc54295a2e673b87065c436.tar.gz
bcm5719-llvm-cf8247ef4850f4568dc54295a2e673b87065c436.zip
Do flag compatibility check in checkOptions. NFC.
llvm-svn: 301476
-rw-r--r--lld/ELF/Driver.cpp6
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);
OpenPOWER on IntegriCloud