mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11720 from ethereum/onlySetRunsIfUsed
Only set "runs" if used.
This commit is contained in:
commit
ffd66a5d08
@ -967,7 +967,8 @@ General Information)").c_str(),
|
|||||||
m_options.optimizer.enabled = (m_args.count(g_strOptimize) > 0);
|
m_options.optimizer.enabled = (m_args.count(g_strOptimize) > 0);
|
||||||
m_options.optimizer.noOptimizeYul = (m_args.count(g_strNoOptimizeYul) > 0);
|
m_options.optimizer.noOptimizeYul = (m_args.count(g_strNoOptimizeYul) > 0);
|
||||||
|
|
||||||
m_options.optimizer.expectedExecutionsPerDeployment = m_args.at(g_strOptimizeRuns).as<unsigned>();
|
if (!m_args[g_strOptimizeRuns].defaulted())
|
||||||
|
m_options.optimizer.expectedExecutionsPerDeployment = m_args.at(g_strOptimizeRuns).as<unsigned>();
|
||||||
|
|
||||||
if (m_args.count(g_strYulOptimizations))
|
if (m_args.count(g_strYulOptimizations))
|
||||||
{
|
{
|
||||||
@ -1132,7 +1133,8 @@ General Information)").c_str(),
|
|||||||
m_args.count(g_strModelCheckerTargets) ||
|
m_args.count(g_strModelCheckerTargets) ||
|
||||||
m_args.count(g_strModelCheckerTimeout);
|
m_args.count(g_strModelCheckerTimeout);
|
||||||
m_options.output.experimentalViaIR = (m_args.count(g_strExperimentalViaIR) > 0);
|
m_options.output.experimentalViaIR = (m_args.count(g_strExperimentalViaIR) > 0);
|
||||||
m_options.optimizer.expectedExecutionsPerDeployment = m_args[g_strOptimizeRuns].as<unsigned>();
|
if (!m_args[g_strOptimizeRuns].defaulted())
|
||||||
|
m_options.optimizer.expectedExecutionsPerDeployment = m_args.at(g_strOptimizeRuns).as<unsigned>();
|
||||||
|
|
||||||
m_options.optimizer.enabled = (m_args.count(g_strOptimize) > 0);
|
m_options.optimizer.enabled = (m_args.count(g_strOptimize) > 0);
|
||||||
m_options.optimizer.noOptimizeYul = (m_args.count(g_strNoOptimizeYul) > 0);
|
m_options.optimizer.noOptimizeYul = (m_args.count(g_strNoOptimizeYul) > 0);
|
||||||
|
@ -78,7 +78,6 @@ BOOST_AUTO_TEST_CASE(no_options)
|
|||||||
|
|
||||||
CommandLineOptions expectedOptions;
|
CommandLineOptions expectedOptions;
|
||||||
expectedOptions.input.paths = {"contract.sol"};
|
expectedOptions.input.paths = {"contract.sol"};
|
||||||
expectedOptions.optimizer.expectedExecutionsPerDeployment = 200;
|
|
||||||
expectedOptions.modelChecker.initialize = true;
|
expectedOptions.modelChecker.initialize = true;
|
||||||
expectedOptions.modelChecker.settings = {
|
expectedOptions.modelChecker.settings = {
|
||||||
ModelCheckerContracts::Default(),
|
ModelCheckerContracts::Default(),
|
||||||
@ -334,8 +333,6 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options)
|
|||||||
expectedOptions.optimizer.yulSteps = "agf";
|
expectedOptions.optimizer.yulSteps = "agf";
|
||||||
expectedOptions.optimizer.expectedExecutionsPerDeployment = 1000;
|
expectedOptions.optimizer.expectedExecutionsPerDeployment = 1000;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
expectedOptions.optimizer.expectedExecutionsPerDeployment = OptimiserSettings{}.expectedExecutionsPerDeployment;
|
|
||||||
|
|
||||||
stringstream sout, serr;
|
stringstream sout, serr;
|
||||||
optional<CommandLineOptions> parsedOptions = parseCommandLine(commandLine, sout, serr);
|
optional<CommandLineOptions> parsedOptions = parseCommandLine(commandLine, sout, serr);
|
||||||
|
Loading…
Reference in New Issue
Block a user