build: increase C thread stack size on linux (#23676)

* build: increase thread stack size when running alpine linux

* review feedback: force a stack size of 8M on all linux distribs

* fix missing extldflags
pull/23727/head
Guillaume Ballet 3 years ago committed by GitHub
parent 64da037e99
commit 8b6e018401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      build/ci.go

@ -260,6 +260,11 @@ func buildFlags(env build.Environment) (flags []string) {
if runtime.GOOS == "darwin" {
ld = append(ld, "-s")
}
// Enforce the stacksize to 8M, which is the case on most platforms apart from
// alpine Linux.
if runtime.GOOS == "linux" {
ld = append(ld, "-extldflags", "-Wl,-z,stack-size=0x800000")
}
if len(ld) > 0 {
flags = append(flags, "-ldflags", strings.Join(ld, " "))
}

Loading…
Cancel
Save