Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sweet: rebuild cmd/compile and cmd/link for go-build benchmark
go-build is a subtly strange benchmark. For every other benchmark, sweet builds the benchmarked program in set up, using Config.BuildEnv. go-build does not do that because the benchmarked programs (cmd/compile, cmd/link, and (to a lesser degree) cmd/go) are conveniently prebuilt in GOROOT. But this breaks the intuition that BuildEnv can control build flags for the benchmarked program, particularly for sweet run -pgo, where sweet itself expects a PGO flag in BuildEnv to impact the benchmarked program. Adjust go-build to follow these standards by copying GOROOT for each config and running `go install cmd/compile cmd/link` in the copied GOROOT, allowing BuildEnv to take effect. This fixes the general case for PGO, though it could use more work as really cmd/compile and cmd/link should receive _different_ PGO profiles. For golang/go#55022. Change-Id: I36e4486c79ee4200c2e10ccba913d559187bdad2
- Loading branch information