• Tess Strickland's avatar
    Use `--target-os` for appropriate precompiled targets. (#127567) · 840d7dd6
    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.
    840d7dd6
Name
Last commit
Last update
..
android.dart Loading commit data...
assets.dart Loading commit data...
common.dart Loading commit data...
dart_plugin_registrant.dart Loading commit data...
deferred_components.dart Loading commit data...
desktop.dart Loading commit data...
icon_tree_shaker.dart Loading commit data...
ios.dart Loading commit data...
linux.dart Loading commit data...
localizations.dart Loading commit data...
macos.dart Loading commit data...
scene_importer.dart Loading commit data...
shader_compiler.dart Loading commit data...
web.dart Loading commit data...
windows.dart Loading commit data...