| ... | ... | @@ -2842,6 +2842,12 @@ pub fn build_crt_file( |
| 2842 | 2842 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, |
| 2843 | 2843 | .clang_passthrough_mode = comp.clang_passthrough_mode, |
| 2844 | 2844 | .is_compiler_rt_or_libc = true, |
| 2845 | // This is so that compiler_rt and libc.zig libraries know whether they |
| 2846 | // will eventually be linked with libc. They make different decisions |
| 2847 | // about what to export depending on whether another libc will be linked |
| 2848 | // in. For example, compiler_rt will not export the __chkstk symbol if it |
| 2849 | // knows libc will provide it, and likewise c.zig will not export memcpy. |
| 2850 | .link_libc = comp.bin_file.options.link_libc, |
| 2845 | 2851 | }); |
| 2846 | 2852 | defer sub_compilation.destroy(); |
| 2847 | 2853 | |