aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-04-22 20:54:52 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-04-22 20:54:52 -0400
commit1c41f1ca6252faaa7750936c67562f1866a48075 (patch)
tree7627845397b04afdce73cfe824865b76262a0d76 /src/analyze.cpp
parent371a3ad4bd7b1fda56654f32b89c176a0197651f (diff)
downloadzig-1c41f1ca6252faaa7750936c67562f1866a48075.tar.gz
zig-1c41f1ca6252faaa7750936c67562f1866a48075.zip
better error reporting for missing libc on windows
closes #931
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index d142b86326..5dd7b0d18c 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -4433,7 +4433,8 @@ void find_libc_lib_path(CodeGen *g) {
if (g->msvc_lib_dir == nullptr) {
Buf* vc_lib_dir = buf_alloc();
if (os_get_win32_vcruntime_path(vc_lib_dir, g->zig_target.arch.arch)) {
- zig_panic("Unable to determine vcruntime path.");
+ fprintf(stderr, "Unable to determine vcruntime path. --msvc-lib-dir");
+ exit(1);
}
g->msvc_lib_dir = vc_lib_dir;
}
@@ -4441,7 +4442,8 @@ void find_libc_lib_path(CodeGen *g) {
if (g->libc_lib_dir == nullptr) {
Buf* ucrt_lib_path = buf_alloc();
if (os_get_win32_ucrt_lib_path(sdk, ucrt_lib_path, g->zig_target.arch.arch)) {
- zig_panic("Unable to determine ucrt path.");
+ fprintf(stderr, "Unable to determine ucrt path. --libc-lib-dir");
+ exit(1);
}
g->libc_lib_dir = ucrt_lib_path;
}
@@ -4449,7 +4451,8 @@ void find_libc_lib_path(CodeGen *g) {
if (g->kernel32_lib_dir == nullptr) {
Buf* kern_lib_path = buf_alloc();
if (os_get_win32_kern32_path(sdk, kern_lib_path, g->zig_target.arch.arch)) {
- zig_panic("Unable to determine kernel32 path.");
+ fprintf(stderr, "Unable to determine kernel32 path. --kernel32-lib-dir");
+ exit(1);
}
g->kernel32_lib_dir = kern_lib_path;
}