From 5a7b254bd4cc90eb2f1874337688aa4f14857cd0 Mon Sep 17 00:00:00 2001 From: Alexander Evgin Date: Tue, 10 Dec 2024 13:31:57 +0400 Subject: [PATCH] release: build static executable --- .github/workflows/release.yaml | 2 ++ Cross.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7724b00..cddf61b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -73,6 +73,8 @@ jobs: PCRE2_SYS_STATIC: 1 # To ensure openssl is static linked OPENSSL_STATIC: 1 + # Build static + RUSTFLAGS: "-Ctarget-feature=+crt-static" strategy: fail-fast: false matrix: diff --git a/Cross.toml b/Cross.toml index 22cd3de..f48145d 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,3 +1,3 @@ [build] pre-build = "./scripts/cross/pre-build-script.sh" -env.passthrough = ["BUF_CACHE_DIR=/tmp"] +env.passthrough = ["BUF_CACHE_DIR=/tmp", "RUSTFLAGS=-Ctarget-feature=+crt-static"]