flutter/packages/flutter_tools/test/general.shard/build_system
Tess Strickland 840d7dd68a
Use --target-os for appropriate precompiled targets. (#127567)
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.
2023-06-08 13:17:18 +02:00
..
targets Use --target-os for appropriate precompiled targets. (#127567) 2023-06-08 13:17:18 +02:00
build_system_test.dart Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
depfile_test.dart Fix typos (#121171) 2023-02-23 19:43:21 +00:00
exceptions_test.dart Remove globals_null_migrated.dart, move into globals.dart (#92861) 2021-11-01 17:18:03 -07:00
file_store_test.dart Cast config values to dynamic values instead of Object (#80011) 2021-04-08 15:18:28 -07:00
hash_test.dart Convert some general.shard base tests to null safety (#79985) 2021-04-08 14:55:19 -07:00
invalidated_reason_test.dart Migrate some flutter_tools tests to null safety (#88850) 2021-08-25 16:21:04 -07:00
source_test.dart [flutter_tools] migrate more unit tests to null safety (#106153) 2022-06-17 21:34:27 -07:00