aboutsummaryrefslogtreecommitdiff
path: root/src/link.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/link.cpp')
-rw-r--r--src/link.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/link.cpp b/src/link.cpp
index 7cba3287cb..f69b2fb698 100644
--- a/src/link.cpp
+++ b/src/link.cpp
@@ -435,10 +435,13 @@ static void construct_linker_job_coff(LinkJob *lj) {
lj->args.append((const char *)buf_ptr(g->link_objects.at(i)));
}
- if (g->libc_link_lib == nullptr && (g->out_type == OutTypeExe || g->out_type == OutTypeLib)) {
- Buf *builtin_o_path = build_o(g, "builtin");
- lj->args.append(buf_ptr(builtin_o_path));
+ if (g->out_type == OutTypeExe || g->out_type == OutTypeLib) {
+ if (g->libc_link_lib == nullptr) {
+ Buf *builtin_o_path = build_o(g, "builtin");
+ lj->args.append(buf_ptr(builtin_o_path));
+ }
+ // msvc compiler_rt is missing some stuff, so we still build it and rely on LinkOnce
Buf *compiler_rt_o_path = build_compiler_rt(g);
lj->args.append(buf_ptr(compiler_rt_o_path));
}