• David Crawshaw's avatar
    cmd/go, cmd/compile: match tool versions · 98b3e3a0
    David Crawshaw authored
    This change passes runtime.Version from the go tool to the compiler.
    If the versions do not match, the compilation fails.
    The result is a go tool from one GOROOT will complain loudly if it
    is invoked with a different GOROOT value.
    
    Only release versions are checked, so that when developing Go
    you can still use "go install cmd/go" and "go install cmd/compile"
    separately.
    
    Fixes #19064
    
    Change-Id: I17e184d07d3c1092b1d9af53ba55ed3ecf67791d
    Reviewed-on: https://go-review.googlesource.com/42595
    Run-TryBot: David Crawshaw <crawshaw@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    98b3e3a0
main.go 30.1 KB