From ac4381f9ce6a161c5ca052c16f4016076cf0e857 Mon Sep 17 00:00:00 2001 From: "J. Emrys Landivar" Date: Fri, 10 Dec 2021 12:03:56 -0600 Subject: [PATCH] build: Darwin fix (#2664) * chore: update builder image * build: adjust cgo stack only on linux --- build.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index 061efd3fb..192f5df94 100755 --- a/build.py +++ b/build.py @@ -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