Change default for 0.10.0 to stage 1 compiler, due to miscompilation involving padded integers

This commit is contained in:
Martin Wickham 2022-11-24 11:53:36 -06:00
parent 8edf0a04ef
commit cdf752a35a

View file

@ -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);