From 21565ca991bba9692ed74ec9fb9a665f8e504c7f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 30 Nov 2020 20:44:36 -0700 Subject: restore -target wasm32-freestanding-musl for C headers See #5854 Some tiny tweaks too: * Use `wasm-freestanding-musl` instead of `wasm32-freestanding-musl`, making it pointer-size-agnostic. * Fix trying to build non-existent wasm musl start files. --- src/Compilation.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index a5bf7a0ebb..e236fcea43 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1358,7 +1358,7 @@ pub fn performAllTheWork(self: *Compilation) error{ TimerUnsupported, OutOfMemor self.failed_c_objects.putAssumeCapacityNoClobber(c_object, try ErrorMsg.create( self.gpa, 0, - "unable to build C object: {}", + "unable to build C object: {s}", .{@errorName(err)}, )); c_object.status = .{ .failure = {} }; @@ -2356,7 +2356,8 @@ fn wantBuildGLibCFromSource(comp: Compilation) bool { } fn wantBuildMuslFromSource(comp: Compilation) bool { - return comp.wantBuildLibCFromSource() and comp.getTarget().isMusl(); + return comp.wantBuildLibCFromSource() and comp.getTarget().isMusl() and + !comp.getTarget().isWasm(); } fn wantBuildMinGWFromSource(comp: Compilation) bool { -- cgit v1.2.3