mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Let the Kernel FE know whether it's building for a release VM. (#18876)
Fixes #18829
This commit is contained in:
parent
ca0e144f9f
commit
698e1016bb
@ -391,6 +391,7 @@ class AOTSnapshotter {
|
||||
aot: true,
|
||||
entryPointsJsonFiles: entryPointsJsonFiles,
|
||||
trackWidgetCreation: false,
|
||||
targetProductVm: buildMode == BuildMode.release,
|
||||
);
|
||||
|
||||
// Write path to frontend_server, since things need to be re-generated when that changes.
|
||||
|
||||
@ -84,6 +84,7 @@ class KernelCompiler {
|
||||
String packagesPath,
|
||||
List<String> fileSystemRoots,
|
||||
String fileSystemScheme,
|
||||
bool targetProductVm = false,
|
||||
}) async {
|
||||
final String frontendServer = artifacts.getArtifactPath(
|
||||
Artifact.frontendServerSnapshotForEngineDartSdk
|
||||
@ -134,6 +135,9 @@ class KernelCompiler {
|
||||
command.add('--aot');
|
||||
command.add('--tfa');
|
||||
}
|
||||
if (targetProductVm) {
|
||||
command.add('-Ddart.vm.product=true');
|
||||
}
|
||||
if (entryPointsJsonFiles != null) {
|
||||
for (String entryPointsJson in entryPointsJsonFiles) {
|
||||
command.addAll(<String>['--entry-points', entryPointsJson]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user