Build a static Linux x86_64 binary with zig cc, linking OpenSSL in and serving it to moonbitlang/async through a dlopen shim. CI publishes it to the rolling release on every push to main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
435 B
Bash
Executable File
12 lines
435 B
Bash
Executable File
#!/bin/sh
|
|
# MOON_CC for static musl builds: `zig cc`, plus the static OpenSSL objects when linking.
|
|
set -eu
|
|
# shellcheck disable=SC2086 # ORBIT_MUSL_* are space-separated lists
|
|
|
|
for arg in "$@"; do
|
|
case $arg in
|
|
-c) exec zig cc -target "$ORBIT_MUSL_TARGET" -ffunction-sections -fdata-sections ${ORBIT_MUSL_CFLAGS-} "$@" ;;
|
|
esac
|
|
done
|
|
exec zig cc -target "$ORBIT_MUSL_TARGET" -static -s -Wl,--gc-sections "$@" ${ORBIT_MUSL_LINK-}
|