test-cli: port build options test to new build system API

Since we need testing for passing `--build-file` and `--cache-dir`
together anyway, use it to test the disabled build options test.
This commit is contained in:
Jacob Young
2025-05-20 22:59:07 -04:00
parent fe855691f6
commit cdba1d591a
2 changed files with 18 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ pub fn build(b: *std.Build) void {
}) });
const options = b.addOptions();
main.addOptions("build_options", options);
main.root_module.addOptions("build_options", options);
options.addOption(bool, "bool_true", b.option(bool, "bool_true", "t").?);
options.addOption(bool, "bool_false", b.option(bool, "bool_false", "f").?);
options.addOption(u32, "int", b.option(u32, "int", "i").?);