Merge pull request #14266 from ethereum/disallow-optimize-yul-and-no-optimize-yul-at-the-same-time

Disallow `--optimize-yul` and `--no-optimize-yul` at the same time
This commit is contained in:
Kamil Śliwak 2023-05-25 11:37:38 +02:00 committed by GitHub
commit a089aefc05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 17 additions and 0 deletions

View File

@ -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.

View File

@ -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())

View File

@ -0,0 +1 @@
--optimize-yul --no-optimize-yul

View File

@ -0,0 +1 @@
Options --optimize-yul and --no-optimize-yul cannot be used together.

View File

@ -0,0 +1,2 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity *;

View File

@ -0,0 +1 @@
--strict-assembly --optimize-yul --no-optimize-yul

View File

@ -0,0 +1 @@
Options --optimize-yul and --no-optimize-yul cannot be used together.