File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,22 @@ stage3-release/bin/zig build test docs \
64
64
--zig-lib-dir " $PWD /../lib" \
65
65
-Denable-tidy
66
66
67
+ # Ensure that stage3 and stage4 are byte-for-byte identical.
68
+ stage3-release/bin/zig build \
69
+ --prefix stage4-release \
70
+ -Denable-llvm \
71
+ -Dno-lib \
72
+ -Doptimize=ReleaseFast \
73
+ -Dstrip \
74
+ -Dtarget=$TARGET \
75
+ -Duse-zig-libcxx \
76
+ -Dversion-string=" $( stage3-release/bin/zig version) "
77
+
78
+ # diff returns an error code if the files differ.
79
+ echo " If the following command fails, it means nondeterminism has been"
80
+ echo " introduced, making stage3 and stage4 no longer byte-for-byte identical."
81
+ diff stage3-release/bin/zig stage4-release/bin/zig
82
+
67
83
# Ensure that updating the wasm binary from this commit will result in a viable build.
68
84
stage3-release/bin/zig build update-zig1
69
85
Original file line number Diff line number Diff line change @@ -69,3 +69,22 @@ Write-Output "Main test suite..."
69
69
- Dskip- non- native `
70
70
- Denable- symlinks- windows
71
71
CheckLastExitCode
72
+
73
+ # Ensure that stage3 and stage4 are byte-for-byte identical.
74
+ Write-Output " Build and compare stage4..."
75
+ & " stage3-release\bin\zig.exe" build `
76
+ -- prefix stage4- release `
77
+ - Denable- llvm `
78
+ - Dno- lib `
79
+ - Doptimize= ReleaseFast `
80
+ - Dstrip `
81
+ - Dtarget= " $TARGET " `
82
+ - Duse- zig- libcxx `
83
+ - Dversion- string= " $ ( stage3- release\bin\zig version) "
84
+ CheckLastExitCode
85
+
86
+ # Compare-Object returns an error code if the files differ.
87
+ Write-Output " If the following command fails, it means nondeterminism has been"
88
+ Write-Output " introduced, making stage3 and stage4 no longer byte-for-byte identical."
89
+ Compare-Object (Get-Content stage3- release\bin\zig.exe ) (Get-Content stage4- release\bin\zig.exe )
90
+ CheckLastExitCode
Original file line number Diff line number Diff line change @@ -70,6 +70,25 @@ Write-Output "Main test suite..."
70
70
- Denable- symlinks- windows
71
71
CheckLastExitCode
72
72
73
+ # Ensure that stage3 and stage4 are byte-for-byte identical.
74
+ Write-Output " Build and compare stage4..."
75
+ & " stage3-release\bin\zig.exe" build `
76
+ -- prefix stage4- release `
77
+ - Denable- llvm `
78
+ - Dno- lib `
79
+ - Doptimize= ReleaseFast `
80
+ - Dstrip `
81
+ - Dtarget= " $TARGET " `
82
+ - Duse- zig- libcxx `
83
+ - Dversion- string= " $ ( stage3- release\bin\zig version) "
84
+ CheckLastExitCode
85
+
86
+ # Compare-Object returns an error code if the files differ.
87
+ Write-Output " If the following command fails, it means nondeterminism has been"
88
+ Write-Output " introduced, making stage3 and stage4 no longer byte-for-byte identical."
89
+ Compare-Object (Get-Content stage3- release\bin\zig.exe ) (Get-Content stage4- release\bin\zig.exe )
90
+ CheckLastExitCode
91
+
73
92
Write-Output " Build x86_64-windows-msvc behavior tests using the C backend..."
74
93
& " stage3-release\bin\zig.exe" test `
75
94
..\test\behavior.zig `
You can’t perform that action at this time.
0 commit comments