From 899297de22659eb2e24d5b28bd628d2bc186a3b2 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Thu, 19 Jun 2025 19:21:53 +0800 Subject: [PATCH] Fix and sync with `Makefile` --- justfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/justfile b/justfile index 31aed7f..d2d7bb0 100644 --- a/justfile +++ b/justfile @@ -13,7 +13,8 @@ # just debug # just test # -# just DEBUG=1 # 编译出 debug 版 +# just STATIC=1 # 静态链接 +# just DEBUG=1 # 编译出 debug 版 # -------------------------------------------------------------- set windows-shell := ['cmd', '/c'] @@ -49,11 +50,13 @@ Target-Name := if DEBUG != '0' { CI := '0' CI_ARTIFACT_NAME := 'chsrc' +STATIC := '0' + # 在 GitHub Actions 时的 Linux 环境下,just CI=1 时触发 -CFLAGS_static := if os() == 'linux' { - if CI == '0' { - "-static" - } else {''} +CFLAGS_static := if STATIC == '1' { + "-static" +} else if os() == 'linux' { + if CI == '1' {"-static"} else {''} } else {''}