mirror of
https://github.com/burrowers/garble.git
synced 2026-04-22 23:57:14 +08:00
use the correct toolchain "go" tool under GOTOOLCHAIN=auto
We call `go list` to collect information about all the packages to obfuscate and build, which is crucial to be able to perform obfuscation of names used across packages. However, when GOTOOLCHAIN causes a toolchain upgrade, we must ensure that we use the upgraded Go tool; otherwise we are mixing information from different toolchain versions. Fixes #934.
This commit is contained in:
committed by
Paul Scheduikat
parent
7f80dfb59d
commit
db3003b9fa
Vendored
+5
-6
@@ -4,9 +4,6 @@
|
||||
setup-go go1.23.7
|
||||
env GOPROXY=proxy.golang.org
|
||||
env GOMODCACHE=${HOST_GOMODCACHE}
|
||||
# The bug below is about a badly patched cmd/link, so we need a separate
|
||||
# GARBLE_CACHE to not allow reusing the host's working patched linker.
|
||||
env GARBLE_CACHE=${WORK}/.garble-cache
|
||||
|
||||
# Verify that we are using an older version of Go.
|
||||
exec go version
|
||||
@@ -19,9 +16,11 @@ cd mod
|
||||
exec go run .
|
||||
stderr 'hello from go1\.24\.1'
|
||||
|
||||
# TODO: fix this.
|
||||
! exec garble run .
|
||||
stderr 'gcMarkTermination: relocation target .* not defined'
|
||||
# Note that garble hides runtime.Version by design, but we know that it requires
|
||||
# the Go toolchain version to match the exact same version that built garble,
|
||||
# and that version is most likely newer than GOVERSION_BASE.
|
||||
exec garble run .
|
||||
stderr 'hello from unknown'
|
||||
|
||||
-- mod/go.mod --
|
||||
module test
|
||||
|
||||
Reference in New Issue
Block a user