Unverified Commit 231b9425 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Block debug AOT snapshot builds (#17393)

We previously blocked iOS AOT builds, but Android debug builds are
always JIT builds.
parent 671489ff
......@@ -378,7 +378,7 @@ class AOTSnapshotter {
}
bool _isValidAotPlatform(TargetPlatform platform, BuildMode buildMode) {
if (platform == TargetPlatform.ios && buildMode == BuildMode.debug)
if (buildMode == BuildMode.debug)
return false;
return const <TargetPlatform>[
TargetPlatform.android_arm,
......
......@@ -339,6 +339,19 @@ void main() {
), isNot(equals(0)));
}, overrides: contextOverrides);
testUsingContext('Android ARM debug AOT snapshot is invalid', () async {
final String outputPath = fs.path.join('build', 'foo');
expect(await snapshotter.build(
platform: TargetPlatform.android_arm,
buildMode: BuildMode.debug,
mainPath: 'main.dill',
packagesPath: '.packages',
outputPath: outputPath,
preferSharedLibrary: false,
previewDart2: true,
), isNot(0));
}, overrides: contextOverrides);
testUsingContext('builds iOS profile AOT snapshot', () async {
fs.file('main.dill').writeAsStringSync('binary magic');
......
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