ci: fix elc link flags (libcurl install + gcc ordering)
This commit is contained in:
@@ -40,11 +40,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Ensure build tools are available (ci-base may not have gcc)
|
# Install curl dev libs — needed to link elc.c.
|
||||||
if ! command -v cc >/dev/null 2>&1; then
|
# ci-base has gcc but not libcurl4-openssl-dev.
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get install -y -qq gcc libcurl4-openssl-dev libssl-dev
|
apt-get install -y -qq libcurl4-openssl-dev libssl-dev
|
||||||
fi
|
|
||||||
|
|
||||||
DEST="${{ github.workspace }}/../foundation-el"
|
DEST="${{ github.workspace }}/../foundation-el"
|
||||||
|
|
||||||
@@ -56,13 +55,13 @@ jobs:
|
|||||||
|
|
||||||
# Compile elc.c (committed C source of the El compiler) for linux/amd64.
|
# 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.
|
# 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 \
|
cc -std=c11 -O2 \
|
||||||
-I "$DEST/lang/el-compiler/runtime" \
|
-I "$DEST/lang/el-compiler/runtime" \
|
||||||
-lcurl -lpthread \
|
|
||||||
-o "$DEST/lang/dist/platform/elc" \
|
-o "$DEST/lang/dist/platform/elc" \
|
||||||
"$DEST/lang/dist/platform/elc.c" \
|
"$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"
|
chmod +x "$DEST/lang/dist/platform/elc"
|
||||||
echo "EL_HOME=$DEST/lang" >> "$GITHUB_ENV"
|
echo "EL_HOME=$DEST/lang" >> "$GITHUB_ENV"
|
||||||
|
|||||||
Reference in New Issue
Block a user