ci: fix elc link flags (libcurl install + gcc ordering)

This commit is contained in:
2026-05-05 09:09:55 -05:00
parent 14cae0dcb5
commit aa6c354d58
+7 -8
View File
@@ -40,11 +40,10 @@ jobs:
run: |
set -euo pipefail
# Ensure build tools are available (ci-base may not have gcc)
if ! command -v cc >/dev/null 2>&1; then
apt-get update -qq
apt-get install -y -qq gcc libcurl4-openssl-dev libssl-dev
fi
# Install curl dev libs — needed to link elc.c.
# ci-base has gcc but not libcurl4-openssl-dev.
apt-get update -qq
apt-get install -y -qq libcurl4-openssl-dev libssl-dev
DEST="${{ github.workspace }}/../foundation-el"
@@ -56,13 +55,13 @@ jobs:
# Compile elc.c (committed C source of the El compiler) for linux/amd64.
# The darwin arm64 binary at lang/dist/platform/elc can't run on linux.
# elc.c is the same compiler source but in C — compile it natively here.
# Note: -lcurl -lpthread must come AFTER source files on gcc/linux.
cc -std=c11 -O2 \
-I "$DEST/lang/el-compiler/runtime" \
-lcurl -lpthread \
-o "$DEST/lang/dist/platform/elc" \
"$DEST/lang/dist/platform/elc.c" \
"$DEST/lang/el-compiler/runtime/el_runtime.c"
"$DEST/lang/el-compiler/runtime/el_runtime.c" \
-lcurl -lpthread
chmod +x "$DEST/lang/dist/platform/elc"
echo "EL_HOME=$DEST/lang" >> "$GITHUB_ENV"