Hannes Siebenhandl pushed to branch wip/fendor/ghc-pkg-ospath at Glasgow Haskell Compiler / GHC Commits: c1ec1219 by Fendor at 2026-02-25T15:54:41+01:00 Long Path aware manifest - - - - - 5 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Linker/Windows.hs - docs/users_guide/phases.rst Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -1208,6 +1208,7 @@ defaultFlags settings = [ Opt_AutoLinkPackages, Opt_DiagnosticsShowCaret, Opt_EmbedManifest, + Opt_WinLongPathAware, Opt_FamAppCache, Opt_GenManifest, Opt_GhciHistory, ===================================== compiler/GHC/Driver/Flags.hs ===================================== @@ -743,6 +743,7 @@ data GeneralFlag | Opt_PrintBindContents | Opt_GenManifest | Opt_EmbedManifest + | Opt_WinLongPathAware | Opt_SharedImplib | Opt_BuildingCabalPackage | Opt_IgnoreDotGhci ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -2523,6 +2523,7 @@ fFlagsDeps = [ flagSpec "eager-blackholing" Opt_EagerBlackHoling, flagSpec "orig-thunk-info" Opt_OrigThunkInfo, flagSpec "embed-manifest" Opt_EmbedManifest, + flagSpec "win-aware-long-paths" Opt_WinLongPathAware, flagSpec "enable-rewrite-rules" Opt_EnableRewriteRules, flagSpec "enable-th-splice-warnings" Opt_EnableThSpliceWarnings, flagSpec "error-spans" Opt_ErrorSpans, ===================================== compiler/GHC/Linker/Windows.hs ===================================== @@ -16,6 +16,7 @@ import System.Directory data ManifestOpts = ManifestOpts { manifestEmbed :: !Bool -- ^ Should the manifest be embedded in the binary with Windres + , manifestLongPathAware :: !Bool , manifestTempdir :: TempDir , manifestWindresConfig :: WindresConfig , manifestObjectSuf :: String @@ -24,6 +25,7 @@ data ManifestOpts = ManifestOpts initManifestOpts :: DynFlags -> ManifestOpts initManifestOpts dflags = ManifestOpts { manifestEmbed = gopt Opt_EmbedManifest dflags + , manifestLongPathAware = gopt Opt_WinLongPathAware dflags , manifestTempdir = tmpDir dflags , manifestWindresConfig = configureWindres dflags , manifestObjectSuf = objectSuf dflags @@ -50,8 +52,19 @@ maybeCreateManifest logger tmpfs opts exe_filename = do \ <requestedExecutionLevel level=\"asInvoker\" uiAccess=\"false\"/>\n\ \ </requestedPrivileges>\n\ \ </security>\n\ - \ </trustInfo>\n\ - \</assembly>\n" + \ </trustInfo>\n" + ++ + if manifestLongPathAware opts + then + " <application xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n\ + \ <windowsSettings xmlns:ws2=\"http://schemas.microsoft.com/SMI/2016/WindowsSettings\">\n\ + \ <ws2:longPathAware>true</ws2:longPathAware>\n\ + \ </windowsSettings>\n\ + \ </application>\n" + else + "" + ++ + "</assembly>\n" writeFile manifest_filename manifest ===================================== docs/users_guide/phases.rst ===================================== @@ -1430,6 +1430,16 @@ for example). See also :ghc-flag:`-pgmwindres ⟨cmd⟩` (:ref:`replacing-phases`) and :ghc-flag:`-optwindres ⟨option⟩` (:ref:`forcing-options-through`). +.. ghc-flag:: -fwin-aware-long-paths + :shortdesc: Do not embed the manifest in the executable (Windows only) + :type: dynamic + :category: linking + + .. index:: + single: windres + + The manifest file that GHC + .. ghc-flag:: -fno-shared-implib :shortdesc: Don't generate an import library for a DLL (Windows only) :type: dynamic View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c1ec1219fd7ba78d2dca59b2d6d35ec9... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c1ec1219fd7ba78d2dca59b2d6d35ec9... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Hannes Siebenhandl (@fendor)