aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-11-28 16:15:07 +0100
committerAlex Rønne Petersen <alex@alexrp.com>2025-05-12 17:07:50 +0200
commitfe5dbc247430cc0b7bce4fe7d01ef6c425db0bf2 (patch)
tree2ea69f514e02e2cadaf89fbb92c66379ceac76a7 /lib/std/Build
parentaf55b27d5a6fd7af37892eebc01f1c6e9dbaafdd (diff)
downloadzig-fe5dbc247430cc0b7bce4fe7d01ef6c425db0bf2.tar.gz
zig-fe5dbc247430cc0b7bce4fe7d01ef6c425db0bf2.zip
std.Build: Change Step.Compile.no_builtin from bool to ?bool.
To be in line with other, similar options.
Diffstat (limited to 'lib/std/Build')
-rw-r--r--lib/std/Build/Step/Compile.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig
index e436865108..04e68065c3 100644
--- a/lib/std/Build/Step/Compile.zig
+++ b/lib/std/Build/Step/Compile.zig
@@ -229,7 +229,7 @@ is_linking_libc: bool = false,
/// Computed during make().
is_linking_libcpp: bool = false,
-no_builtin: bool = false,
+no_builtin: ?bool = null,
/// Populated during the make phase when there is a long-lived compiler process.
/// Managed by the build runner, not user build script.
@@ -1646,8 +1646,8 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 {
}
}
- if (compile.no_builtin) {
- try zig_args.append("-fno-builtin");
+ if (compile.no_builtin) |enabled| {
+ try zig_args.append(if (enabled) "-fbuiltin" else "-fno-builtin");
}
if (b.sysroot) |sysroot| {