Skip to content

Commit

Permalink
build: increase C thread stack size on linux (ethereum#23676)
Browse files Browse the repository at this point in the history
* build: increase thread stack size when running alpine linux

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

* fix missing extldflags
  • Loading branch information
gballet authored Oct 11, 2021
1 parent 64da037 commit 8b6e018
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, " "))
}
Expand Down

0 comments on commit 8b6e018

Please sign in to comment.