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(
215215 try addBool(gpa, zig_args, "-ffuzz", fuzz);
216216
217217 {
218 var is_linking_libc = conf_comp.flags3.is_linking_libc;
219 var is_linking_libcpp = conf_comp.flags3.is_linking_libcpp;
218 var is_linking_libc = false;
219 var is_linking_libcpp = false;
220220
221221 // Stores system libraries that have already been seen for at least one
222222 // 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 {
984984 };
985985
986986 pub const Flags3 = packed struct(u32) {
987 is_linking_libc: bool,
988 is_linking_libcpp: bool,
989987 version: bool,
990988 initial_memory: bool,
991989 max_memory: bool,
......@@ -1003,6 +1001,7 @@ pub const Step = extern struct {
10031001 entry: Entry,
10041002 lto: Lto,
10051003 subsystem: Subsystem,
1004 _: u2 = 0,
10061005 };
10071006
10081007 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
168168 .linkage = .init(c.linkage),
169169 },
170170 .flags3 = .{
171 .is_linking_libc = c.is_linking_libc,
172 .is_linking_libcpp = c.is_linking_libcpp,
173171 .version = c.version != null,
174172 .compress_debug_sections = c.compress_debug_sections,
175173 .initial_memory = c.initial_memory != null,
lib/std/Build/Step/Compile.zig-5
......@@ -220,11 +220,6 @@ expect_errors: ?ExpectedCompileErrors = null,
220220/// `std.math.maxInt(u16)`. Overrides the argument passed to `zig build`.
221221error_limit: ?u32 = null,
222222
223/// Computed during make().
224is_linking_libc: bool = false,
225/// Computed during make().
226is_linking_libcpp: bool = false,
227
228223/// Enables coverage instrumentation that is only useful if you are using third
229224/// party fuzzers that depend on it. Otherwise, slows down the instrumented
230225/// binary with unnecessary function calls.