forked from OSchip/llvm-project
Do flag compatibility check in checkOptions. NFC.
llvm-svn: 301476
This commit is contained in:
parent
08af54c304
commit
cf8247ef48
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue