aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-26 16:24:32 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-26 16:24:32 -0500
commit33174f11ef5cbb3534217dbc1502886d97226778 (patch)
treea57894a7e791074a4726b883ba6608eddb7e88cd /src/codegen.cpp
parentade10387a583351fe597b58c4c9ceb97d959adf5 (diff)
downloadzig-33174f11ef5cbb3534217dbc1502886d97226778.tar.gz
zig-33174f11ef5cbb3534217dbc1502886d97226778.zip
fix regressions on Windows
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 4e8cd070f4..58682cdd88 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -8174,20 +8174,19 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
args.append(buf_ptr(out_dep_path));
}
- args.append("-nobuiltininc");
args.append("-nostdinc");
- args.append("-nostdinc++");
-
- if (g->libc_link_lib == nullptr) {
- args.append("-nolibc");
- }
-
args.append("-fno-spell-checking");
args.append("-isystem");
args.append(buf_ptr(g->zig_c_headers_dir));
if (g->libc != nullptr) {
+ if (buf_len(&g->libc->msvc_lib_dir) != 0) {
+ Buf *include_dir = buf_sprintf("%s" OS_SEP ".." OS_SEP ".." OS_SEP "include", buf_ptr(&g->libc->msvc_lib_dir));
+ args.append("-isystem");
+ args.append(buf_ptr(include_dir));
+ }
+
args.append("-isystem");
args.append(buf_ptr(&g->libc->include_dir));
}