diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-19 04:40:44 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-19 04:40:44 +0900 |
| commit | 1c49c75f95855a6b75689f1962dc918ed67c2ccc (patch) | |
| tree | 483ff8830727d7b04cdd26b55ec28b60494682da /cmd | |
| parent | 6a01a55d7e398de9d12f0c96fb4fa176bcc3c794 (diff) | |
cmd/mbf: toolchain 3-stage non-determinism check
This unfortunately fails right now. Requires further investigation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/mbf/main.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index 372c0acd..5904d9df 100644 --- a/cmd/mbf/main.go +++ b/cmd/mbf/main.go @@ -15,6 +15,7 @@ import ( "hakurei.app/container" "hakurei.app/container/check" "hakurei.app/internal/pkg" + "hakurei.app/internal/rosa" "hakurei.app/message" ) @@ -104,6 +105,36 @@ func main() { ) } + c.NewCommand( + "stage3", + "Check for toolchain 3-stage non-determinism", + func(args []string) (err error) { + _, _, _, stage2 := (rosa.Std - 1).NewLLVM() + _, _, _, stage3 := rosa.Std.NewLLVM() + var ( + pathname *check.Absolute + checksum [2]pkg.Checksum + ) + + if pathname, checksum[0], err = cache.Cure(stage2); err != nil { + return err + } + log.Println("stage2:", pathname) + if pathname, checksum[1], err = cache.Cure(stage3); err != nil { + return err + } + log.Println("stage3:", pathname) + + if checksum[0] != checksum[1] { + err = &pkg.ChecksumMismatchError{ + Got: checksum[0], + Want: checksum[1], + } + } + return + }, + ) + c.MustParse(os.Args[1:], func(err error) { if cache != nil { cache.Close() |
