authorgravatar for techatrix@mailbox.orgTechatrix <techatrix@mailbox.org> 2026-08-06 19:54:20+02:00
committergravatar for techatrix@mailbox.orgTechatrix <techatrix@mailbox.org> 2026-08-06 19:54:20+02:00
logcbf00af868e527f61ab59746ea23507a7e1e124a
tree88e4adada9270692b141825e2951f90a1287df87
parent6e61a77ec80b2974961bcc460c34af3385c101a0
signaturebadge-check Signed by SSH key SHA256:HYC3SjXQcAt6uwv9pu/6OoVQ2rUH8rb5zKiUHSe9uxk

std.Build: remove unused libc flag from compile step

Whether libc and libcpp need to be linked is resolved on the maker side in `Maker/Step/Compile.zig`.

4 files changed, 3 insertions(+), 11 deletions(-)

lib/compiler/Maker/Step/Compile.zig+2-2
...@@ -215,8 +215,8 @@ fn lowerZigArgs(...@@ -215,8 +215,8 @@ fn lowerZigArgs(
215 try addBool(gpa, zig_args, "-ffuzz", fuzz);215 try addBool(gpa, zig_args, "-ffuzz", fuzz);
216216
217 {217 {
218 var is_linking_libc = conf_comp.flags3.is_linking_libc;218 var is_linking_libc = false;
219 var is_linking_libcpp = conf_comp.flags3.is_linking_libcpp;219 var is_linking_libcpp = false;
220220
221 // Stores system libraries that have already been seen for at least one221 // Stores system libraries that have already been seen for at least one
222 // module, along with any C compiler arguments that need to be passed222 // module, along with any C compiler arguments that need to be passed
lib/std/Build/Configuration.zig+1-2
...@@ -984,8 +984,6 @@ pub const Step = extern struct {...@@ -984,8 +984,6 @@ pub const Step = extern struct {
984 };984 };
985985
986 pub const Flags3 = packed struct(u32) {986 pub const Flags3 = packed struct(u32) {
987 is_linking_libc: bool,
988 is_linking_libcpp: bool,
989 version: bool,987 version: bool,
990 initial_memory: bool,988 initial_memory: bool,
991 max_memory: bool,989 max_memory: bool,
...@@ -1003,6 +1001,7 @@ pub const Step = extern struct {...@@ -1003,6 +1001,7 @@ pub const Step = extern struct {
1003 entry: Entry,1001 entry: Entry,
1004 lto: Lto,1002 lto: Lto,
1005 subsystem: Subsystem,1003 subsystem: Subsystem,
1004 _: u2 = 0,
1006 };1005 };
10071006
1008 pub const Flags4 = packed struct(u32) {1007 pub const Flags4 = packed struct(u32) {
lib/std/Build/Serialize.zig-2
...@@ -168,8 +168,6 @@ pub fn write(b: *std.Build, wc: *Configuration.Wip, writer: *std.Io.Writer) !voi...@@ -168,8 +168,6 @@ pub fn write(b: *std.Build, wc: *Configuration.Wip, writer: *std.Io.Writer) !voi
168 .linkage = .init(c.linkage),168 .linkage = .init(c.linkage),
169 },169 },
170 .flags3 = .{170 .flags3 = .{
171 .is_linking_libc = c.is_linking_libc,
172 .is_linking_libcpp = c.is_linking_libcpp,
173 .version = c.version != null,171 .version = c.version != null,
174 .compress_debug_sections = c.compress_debug_sections,172 .compress_debug_sections = c.compress_debug_sections,
175 .initial_memory = c.initial_memory != null,173 .initial_memory = c.initial_memory != null,
lib/std/Build/Step/Compile.zig-5
...@@ -220,11 +220,6 @@ expect_errors: ?ExpectedCompileErrors = null,...@@ -220,11 +220,6 @@ expect_errors: ?ExpectedCompileErrors = null,
220/// `std.math.maxInt(u16)`. Overrides the argument passed to `zig build`.220/// `std.math.maxInt(u16)`. Overrides the argument passed to `zig build`.
221error_limit: ?u32 = null,221error_limit: ?u32 = null,
222222
223/// Computed during make().
224is_linking_libc: bool = false,
225/// Computed during make().
226is_linking_libcpp: bool = false,
227
228/// Enables coverage instrumentation that is only useful if you are using third223/// Enables coverage instrumentation that is only useful if you are using third
229/// party fuzzers that depend on it. Otherwise, slows down the instrumented224/// party fuzzers that depend on it. Otherwise, slows down the instrumented
230/// binary with unnecessary function calls.225/// binary with unnecessary function calls.