good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 8b6e0184 authored by Guillaume Ballet's avatar Guillaume Ballet Committed by GitHub
Browse files

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
parent 64da037e
No related branches found
No related tags found
No related merge requests found
...@@ -260,6 +260,11 @@ func buildFlags(env build.Environment) (flags []string) { ...@@ -260,6 +260,11 @@ func buildFlags(env build.Environment) (flags []string) {
if runtime.GOOS == "darwin" { if runtime.GOOS == "darwin" {
ld = append(ld, "-s") 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 { if len(ld) > 0 {
flags = append(flags, "-ldflags", strings.Join(ld, " ")) flags = append(flags, "-ldflags", strings.Join(ld, " "))
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment