[flutter_tools] Support profile and release builds on Linux (#57135)

This commit is contained in:
Marcus Tomlinson
2020-05-29 23:38:02 +01:00
committed by GitHub
parent 03c74eb42e
commit 5ee5490a63
11 changed files with 179 additions and 53 deletions

View File

@@ -45,10 +45,7 @@ or
final String flutterExecutable = path.join(
flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter');
final String bundlePlatform = targetPlatform == 'windows-x64' ? 'windows' : 'linux';
// TODO(jonahwilliams): currently all Linux builds are debug builds. Remove the
// hardcoded mode when profile and release support is added.
final String bundleMode = targetPlatform == 'windows-x64' ? buildMode : 'debug';
final String target = '${bundleMode}_bundle_${bundlePlatform}_assets';
final String target = '${buildMode}_bundle_${bundlePlatform}_assets';
final Process assembleProcess = await Process.start(
flutterExecutable,
@@ -61,7 +58,7 @@ or
'--output=build',
'-dTargetPlatform=$targetPlatform',
'-dTrackWidgetCreation=$trackWidgetCreation',
'-dBuildMode=$bundleMode',
'-dBuildMode=$buildMode',
'-dTargetFile=$flutterTarget',
'-dTreeShakeIcons="$treeShakeIcons"',
'-dDartObfuscation=$dartObfuscation',