From cdf752a35af8cc1d26328601070800d6737eb79d Mon Sep 17 00:00:00 2001 From: Martin Wickham Date: Thu, 24 Nov 2022 11:53:36 -0600 Subject: [PATCH] Change default for 0.10.0 to stage 1 compiler, due to miscompilation involving padded integers --- build.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.zig b/build.zig index 0e8dfe0..31aa471 100644 --- a/build.zig +++ b/build.zig @@ -52,6 +52,17 @@ pub fn build(b: *Builder) void { exe.setBuildMode(mode); linkObject(b, exe); + // NOTE: This line can be commented out once #13480 is fixed. + // https://github.com/ziglang/zig/issues/13480 + // The fix is slated to be merged in PR #13637. + // https://github.com/ziglang/zig/pull/13637 + // Until then, stage 1 is probably the better default for advent of code, + // due to the common use of std.StaticBitSet. + // If you are using a master branch build of zig, this line may cause + // a compile error. You can safely remove it as long as you have a build + // from after when PR #13637 was merged. + exe.use_stage1 = true; // compile error? see comment above. + exe.install(); const install_cmd = b.addInstallArtifact(exe);