Commit dee4232d authored by Harry Terkelsen's avatar Harry Terkelsen Committed by Zachary Anderson

For --profile builds on web, still use -O4 but unminified names. (#43214)

parent 096a8ac4
......@@ -137,10 +137,10 @@ class Dart2JSTarget extends Target {
'--libraries-spec=$specPath',
if (dart2jsOptimization != null)
'-$dart2jsOptimization'
else if (buildMode == BuildMode.profile)
'-O1'
else
'-O4',
if (buildMode == BuildMode.profile)
'--no-minify',
'-o',
outputFile.path,
'--packages=$packageFile',
......
......@@ -158,7 +158,8 @@ void main() {
fs.path.join('bin', 'cache', 'dart-sdk', 'bin', 'dart'),
fs.path.join('bin', 'cache', 'dart-sdk', 'bin', 'snapshots', 'dart2js.dart.snapshot'),
'--libraries-spec=' + fs.path.join('bin', 'cache', 'flutter_web_sdk', 'libraries.json'),
'-O1', // lowest optimizations.
'-O4', // highest optimizations
'--no-minify', // but uses unminified names for debugging
'-o',
environment.buildDir.childFile('main.dart.js').absolute.path,
'--packages=.packages',
......
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