Files
Tess Strickland af5221f442 [test_runner] Convert boolean use-elf to an enum gen-snapshot-format.
Currently, the configuration code only has a boolean option, 'use-elf'
for specifying the output format for gen_snapshot. If false, then the
output format is assumed to be assembly.

Add a new GenSnapshotFormat enum and replace the old 'use-elf' option
with a new 'gen-snapshot-format' option. The new enum has two getters:

* snapshotType returns the appropriate string to pass to gen_snapshot
  via the '--snapshot-type' option.
* fileOption returns the name of the option used to specify the
  output path for the given format.

In addition, make it so the Configuration only has a non-null
genSnapshotFormat field if the compiler is Compiler.dartkp to avoid
spurious differences in Configurations that are created with different
GenSnapshotFormat values when the configurations in question don't
actually call gen_snapshot.

TEST=pkg/smith/test/configuration_test.dart (and the CI in general)

Change-Id: I7f17dc8d3a1bb6d4bf57750bc5ef4a16b8a78c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429980
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-05-26 08:53:03 -07:00
..