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 @@...@@ -4,6 +4,7 @@
4 * tests passing with -Dskip-non-native4 * tests passing with -Dskip-non-native
5 * `-ftime-report`5 * `-ftime-report`
6 * -fstack-report print stack size diagnostics\n"6 * -fstack-report print stack size diagnostics\n"
7 * subsystem
7 * mingw-w648 * mingw-w64
8 * MachO LLD linking9 * MachO LLD linking
9 * COFF LLD linking10 * 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) {...@@ -36,9 +36,10 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
36 " --output-dir [dir] override output directory (defaults to cwd)\n"36 " --output-dir [dir] override output directory (defaults to cwd)\n"
37 " --pkg-begin [name] [path] make pkg available to import and push current pkg\n"37 " --pkg-begin [name] [path] make pkg available to import and push current pkg\n"
38 " --pkg-end pop current pkg\n"38 " --pkg-end pop current pkg\n"
39 " --release-fast build with optimizations on and safety off\n"39 " -ODebug build with optimizations on and safety off\n"
40 " --release-safe build with optimizations on and safety on\n"40 " -OReleaseFast build with optimizations on and safety off\n"
41 " --release-small build with size 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"
42 " --single-threaded source may assume it is only used single-threaded\n"43 " --single-threaded source may assume it is only used single-threaded\n"
43 " -dynamic create a shared library (.so; .dll; .dylib)\n"44 " -dynamic create a shared library (.so; .dll; .dylib)\n"
44 " --strip exclude debug symbols\n"45 " --strip exclude debug symbols\n"
...@@ -267,11 +268,13 @@ int main(int argc, char **argv) {...@@ -267,11 +268,13 @@ int main(int argc, char **argv) {
267 if (arg[0] == '-') {268 if (arg[0] == '-') {
268 if (strcmp(arg, "--") == 0) {269 if (strcmp(arg, "--") == 0) {
269 fprintf(stderr, "Unexpected end-of-parameter mark: %s\n", arg);270 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) {
271 optimize_mode = BuildModeFastRelease;274 optimize_mode = BuildModeFastRelease;
272 } else if (strcmp(arg, "--release-safe") == 0) {275 } else if (strcmp(arg, "-OReleaseSafe") == 0) {
273 optimize_mode = BuildModeSafeRelease;276 optimize_mode = BuildModeSafeRelease;
274 } else if (strcmp(arg, "--release-small") == 0) {277 } else if (strcmp(arg, "-OReleaseSmall") == 0) {
275 optimize_mode = BuildModeSmallRelease;278 optimize_mode = BuildModeSmallRelease;
276 } else if (strcmp(arg, "--help") == 0) {279 } else if (strcmp(arg, "--help") == 0) {
277 return print_full_usage(arg0, stdout, EXIT_SUCCESS);280 return print_full_usage(arg0, stdout, EXIT_SUCCESS);