aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-03-28 20:41:58 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-03-30 20:50:48 -0400
commit5a41704f7ec2c472897f955ecfe1feafa697ff68 (patch)
tree62984e96e61c367ce7ad304fc532051c10e6921d /build.zig
parent6f10b11658c002b26341bff10e1dd522f2465b5a (diff)
downloadzig-5a41704f7ec2c472897f955ecfe1feafa697ff68.tar.gz
zig-5a41704f7ec2c472897f955ecfe1feafa697ff68.zip
cbe: rewrite `CType`
Closes #14904
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/build.zig b/build.zig
index f661bd6887..36bb1e0f73 100644
--- a/build.zig
+++ b/build.zig
@@ -16,9 +16,7 @@ pub fn build(b: *std.Build) !void {
const only_c = b.option(bool, "only-c", "Translate the Zig compiler to C code, with only the C backend enabled") orelse false;
const target = t: {
var default_target: std.zig.CrossTarget = .{};
- if (only_c) {
- default_target.ofmt = .c;
- }
+ default_target.ofmt = b.option(std.Target.ObjectFormat, "ofmt", "Object format to target") orelse if (only_c) .c else null;
break :t b.standardTargetOptions(.{ .default_target = default_target });
};