diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-08-03 18:24:35 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-08-06 15:00:47 -0700 |
| commit | e9b5377b8e411b73d1004f4e15d072ab56aca62e (patch) | |
| tree | 819f5d8cd442d3d5c8bb1e4c0241454f5969a576 /src | |
| parent | c8a226a42960297deb0b7bf270cc3ef3253f0c6d (diff) | |
| download | zig-e9b5377b8e411b73d1004f4e15d072ab56aca62e.tar.gz zig-e9b5377b8e411b73d1004f4e15d072ab56aca62e.zip | |
musl: Disable warnings in all compilations.
This is what upstream's configure does.
Previously, we only disabled warnings in some musl compilations, with `rcrt1.o`
notably being one for which we didn't. This resulted in a warning in `dlstart.c`
which is included in `rcrt1.c`. So let's just be consistent and disable warnings
for all musl code.
Closes #13385.
Diffstat (limited to 'src')
| -rw-r--r-- | src/musl.zig | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/musl.zig b/src/musl.zig index b75009c447..a267993fbe 100644 --- a/src/musl.zig +++ b/src/musl.zig @@ -32,9 +32,6 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile, prog_node: std.Progre .crti_o => { var args = std.ArrayList([]const u8).init(arena); try addCcArgs(comp, arena, &args, false); - try args.appendSlice(&[_][]const u8{ - "-Qunused-arguments", - }); var files = [_]Compilation.CSourceFile{ .{ .src_path = try start_asm_path(comp, arena, "crti.s"), @@ -47,9 +44,6 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile, prog_node: std.Progre .crtn_o => { var args = std.ArrayList([]const u8).init(arena); try addCcArgs(comp, arena, &args, false); - try args.appendSlice(&[_][]const u8{ - "-Qunused-arguments", - }); var files = [_]Compilation.CSourceFile{ .{ .src_path = try start_asm_path(comp, arena, "crtn.s"), @@ -189,10 +183,6 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile, prog_node: std.Progre var args = std.ArrayList([]const u8).init(arena); try addCcArgs(comp, arena, &args, ext == .o3); - try args.appendSlice(&[_][]const u8{ - "-Qunused-arguments", - "-w", // disable all warnings - }); const c_source_file = try c_source_files.addOne(); c_source_file.* = .{ .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libc", src_file }), @@ -427,6 +417,9 @@ fn addCcArgs( "-fno-asynchronous-unwind-tables", "-ffunction-sections", "-fdata-sections", + + "-Qunused-arguments", + "-w", // disable all warnings }); } |
