diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-01-03 04:55:16 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-01-03 04:55:49 -0500 |
| commit | 36ff26609b1d81a253053e7d7785392fae240dab (patch) | |
| tree | 5226307e3861ac8d9c944ffa611a84f6205a55a6 /src/link.cpp | |
| parent | 6281a511e130aeb4f7c777de9b90c60d7c8c6f34 (diff) | |
| download | zig-36ff26609b1d81a253053e7d7785392fae240dab.tar.gz zig-36ff26609b1d81a253053e7d7785392fae240dab.zip | |
fix self hosted compiler on windows
Diffstat (limited to 'src/link.cpp')
| -rw-r--r-- | src/link.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/link.cpp b/src/link.cpp index f07364e5bc..13e61dd4e7 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -426,8 +426,7 @@ static void construct_linker_job_coff(LinkJob *lj) { if (g->is_static) { Buf *cmt_lib_name = buf_sprintf("libcmt%s.lib", d_str); lj->args.append(buf_ptr(cmt_lib_name)); - } - else { + } else { Buf *msvcrt_lib_name = buf_sprintf("msvcrt%s.lib", d_str); lj->args.append(buf_ptr(msvcrt_lib_name)); } @@ -452,6 +451,9 @@ static void construct_linker_job_coff(LinkJob *lj) { // } //} //lj->args.append(get_libc_static_file(g, "crtbegin.o")); + + // msvcrt depends on kernel32 + lj->args.append("kernel32.lib"); } else { lj->args.append("-NODEFAULTLIB"); if (!is_library) { |
