Skip to content

Commit

Permalink
build: Darwin fix (#2664)
Browse files Browse the repository at this point in the history
* chore: update builder image

* build: adjust cgo stack only on linux
  • Loading branch information
docmerlin authored Dec 10, 2021
1 parent 2f745de commit ac4381f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,11 @@ def build(version=None,
build_command += "-ldflags=\""
if static:
build_command +="-s "

build_command += r'-extldflags \"-fno-PIC -Wl,-z,stack-size=8388608\" -X main.version={} -X main.branch={} -X main.commit={} -X main.platform=OSS" '.format(version,
get_current_branch(),
get_current_commit())
if platform == "linux":
build_command += r'-extldflags \"-fno-PIC -Wl,-z,stack-size=8388608\" '
build_command += '-X main.version={} -X main.branch={} -X main.commit={} -X main.platform=OSS" '.format(version,
get_current_branch(),
get_current_commit())
if static:
build_command += "-a -installsuffix cgo "
build_command += path
Expand Down

0 comments on commit ac4381f

Please sign in to comment.