Skip to content

Commit

Permalink
More hackery, pt. 2
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Aug 18, 2024
1 parent 31e2071 commit 80d3594
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ jobs:
- name: sed hackery
shell: bash
run: |
sed -i.bak -E 's/(\("C\ compiler\ command",\ ")[^"]*("\))/\1${GCC}\2/' $(ghc --print-libdir)/settings
sed -i.bak -E 's/(\("C\+\+\ compiler\ command",\ ")[^"]*("\))/\1${GXX}\2/' $(ghc --print-libdir)/settings
sed -i.bak -E "s|(\(\"C\ compiler\ command\",\ \")[^\"]*(\"\))|\1${GCC}\2|" $(ghc --print-libdir)/settings
sed -i.bak -E "s|(\(\"C\+\+\ compiler\ command\",\ \")[^\"]*(\"\))|\1${GXX}\2|" $(ghc --print-libdir)/settings
# Pass `-fuse-ld=lld` to gcc when linking.
sed -i.bak -E 's/(\("C\ compiler\ link\ flags",\ ")[^"]*("\))/\1-fuse-ld=lld\2/' $(ghc --print-libdir)/settings
sed -i.bak -E "s|(\(\"C\ compiler\ link\ flags\",\ \")[^\"]*(\"\))|\1-fuse-ld=lld\2|" $(ghc --print-libdir)/settings
# Remove C/C++ compiler flags which gcc doesn't understand (namely,
# `--target=arm64-apple-darwin`).
sed -i.bak -E 's/(\("C\ compiler\ flags",\ ")[^"]*("\))/\1\2/' $(ghc --print-libdir)/settings
sed -i.bak -E 's/(\("C\+\+\ compiler\ flags",\ ")[^"]*("\))/\1\2/' $(ghc --print-libdir)/settings
sed -i.bak -E "s|(\(\"C\ compiler\ flags\",\ \")[^\"]*(\"\))|\1\2|" $(ghc --print-libdir)/settings
sed -i.bak -E "s|(\(\"C\+\+\ compiler\ flags\",\ \")[^\"]*(\"\))|\1\2|" $(ghc --print-libdir)/settings
# Switch the linker used for merging objects from Apple's ld to LLVM's
# ld.lld.
sed -i.bak -E 's/(\("Merge\ objects\ command",\ ")[^"]*("\))/\1${LD_LLD}\2/' $(ghc --print-libdir)/settings
sed -i.bak -E "s|(\(\"Merge\ objects\ command\",\ \")[^\"]*(\"\))|\1${LD_LLD}\2|" $(ghc --print-libdir)/settings
- shell: bash
run: ghc --info
Expand Down

0 comments on commit 80d3594

Please sign in to comment.