• 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
..
targets Loading commit data...
build_system_test.dart Loading commit data...
depfile_test.dart Loading commit data...
exceptions_test.dart Loading commit data...
file_store_test.dart Loading commit data...
hash_test.dart Loading commit data...
invalidated_reason_test.dart Loading commit data...
source_test.dart Loading commit data...