Commit 698e1016 authored by sjindel-google's avatar sjindel-google Committed by Vyacheslav Egorov

Let the Kernel FE know whether it's building for a release VM. (#18876)

Fixes #18829
parent ca0e144f
......@@ -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]);
......
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