cmd/go: don't run cgo compiler version probe under -toolexec#80153
cmd/go: don't run cgo compiler version probe under -toolexec#80153harjothkhara wants to merge 1 commit into
Conversation
|
This PR (HEAD: 3873202) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/794361. Important tips:
|
3873202 to
9023ca1
Compare
|
This PR (HEAD: 9023ca1) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/794361. Important tips:
|
|
Message from Harjoth Khara: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/794361. |
|
Message from Michael Matloob: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/794361. |
The -toolexec build flag wraps each toolchain program (compile, asm, link, ...) in a user-supplied program, e.g. to profile them or swap in alternates. To know when to rebuild a cgo package, the go command records the C, C++, and Fortran compiler versions by probing each compiler: cc -### -x c -c - That probe was run under -toolexec, but the real cgo compiles never are, so the wrapper saw the probe and none of the actual compiles. Probe under -toolexec only for gccgo, a Go toolchain compiler treated like cmd/compile. Leave the C, C++, and Fortran probes unwrapped. Fixes golang#64580
9023ca1 to
f48be7e
Compare
|
This PR (HEAD: f48be7e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/794361. Important tips:
|
|
Message from Harjoth Khara: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/794361. |
|
Message from Dmitri Shuralyov: Patch Set 3: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/794361. |
|
Message from Harjoth Khara: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/794361. |
The -toolexec build flag wraps each toolchain program (compile, asm,
link, ...) in a user-supplied program, e.g. to profile them or swap in
alternates.
To know when to rebuild a cgo package, the go command records the C,
C++, and Fortran compiler versions by probing each compiler:
That probe was run under -toolexec, but the real cgo compiles never
are, so the wrapper saw the probe and none of the actual compiles.
Probe under -toolexec only for gccgo, a Go toolchain compiler treated
like cmd/compile. Leave the C, C++, and Fortran probes unwrapped.
Fixes #64580