authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-26 02:16:10-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-26 02:16:10-07:00
log56086d11a463297eea3a52ad8e6b245ed397029f
treed00f24fd1407d7af6c4d96994750c841638eb01c
parent819625d2740838ad10440f4af04200a38b5c65e2

stage0: update CLI to match stage2


2 files changed, 10 insertions(+), 6 deletions(-)

BRANCH_TODO+1
......@@ -4,6 +4,7 @@
44 * tests passing with -Dskip-non-native
55 * `-ftime-report`
66 * -fstack-report print stack size diagnostics\n"
7 * subsystem
78 * mingw-w64
89 * MachO LLD linking
910 * COFF LLD linking
src/stage1/zig0.cpp+9-6
......@@ -36,9 +36,10 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
3636 " --output-dir [dir] override output directory (defaults to cwd)\n"
3737 " --pkg-begin [name] [path] make pkg available to import and push current pkg\n"
3838 " --pkg-end pop current pkg\n"
39 " --release-fast build with optimizations on and safety off\n"
40 " --release-safe build with optimizations on and safety on\n"
41 " --release-small build with size optimizations on and safety off\n"
39 " -ODebug build with optimizations on and safety off\n"
40 " -OReleaseFast build with optimizations on and safety off\n"
41 " -OReleaseSafe build with optimizations on and safety on\n"
42 " -OReleaseSmall build with size optimizations on and safety off\n"
4243 " --single-threaded source may assume it is only used single-threaded\n"
4344 " -dynamic create a shared library (.so; .dll; .dylib)\n"
4445 " --strip exclude debug symbols\n"
......@@ -267,11 +268,13 @@ int main(int argc, char **argv) {
267268 if (arg[0] == '-') {
268269 if (strcmp(arg, "--") == 0) {
269270 fprintf(stderr, "Unexpected end-of-parameter mark: %s\n", arg);
270 } else if (strcmp(arg, "--release-fast") == 0) {
271 } else if (strcmp(arg, "-ODebug") == 0) {
272 optimize_mode = BuildModeDebug;
273 } else if (strcmp(arg, "-OReleaseFast") == 0) {
271274 optimize_mode = BuildModeFastRelease;
272 } else if (strcmp(arg, "--release-safe") == 0) {
275 } else if (strcmp(arg, "-OReleaseSafe") == 0) {
273276 optimize_mode = BuildModeSafeRelease;
274 } else if (strcmp(arg, "--release-small") == 0) {
277 } else if (strcmp(arg, "-OReleaseSmall") == 0) {
275278 optimize_mode = BuildModeSmallRelease;
276279 } else if (strcmp(arg, "--help") == 0) {
277280 return print_full_usage(arg0, stdout, EXIT_SUCCESS);