ci: fix elc link flags (libcurl install + gcc ordering)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user