Skip to content

Commit f87b28e

Browse files
committed
CI: pass DYNAMIC to stage1 build to fix dynHelloWorld test failure
When stage1 is built without DYNAMIC but stage2 with DYNAMIC=1, config.status is created without --enable-dynamic. This means cabal.project.stage2.settings gets shared: False, so no dynamic libraries are built. However, the stage1 recipe re-runs during stage2 (order-only dep on non-file target) with DYNAMIC=1, causing the sed to add 'dyn' to RTS ways in settings. Result: settings claims dyn is available but no .dylib/.so files exist, causing dynHelloWorld(dyn) to fail on darwin. Fix: pass DYNAMIC=${{ matrix.dynamic }} to stage1 so configure runs with --enable-dynamic from the start, generating the correct cabal.project.stage2.settings with shared: True.
1 parent 63ec36d commit f87b28e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/nix-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
export CABAL_DIR="$GITHUB_WORKSPACE/_build/cabal-dir"
137137
export TMPDIR="$GITHUB_WORKSPACE/_build/tmp"
138138
mkdir -p "$TMPDIR"
139-
make QUIET=1 CABAL_ARGS="-j2" ${{ steps.cabal-cache.outputs.cache-hit == 'true' && 'USE_SYSTEM_CABAL=1' || '' }} stage1
139+
make QUIET=1 DYNAMIC=${{ matrix.dynamic }} CABAL_ARGS="-j2" ${{ steps.cabal-cache.outputs.cache-hit == 'true' && 'USE_SYSTEM_CABAL=1' || '' }} stage1
140140
echo "=== Disk after stage1 ==="
141141
df -h .
142142

0 commit comments

Comments
 (0)