mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow using both --optimize-yul and --no-optimize-yul at the same time
This commit is contained in:
parent
b24e4fcbfa
commit
a11b1c83f0
@ -9,6 +9,7 @@ Compiler Features:
|
||||
|
||||
|
||||
Bugfixes:
|
||||
* Commandline Interface: It is no longer possible to specify both ``--optimize-yul`` and ``--no-optimize-yul`` at the same time.
|
||||
* SMTChecker: Fix encoding of side-effects inside ``if`` and ``ternary conditional``statements in the BMC engine.
|
||||
|
||||
|
||||
|
@ -1146,6 +1146,13 @@ void CommandLineParser::processArgs()
|
||||
m_options.output.eofVersion = 1;
|
||||
}
|
||||
|
||||
if (m_args.count(g_strNoOptimizeYul) > 0 && m_args.count(g_strOptimizeYul) > 0)
|
||||
solThrow(
|
||||
CommandLineValidationError,
|
||||
"Options --" + g_strOptimizeYul + " and --" + g_strNoOptimizeYul + " cannot be used together."
|
||||
);
|
||||
|
||||
// We deliberately ignore --optimize-yul
|
||||
m_options.optimizer.enabled = (m_args.count(g_strOptimize) > 0);
|
||||
m_options.optimizer.noOptimizeYul = (m_args.count(g_strNoOptimizeYul) > 0);
|
||||
if (!m_args[g_strOptimizeRuns].defaulted())
|
||||
|
@ -0,0 +1 @@
|
||||
Options --optimize-yul and --no-optimize-yul cannot be used together.
|
@ -0,0 +1 @@
|
||||
1
|
@ -1 +1 @@
|
||||
The following options are invalid in assembly mode: --optimize-yul, --no-optimize-yul. Optimization is disabled by default and can be enabled with --optimize.
|
||||
Options --optimize-yul and --no-optimize-yul cannot be used together.
|
||||
|
Loading…
Reference in New Issue
Block a user