Unverified Commit 47996304 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1228 from ethereum/enableYulOptimizer

Enable yul optimizations if optimizations are enabled and in Yul mode.
parents 2b902655 d1bd5cd8
...@@ -7,7 +7,8 @@ module.exports = (sources, opts) => { ...@@ -7,7 +7,8 @@ module.exports = (sources, opts) => {
settings: { settings: {
optimizer: { optimizer: {
enabled: opts.optimize === true || opts.optimize === 1, enabled: opts.optimize === true || opts.optimize === 1,
runs: 200 runs: 200,
details: {}
}, },
libraries: opts.libraries, libraries: opts.libraries,
outputSelection: { outputSelection: {
...@@ -24,5 +25,9 @@ module.exports = (sources, opts) => { ...@@ -24,5 +25,9 @@ module.exports = (sources, opts) => {
if (opts.language) { if (opts.language) {
o.language = opts.language o.language = opts.language
} }
if (opts.language === 'Yul' && o.settings.optimizer.enabled)
{
o.settings.optimizer.details['yul'] = true
}
return JSON.stringify(o) return JSON.stringify(o)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment