From 43ba26e11aef3485ac816b31f97804e554d73a88 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Mon, 10 May 2021 23:31:08 +0200 Subject: [PATCH] musl workaround --- src/babashka/main.clj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/babashka/main.clj b/src/babashka/main.clj index cb0e9162..1e3fd9e8 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -863,13 +863,14 @@ Use bb run --help to show this help output. (let [opts (parse-opts args)] (exec opts))) -(def static? +(def musl? "Captured at compile time, to know if we are running inside a statically compiled executable." - (System/getenv "BABASHKA_STATIC")) + (and (= "true" (System/getenv "BABASHKA_STATIC")) + (not= "aarch64" (System/getenv "BABASHKA_ARCH")))) (defmacro run [args] - (if static? + (if musl? ;; When running in musl-compiled static executable we lift execution of bb ;; inside a thread, so we have a larger than default stack size, set by an ;; argument to the linker. See https://github.com/oracle/graal/issues/3398