diff options
| author | bayo-code <hardebahyho@gmail.com> | 2024-11-10 07:16:13 +0100 |
|---|---|---|
| committer | bayo-code <hardebahyho@gmail.com> | 2024-11-10 07:16:13 +0100 |
| commit | b589e3c499649aa956a9ebf98ae2aca260156471 (patch) | |
| tree | cc5111a5e7119d0c9aa74587b89532e0bc9da18d /src/main.cpp | |
| parent | da196a2b74f58be1762d496942fea83371c96d03 (diff) | |
List the supported targets using `odin targets`
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 3a32639b8..2f2c3207f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -288,6 +288,7 @@ gb_internal void usage(String argv0, String argv1 = {}) { print_usage_line(1, "test Builds and runs procedures with the attribute @(test) in the initial package."); print_usage_line(1, "doc Generates documentation on a directory of .odin files."); print_usage_line(1, "version Prints version."); + print_usage_line(1, "targets Prints the supported targets."); print_usage_line(1, "report Prints information useful to reporting a bug."); print_usage_line(1, "root Prints the root path where Odin looks for the builtin collections."); print_usage_line(0, ""); @@ -3182,6 +3183,12 @@ int main(int arg_count, char const **arg_ptr) { gb_printf("\n"); return 0; + } else if (command == "targets") { + gb_printf_err("All supported targets:\n"); + for (isize i = 0; i < gb_count_of(named_targets); i++) { + gb_printf_err("\t%.*s\n", LIT(named_targets[i].name)); + } + return 0; } else if (command == "report") { build_context.command_kind = Command_bug_report; print_bug_report_help(); |