Skip to content

Enable tree shaking of platform-specific code in AOT mode. #31969

Closed
@mraleph

Description

@mraleph

Based on the converstation with Flutter users it seems that Flutter code it is common to guard large chunks of code behind runtime checks that boil down to:

if (Platform.isAndroid) {
  // ...
}

(actual flutter code might be using a layer on top: see https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/foundation/platform.dart)

Here's a list of subtasks:

/cc @lukef @mit-mit

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions