For --profile builds on web, still use -O4 but unminified names. (#43214)
This commit is contained in:
committed by
Zachary Anderson
parent
096a8ac40a
commit
dee4232d0c
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user