diff options
| author | A1029384756 <hayden.gray104@gmail.com> | 2024-09-05 01:52:40 -0400 |
|---|---|---|
| committer | A1029384756 <hayden.gray104@gmail.com> | 2024-09-08 18:35:16 -0400 |
| commit | 036d7edda92c8d93c1295e4f2661152abe729bf1 (patch) | |
| tree | 06615fc751ec5e970889acffc0c35f89e90be7d6 /ci/build_linux_static.sh | |
| parent | ddf5ca7adf16b87c202989537840d6099c553638 (diff) | |
Changed Linux CI builds to static linking with Musl for better
compatibility
Changed to tarball distribution for mac and linux
Updated upload-artifact to v4
Diffstat (limited to 'ci/build_linux_static.sh')
| -rwxr-xr-x | ci/build_linux_static.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ci/build_linux_static.sh b/ci/build_linux_static.sh new file mode 100755 index 000000000..f821cbb59 --- /dev/null +++ b/ci/build_linux_static.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env sh +# Intended for use in Alpine containers, see the "nightly" Github action for a list of dependencies + +CXX="clang++-18" +LLVM_CONFIG="llvm-config-18" + +DISABLED_WARNINGS="-Wno-switch -Wno-macro-redefined -Wno-unused-value" + +CPPFLAGS="-DODIN_VERSION_RAW=\"dev-$(date +"%Y-%m")\"" +CXXFLAGS="-std=c++14 $($LLVM_CONFIG --cxxflags --ldflags)" + +LDFLAGS="-static -lm -lzstd -lz -lffi -pthread -ldl -fuse-ld=mold" +LDFLAGS="$LDFLAGS $($LLVM_CONFIG --link-static --ldflags --libs --system-libs --libfiles)" +LDFLAGS="$LDFLAGS -Wl,-rpath=\$ORIGIN" + +EXTRAFLAGS="-DNIGHTLY -O3" + +set -x +$CXX src/main.cpp src/libtommath.cpp $DISABLED_WARNINGS $CPPFLAGS $CXXFLAGS $EXTRAFLAGS $LDFLAGS -o odin |