authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-10-09 13:02:01-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-10-09 13:16:51-04:00
loge29a3b1d2a74732c6e6e4a1f10a02b45797fe4e2
tree8e0e3fdce5ffee0ec8f8f47244284cf64c67e47f
parente0a94db65e24c756e5e91ac1dfafa5c85035eaee
signature Commit is signed but in an unrecognized format.

stage1 link: compiler_rt and builtin libs know ...

...whether they will be linked with libc

1 files changed, 8 insertions(+), 0 deletions(-)

src/link.cpp+8
...@@ -53,6 +53,14 @@ static Buf *build_a_raw(CodeGen *parent_gen, const char *aname, Buf *full_path)...@@ -53,6 +53,14 @@ static Buf *build_a_raw(CodeGen *parent_gen, const char *aname, Buf *full_path)
53 codegen_set_mmacosx_version_min(child_gen, parent_gen->mmacosx_version_min);53 codegen_set_mmacosx_version_min(child_gen, parent_gen->mmacosx_version_min);
54 codegen_set_mios_version_min(child_gen, parent_gen->mios_version_min);54 codegen_set_mios_version_min(child_gen, parent_gen->mios_version_min);
5555
56 // This is so that compiler_rt and builtin libraries know whether they
57 // will eventually be linked with libc. They make different decisions
58 // about what to export depending on whether libc is linked.
59 if (parent_gen->libc_link_lib != nullptr) {
60 LinkLib *new_link_lib = codegen_add_link_lib(child_gen, parent_gen->libc_link_lib->name);
61 new_link_lib->provided_explicitly = parent_gen->libc_link_lib->provided_explicitly;
62 }
63
56 child_gen->enable_cache = true;64 child_gen->enable_cache = true;
57 codegen_build_and_link(child_gen);65 codegen_build_and_link(child_gen);
58 return &child_gen->output_file_path;66 return &child_gen->output_file_path;