David Eichmann pushed to branch wip/davide/windows-dlls at Glasgow Haskell Compiler / GHC Commits: 66b69ea5 by David Eichmann at 2026-07-14T09:58:55+01:00 WIP going back to .dll.a - - - - - 6 changed files: - compiler/GHC/Linker/Dynamic.hs - hadrian/src/Hadrian/Haskell/Cabal/Parse.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 -<.> ".lib") + [ FileOption "-Wl,--out-implib=" (output_fn ++ ".a") | gopt Opt_SharedImplib dflags ] ++ map (FileOption "") o_files ===================================== hadrian/src/Hadrian/Haskell/Cabal/Parse.hs ===================================== @@ -226,10 +226,12 @@ copyPackage context@Context {..} = do -- TODO Don't do this once cabal is copying .libn files by default -- Copy missing .lib files dir <- Context.buildPath context - files <- getDirectoryFiles "." [ dir -/- "*.lib" ] + files <- getDirectoryFiles "." [ dir -/- "*.dll.a" ] libDir <- distDynDir context - forM_ files $ \file -> - copyFile' file (libDir </> takeFileName file) + forM_ files $ \file -> do + let fileCopy = libDir </> takeFileName file + copyFileUntracked file fileCopy + produces [fileCopy] ===================================== hadrian/src/Rules/Library.hs ===================================== @@ -213,7 +213,7 @@ extraObjects context -- ghc-internal's .dll.a file is placed in the RTS build dir and not -- the ghc-internal build dir as we only use it when building the -- RTS and not other libraries. - ghcInternalDllName <- takeFileName <$> pkgLibraryFile Context { + ghcInternalDllName <- pkgLibraryFile Context { stage = stage context, way = rtsWayToLibraryWay (way context), iplace = iplace context, @@ -221,7 +221,7 @@ extraObjects context } builddir <- buildPath context - return [ builddir -/- ghcInternalDllName <.> "lib"] + return [ builddir -/- ghcInternalDllName <> ".a"] | 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-*.lib" %> buildGhcInternalImportLib + buildPath -/- "libHSghc-internal-*.dll.a" %> 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 .lib import lib + output = target -- the .dll.a import lib need [input] runBuilder Dlltool ["-d", input, "-l", output] [input] [output] ===================================== libraries/Cabal ===================================== @@ -1 +1 @@ -Subproject commit 9c92f635c0f15c6e3f4f276770d35cf4fdac19d0 +Subproject commit d9637d1b2e94bfff8e9aa9366fc4447dcc2ca4a8 ===================================== 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 ++ ".lib", - lib ++ "_p" ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".lib", + lib ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".dll.a", + lib ++ "_p" ++ "-ghc" ++ GHC.Version.cProjectVersion ++ ".dll.a", lib ++ ".bytecodelib" ] b <- liftIO $ doesFileExistOnPath filenames dirs View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/66b69ea5a47386d60484103740ab4d7f... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/66b69ea5a47386d60484103740ab4d7f... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
David Eichmann (@DavidEichmann)