diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2022-10-31 22:30:34 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2022-11-01 20:38:37 -0400 |
| commit | 757db665a79d7885d1c8f83df65a25adc7af9a69 (patch) | |
| tree | 402a2b41204af488a1b68e97123452ac881531bb /build.zig | |
| parent | 93d60d0de76e5dca666682e51589c0819eed2507 (diff) | |
| download | zig-757db665a79d7885d1c8f83df65a25adc7af9a69.tar.gz zig-757db665a79d7885d1c8f83df65a25adc7af9a69.zip | |
build: remove `ofmt` from `LibExeObjStep` which is redundant with `target.ofmt`
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -17,7 +17,7 @@ pub fn build(b: *Builder) !void { b.setPreferredReleaseMode(.ReleaseFast); const test_step = b.step("test", "Run all the tests"); const mode = b.standardReleaseOptions(); - const target = b.standardTargetOptions(.{}); + var target = b.standardTargetOptions(.{}); const single_threaded = b.option(bool, "single-threaded", "Build artifacts that run in single threaded mode"); const use_zig_libcxx = b.option(bool, "use-zig-libcxx", "If libc++ is needed, use zig's bundled version, don't try to integrate with the system") orelse false; @@ -141,6 +141,10 @@ pub fn build(b: *Builder) !void { break :blk 4; }; + if (only_c) { + target.ofmt = .c; + } + const main_file: ?[]const u8 = mf: { if (!have_stage1) break :mf "src/main.zig"; if (use_zig0) break :mf null; @@ -172,10 +176,6 @@ pub fn build(b: *Builder) !void { test_cases.want_lto = false; } - if (only_c) { - exe.ofmt = .c; - } - const exe_options = b.addOptions(); exe.addOptions("build_options", exe_options); |
