From 80d3594638fba3917de90deef5cb38c2e4c8be45 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Sat, 17 Aug 2024 20:29:44 -0400 Subject: [PATCH] More hackery, pt. 2 --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62a5681..fe0241f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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