Skip to content

fix(Cabal): Use the C toolchain GHC was configured with - #12333

Open
zlonast wants to merge 5 commits into
haskell:masterfrom
zlonast:zlonast/use-ghc-toolchain
Open

fix(Cabal): Use the C toolchain GHC was configured with#12333
zlonast wants to merge 5 commits into
haskell:masterfrom
zlonast:zlonast/use-ghc-toolchain

Conversation

@zlonast

@zlonast zlonast commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

fix: #12332

Cabal now asks GHC what toolchain it was configured with (via ghc --info,
i.e. the settings file chosen when GHC or its bindist was configured)

  $ ghc --info | grep -E '"C compiler command"|"Merge objects command"'
  ,("C compiler command","/usr/bin/clang")
  ,("Merge objects command","/usr/bin/ld.lld")
  $ cabal build -v2 --enable-library-for-ghci
  Running: /usr/bin/ar -r dist/build/libHSpkg-0.1-inplace.a '@dist/tmp/ar.rsp'
- Running: /usr/bin/ld --help
- Running: /usr/bin/ld -x -r /tmp/cabal-1f3a5-5.o -o /tmp/cabal-1f3a5-6.o
- Running: /usr/bin/ld -r -o dist/build/libHSpkg-0.1-inplace.o '@dist/tmp/ld.rsp'
+ Running: /usr/bin/ld.lld --help
+ Running: /usr/bin/ld.lld -x -r /tmp/cabal-1f3a5-5.o -o /tmp/cabal-1f3a5-6.o
+ Running: /usr/bin/ld.lld -r -o dist/build/libHSpkg-0.1-inplace.o '@dist/tmp/ld.rsp'

Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

@zlonast
zlonast force-pushed the zlonast/use-ghc-toolchain branch from f27fa4e to 00a1ed6 Compare September 8, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cabal does not use the C toolchain GHC was configured with

1 participant