[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:
co-authored by
Jimmie Han
parent
8c1d16c879
commit
6d0beaedaf
+5
-3
@@ -146,6 +146,11 @@ func setup(goos string) {
|
|||||||
|
|
||||||
func doBuild(binaryName, pkg string, opts BuildOpts) error {
|
func doBuild(binaryName, pkg string, opts BuildOpts) error {
|
||||||
log.Println("building", binaryName, pkg)
|
log.Println("building", binaryName, pkg)
|
||||||
|
|
||||||
|
if err := setBuildEnv(opts); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
libcPart := ""
|
libcPart := ""
|
||||||
if opts.libc != "" {
|
if opts.libc != "" {
|
||||||
libcPart = fmt.Sprintf("-%s", opts.libc)
|
libcPart = fmt.Sprintf("-%s", opts.libc)
|
||||||
@@ -194,9 +199,6 @@ func doBuild(binaryName, pkg string, opts BuildOpts) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := setBuildEnv(opts); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
runPrint("go", "version")
|
runPrint("go", "version")
|
||||||
libcPart = ""
|
libcPart = ""
|
||||||
if opts.libc != "" {
|
if opts.libc != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user