diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e3d97e4..56b0090 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -97,17 +97,23 @@ jobs: ELC=/opt/el/dist/platform/elc RUNTIME=/opt/el/runtime + # Preserve the pre-compiled dist/soul.c from the repo before running elb. + # elb may overwrite it during compilation; we always want the repo version + # since it contains the patched self-contained translation unit (all modules + # inlined, workspace scope fix, agentic dedup fix, etc.). + cp dist/soul.c /tmp/soul.c.prebuilt + # Compile all El modules to C via elb. # elb fails at link on Linux (GNU ld rejects duplicate strong symbols that # macOS ld accepts silently) — that's expected and captured with || true. - # The important output is dist/soul.c: the El compiler inlines all imported - # modules into the entry-point file, so soul.c is a self-contained - # translation unit. We never link the other dist/*.c files — they contain - # the same symbols inlined again, plus capability-violation #error guards - # that fire when compiled outside the cgi entrypoint. $ELB --elc=$ELC --runtime=$RUNTIME/el_runtime.c || true - # Link only soul.c + the runtime. No --allow-multiple-definition needed. + # Restore the repo's self-contained soul.c — elb may have overwritten it + # with a partial (non-inlined) version that lacks module-level definitions. + cp /tmp/soul.c.prebuilt dist/soul.c + + # Compile the self-contained translation unit. No --allow-multiple-definition + # needed since soul.c inlines all modules. mkdir -p dist cc -O2 -DHAVE_CURL \ -I$RUNTIME \