[v9.4.x] build: fix corss build (#63261)

build: fix corss build (#61121)

* build: fix corss build

* fix lint

(cherry picked from commit 37baae3699)

Co-authored-by: Jimmie Han <hanjinming@outlook.com>
This commit is contained in:
Grot (@grafanabot)
2023-03-03 10:04:12 -06:00
committed by GitHub
co-authored by Jimmie Han
parent 8c1d16c879
commit 6d0beaedaf
+5 -3
View File
@@ -146,6 +146,11 @@ func setup(goos string) {
func doBuild(binaryName, pkg string, opts BuildOpts) error {
log.Println("building", binaryName, pkg)
if err := setBuildEnv(opts); err != nil {
return err
}
libcPart := ""
if opts.libc != "" {
libcPart = fmt.Sprintf("-%s", opts.libc)
@@ -194,9 +199,6 @@ func doBuild(binaryName, pkg string, opts BuildOpts) error {
return nil
}
if err := setBuildEnv(opts); err != nil {
return err
}
runPrint("go", "version")
libcPart = ""
if opts.libc != "" {