authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-29 01:28:48-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-29 01:30:35-07:00
log3efdd7b2ad6cce5985d761240636b3d5eb3b4c84
tree130330bddb26b0d4f4f7d39a250552220294f955
parentd3a99c7bd5396f2e458d844368ce2743934e43e2

don't try to build musl crti.o crtn.o when it's not needed

such as on RISC-V

2 files changed, 9 insertions(+), 4 deletions(-)

BRANCH_TODO+1-1
......@@ -1,3 +1,3 @@
1 * building risc-v musl regression
1 * wasi behavior tests failing
22 * go ahead and use allocSentinel now that the stage1 bug is fixed
33 * audit the base cache hash
src/Compilation.zig+8-3
......@@ -855,9 +855,14 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
855855 try comp.addBuildingGLibCJobs();
856856 }
857857 if (comp.wantBuildMuslFromSource()) {
858 try comp.work_queue.write(&[_]Job{
859 .{ .musl_crt_file = .crti_o },
860 .{ .musl_crt_file = .crtn_o },
858 try comp.work_queue.ensureUnusedCapacity(5);
859 if (target_util.libc_needs_crti_crtn(comp.getTarget())) {
860 comp.work_queue.writeAssumeCapacity(&[_]Job{
861 .{ .musl_crt_file = .crti_o },
862 .{ .musl_crt_file = .crtn_o },
863 });
864 }
865 comp.work_queue.writeAssumeCapacity(&[_]Job{
861866 .{ .musl_crt_file = .crt1_o },
862867 .{ .musl_crt_file = .scrt1_o },
863868 .{ .musl_crt_file = .libc_a },