David Eichmann pushed to branch wip/davide/windows-dlls at Glasgow Haskell Compiler / GHC Commits: 88bfe824 by David Eichmann at 2026-07-10T18:47:46+01:00 WIP link haskell libs via import library - - - - - 5 changed files: - compiler/GHC/Linker/Dynamic.hs - hadrian/src/Rules/Library.hs - hadrian/src/Rules/Rts.hs - libraries/Cabal - utils/ghc-pkg/Main.hs Changes: ===================================== compiler/GHC/Linker/Dynamic.hs ===================================== @@ -121,7 +121,7 @@ linkDynLib logger tmpfs dflags0 unit_env o_files dep_packages , FileOption "" output_fn , Option "-shared" ] ++ - [ FileOption "-Wl,--out-implib=" (output_fn ++ ".a") + [ FileOption "-Wl,--out-implib=" (output_fn -<.> ".lib") | gopt Opt_SharedImplib dflags ] ++ map (FileOption "") o_files ===================================== hadrian/src/Rules/Library.hs ===================================== @@ -221,7 +221,7 @@ extraObjects context } builddir <- buildPath context - return [ builddir -/- ghcInternalDllName <> ".a"] + return [ builddir -/- ghcInternalDllName <.> "lib"] | otherwise = return [] ===================================== hadrian/src/Rules/Rts.hs ===================================== @@ -14,7 +14,7 @@ rtsRules = priority 3 $ do forM_ [Stage1, Stage2, Stage3 ] $ \ stage -> do let buildPath = root -/- buildDir (rtsContext stage) buildPath -/- "libHSghc-internal-*.def" %> buildGhcInternalImportDef - buildPath -/- "libHSghc-internal-*.dll.a" %> buildGhcInternalImportLib + buildPath -/- "libHSghc-internal-*.lib" %> buildGhcInternalImportLib buildGhcInternalImportDef :: FilePath -> Action () buildGhcInternalImportDef target = do @@ -26,6 +26,6 @@ buildGhcInternalImportDef target = do buildGhcInternalImportLib :: FilePath -> Action () buildGhcInternalImportLib target = do let input = dropExtension (dropExtension target) <.> "def" -- the .def file - output = target -- the .dll.a import lib + output = target -- the .lib import lib need [input] runBuilder Dlltool ["-d", input, "-l", output] [input] [output] ===================================== libraries/Cabal ===================================== @@ -1 +1 @@ -Subproject commit 8d1f5a33662be0db0654061fb53fb00e3f4417e0 +Subproject commit ec4e372d52709709661131501da0abbe4b9481f4 ===================================== utils/ghc-pkg/Main.hs ===================================== @@ -2058,8 +2058,8 @@ checkHSLib _verbosity dirs lib = do "lib" ++ lib ++ "_p" ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".so", "lib" ++ lib ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".dylib", "lib" ++ lib ++ "_p" ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".dylib", - lib ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".dll", - lib ++ "_p" ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".dll", + lib ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".lib", + lib ++ "_p" ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".lib", lib ++ ".bytecodelib" ] b <- liftIO $ doesFileExistOnPath filenames dirs View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88bfe824aec33e0dadd7504e1cc717ab... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88bfe824aec33e0dadd7504e1cc717ab... You're receiving this email because of your account on gitlab.haskell.org.