mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
CommandLineInterface: Disallow using --assemble, --strict-assembly, --yul, --link, --standard-json and --import-ast at the same time
This commit is contained in:
parent
a806d48ad5
commit
8396002fe7
@ -1130,6 +1130,21 @@ bool CommandLineInterface::processInput()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vector<string> const exclusiveModes = {
|
||||||
|
g_argStandardJSON,
|
||||||
|
g_argLink,
|
||||||
|
g_argAssemble,
|
||||||
|
g_argStrictAssembly,
|
||||||
|
g_argYul,
|
||||||
|
g_argImportAst,
|
||||||
|
};
|
||||||
|
if (countEnabledOptions(exclusiveModes) > 1)
|
||||||
|
{
|
||||||
|
serr() << "The following options are mutually exclusive: " << joinOptionNames(exclusiveModes) << ". ";
|
||||||
|
serr() << "Select at most one." << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_args.count(g_argStandardJSON))
|
if (m_args.count(g_argStandardJSON))
|
||||||
{
|
{
|
||||||
vector<string> inputFiles;
|
vector<string> inputFiles;
|
||||||
|
Loading…
Reference in New Issue
Block a user