authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-10-01 21:19:06-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-10-01 21:19:58-04:00
loge3ea0b652c7bec25d7303d98e08cdfe1d288a9ec
tree93706a404bd91e54685af663bf32170f90807766
parent756d5c545d4f05ce770511a024e9fefe258591f4

still build compiler-rt when linking msvc CRT

because it's missing some things

2 files changed, 7 insertions(+), 3 deletions(-)

src/link.cpp+6-3
......@@ -435,10 +435,13 @@ static void construct_linker_job_coff(LinkJob *lj) {
435435 lj->args.append((const char *)buf_ptr(g->link_objects.at(i)));
436436 }
437437
438 if (g->libc_link_lib == nullptr && (g->out_type == OutTypeExe || g->out_type == OutTypeLib)) {
439 Buf *builtin_o_path = build_o(g, "builtin");
440 lj->args.append(buf_ptr(builtin_o_path));
438 if (g->out_type == OutTypeExe || g->out_type == OutTypeLib) {
439 if (g->libc_link_lib == nullptr) {
440 Buf *builtin_o_path = build_o(g, "builtin");
441 lj->args.append(buf_ptr(builtin_o_path));
442 }
441443
444 // msvc compiler_rt is missing some stuff, so we still build it and rely on LinkOnce
442445 Buf *compiler_rt_o_path = build_compiler_rt(g);
443446 lj->args.append(buf_ptr(compiler_rt_o_path));
444447 }
std/special/compiler_rt/comparetf2.zig+1
......@@ -117,6 +117,7 @@ export fn __unordtf2(a: f128, b: f128) -> c_int {
117117}
118118
119119// The following are alternative names for the preceding routines.
120// TODO use aliases https://github.com/zig-lang/zig/issues/462
120121
121122export fn __eqtf2(a: f128, b: f128) -> c_int {
122123 @setGlobalLinkage(__eqtf2, builtin.GlobalLinkage.LinkOnce);