aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-08-17 18:57:34 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-08-17 18:57:34 -0700
commite26dda5308d5c853d195b65558454db4058ff218 (patch)
treeb3af84ac22492e4b426068e3252a58f160fd93c4 /src/main.cpp
parent044e3ca59222f26ae0a63be24510007c3e2cda82 (diff)
parent4462c60639807502eca8a2db2bcf6adafea496ef (diff)
downloadzig-e26dda5308d5c853d195b65558454db4058ff218.tar.gz
zig-e26dda5308d5c853d195b65558454db4058ff218.zip
Merge branch 'Sergeeeek-master'
closes #5394 closes #4427
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6d5f1f3f76..e2f6a82a12 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -38,6 +38,7 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
" builtin show the source code of @import(\"builtin\")\n"
" cc use Zig as a drop-in C compiler\n"
" c++ use Zig as a drop-in C++ compiler\n"
+ " env print lib path, std path, compiler id and version\n"
" fmt parse files and render in canonical zig format\n"
" id print the base64-encoded compiler id\n"
" init-exe initialize a `zig build` application in the cwd\n"
@@ -582,6 +583,8 @@ static int main0(int argc, char **argv) {
return (term.how == TerminationIdClean) ? term.code : -1;
} else if (argc >= 2 && strcmp(argv[1], "fmt") == 0) {
return stage2_fmt(argc, argv);
+ } else if (argc >= 2 && strcmp(argv[1], "env") == 0) {
+ return stage2_env(argc, argv);
} else if (argc >= 2 && (strcmp(argv[1], "cc") == 0 || strcmp(argv[1], "c++") == 0)) {
emit_h = false;
strip = true;