mlugg 927f233ff8 compiler: allow emitting tests to an object file
This is fairly straightforward; the actual compiler changes are limited
to the CLI, since `Compilation` already supports this combination.

A new `std.Build` API is introduced to allow representing this. By
passing the `emit_object` option to `std.Build.addTest`, you get a
`Step.Compile` which emits an object file; you can then use that as you
would any other object, such as either installing it for external use,
or linking it into another step.

A standalone test is added to cover the build system API. It builds a
test into an object, and links it into a final executable, which it then
runs.

Using this build system mechanism prevents the build system from
noticing that you're running a `zig test`, so the build runner and test
runner do not communicate over stdio. However, that's okay, because the
real-world use cases for this feature don't want to do that anyway!

Resolves: #23374
2025-04-22 22:50:36 +01:00
..
2024-12-19 17:10:03 -05:00
2025-02-22 14:32:48 -08:00
2025-04-03 14:55:04 -07:00
2025-02-05 13:58:15 +01:00
2025-04-15 23:36:43 +02:00
2025-02-06 14:23:23 -08:00
2025-03-17 21:56:17 +03:30
2025-02-22 14:32:48 -08:00
2024-08-29 23:43:52 +01:00
2025-04-03 15:35:21 -07:00
2025-02-06 14:23:23 -08:00
2025-02-03 09:14:37 +00:00