-
Tess Strickland authored
This PR adds uses of the `--target-os` command line argument when building kernel sources for precompiled applications for supported target operating systems. The Dart CFE then: * treats `Platform.operatingSystem` as if it were defined as the constant string provided as an argument to the flag, * treats `Platform.pathSeparator` as the appropriate separator for that operating system, * attempts to constant evaluate the initializer for any field annotated with the `vm:platform-const` pragma, and * attempts to constant evaluate all calls to a method annotated with the `vm:platform-const` pragma. The `vm:platform-const` pragma can appear in either library or user code. If the attempt to constant evaluate the field initializer or method call fails, then an error is thrown at kernel compilation time. Addresses #14233. The tests in `packages/flutter_tools/test/general.shard/build_system/targets/common_test.dart` have been adjusted properly to account for the new passed command line arguments.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
bin | ||
doc | ||
gradle | ||
ide_templates/intellij | ||
lib | ||
static | ||
templates | ||
test | ||
tool | ||
README.md | ||
analysis_options.yaml | ||
dart_test.yaml | ||
pubspec.yaml |