Skip to content

Unmark foreign lib test as broken for win and ghc >= 9.0 #8111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ main = setupAndCabalTest . recordMode DoNotRecord $ do
skipUnlessGhcVersion ">= 7.8"
osx <- isOSX
ghc80 <- isGhcVersion "== 8.0.2"
win <- isWindows
ghcGreaterThan90 <- isGhcVersion ">= 9.0"
expectBrokenIf ((osx && ghc80) || (win && ghcGreaterThan90)) 7989 $
expectBrokenIf (osx && ghc80) 7989 $
withPackageDb $ do
setup_install []
setup "copy" [] -- regression test #4156
Expand Down
17 changes: 17 additions & 0 deletions changelog.d/pr-7764
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
synopsis: Use ghc -flink-rts option when available
packages: Cabal
prs: #7764 #8111
issues: #7763
significance: significant

description: {

Previously Cabal did quite some headstands to link against libHSrts.
Note only this is complex but it couples very tightly to GHC's implementation.
Thankfully, as of GHC 9.0 GHC provides a -flink-rts flag for precisely this purpose.
Use it when available.

It fixed a bug which make Cabal unusable to build foreign libraries for windows and ghc 9.0 or 9.2.
See <https://gitlab.haskell.org/ghc/ghc/-/issues/20520>

}