zig icon indicating copy to clipboard operation
zig copied to clipboard

bootstrap / zig2 compiler should support basic usage information (help, version)

Open tomoverlund opened this issue 2 years ago • 0 comments

Zig Version

master

Steps to Reproduce and Observed Output

I followed the instructions on the Github README for a boostrap compiler without LLVM:

$ cc -o bootstrap bootstrap.c
$ ./bootstrap

Running the zig2 executable:

$ ./zig2 --help
thread 6485 panic: only a few subcommands are supported in a zig2.c build
Unable to dump stack trace: debug info stripped
Aborted

Same thing happens for "--version" or "version" or any subcommand not supported. The "run" subcommand works.

Expected Output

Usage information that tells me what those "few subcommands" are. "version" and "help" subcommands should also work.

This looks to be the code in src/main.zig:

    } else if (build_options.only_core_functionality) {
        @panic("only a few subcommands are supported in a zig2.c build");

tomoverlund avatar Dec 26 '23 04:12 tomoverlund