From 9b1eaad13fd331c4c2135f15ab9512b9e2342ff2 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 30 Mar 2026 00:36:16 -0700 Subject: [PATCH] std.Build.Step.ConfigHeader: add addIdent function for when you need to emit a bare identifier but from a string --- lib/std/Build/Step/ConfigHeader.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/std/Build/Step/ConfigHeader.zig b/lib/std/Build/Step/ConfigHeader.zig index b55efc0da4..34d24f26d0 100644 --- a/lib/std/Build/Step/ConfigHeader.zig +++ b/lib/std/Build/Step/ConfigHeader.zig @@ -109,6 +109,10 @@ pub fn create(owner: *std.Build, options: Options) *ConfigHeader { return config_header; } +pub fn addIdent(config_header: *ConfigHeader, name: []const u8, value: []const u8) void { + config_header.values.put(name, .{ .ident = value }) catch @panic("OOM"); +} + pub fn addValue(config_header: *ConfigHeader, name: []const u8, comptime T: type, value: T) void { return addValueInner(config_header, name, T, value) catch @panic("OOM"); }