Hannes Siebenhandl pushed to branch wip/fendor/ghc-pkg-ospath at Glasgow Haskell Compiler / GHC
Commits:
-
5f426f40
by Fendor at 2026-02-25T14:15:24+01:00
4 changed files:
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Linker/Windows.hs
Changes:
| ... | ... | @@ -1208,6 +1208,7 @@ defaultFlags settings |
| 1208 | 1208 | = [ Opt_AutoLinkPackages,
|
| 1209 | 1209 | Opt_DiagnosticsShowCaret,
|
| 1210 | 1210 | Opt_EmbedManifest,
|
| 1211 | + Opt_WinLongPathAware,
|
|
| 1211 | 1212 | Opt_FamAppCache,
|
| 1212 | 1213 | Opt_GenManifest,
|
| 1213 | 1214 | Opt_GhciHistory,
|
| ... | ... | @@ -743,6 +743,7 @@ data GeneralFlag |
| 743 | 743 | | Opt_PrintBindContents
|
| 744 | 744 | | Opt_GenManifest
|
| 745 | 745 | | Opt_EmbedManifest
|
| 746 | + | Opt_WinLongPathAware
|
|
| 746 | 747 | | Opt_SharedImplib
|
| 747 | 748 | | Opt_BuildingCabalPackage
|
| 748 | 749 | | Opt_IgnoreDotGhci
|
| ... | ... | @@ -2523,6 +2523,7 @@ fFlagsDeps = [ |
| 2523 | 2523 | flagSpec "eager-blackholing" Opt_EagerBlackHoling,
|
| 2524 | 2524 | flagSpec "orig-thunk-info" Opt_OrigThunkInfo,
|
| 2525 | 2525 | flagSpec "embed-manifest" Opt_EmbedManifest,
|
| 2526 | + flagSpec "win-aware-long-paths" Opt_WinLongPathAware,
|
|
| 2526 | 2527 | flagSpec "enable-rewrite-rules" Opt_EnableRewriteRules,
|
| 2527 | 2528 | flagSpec "enable-th-splice-warnings" Opt_EnableThSpliceWarnings,
|
| 2528 | 2529 | flagSpec "error-spans" Opt_ErrorSpans,
|
| ... | ... | @@ -16,6 +16,7 @@ import System.Directory |
| 16 | 16 | |
| 17 | 17 | data ManifestOpts = ManifestOpts
|
| 18 | 18 | { manifestEmbed :: !Bool -- ^ Should the manifest be embedded in the binary with Windres
|
| 19 | + , manifestLongPathAware :: !Bool
|
|
| 19 | 20 | , manifestTempdir :: TempDir
|
| 20 | 21 | , manifestWindresConfig :: WindresConfig
|
| 21 | 22 | , manifestObjectSuf :: String
|
| ... | ... | @@ -24,6 +25,7 @@ data ManifestOpts = ManifestOpts |
| 24 | 25 | initManifestOpts :: DynFlags -> ManifestOpts
|
| 25 | 26 | initManifestOpts dflags = ManifestOpts
|
| 26 | 27 | { manifestEmbed = gopt Opt_EmbedManifest dflags
|
| 28 | + , manifestLongPathAware = gopt Opt_WinLongPathAware dflags
|
|
| 27 | 29 | , manifestTempdir = tmpDir dflags
|
| 28 | 30 | , manifestWindresConfig = configureWindres dflags
|
| 29 | 31 | , manifestObjectSuf = objectSuf dflags
|
| ... | ... | @@ -50,8 +52,19 @@ maybeCreateManifest logger tmpfs opts exe_filename = do |
| 50 | 52 | \ <requestedExecutionLevel level=\"asInvoker\" uiAccess=\"false\"/>\n\
|
| 51 | 53 | \ </requestedPrivileges>\n\
|
| 52 | 54 | \ </security>\n\
|
| 53 | - \ </trustInfo>\n\
|
|
| 54 | - \</assembly>\n"
|
|
| 55 | + \ </trustInfo>\n"
|
|
| 56 | + ++
|
|
| 57 | + if manifestLongPathAware opts
|
|
| 58 | + then
|
|
| 59 | + " <application xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n\
|
|
| 60 | + \ <windowsSettings xmlns:ws2=\"http://schemas.microsoft.com/SMI/2016/WindowsSettings\">\n\
|
|
| 61 | + \ <ws2:longPathAware>true</ws2:longPathAware>\n\
|
|
| 62 | + \ </windowsSettings>\n\
|
|
| 63 | + \ </application>\n"
|
|
| 64 | + else
|
|
| 65 | + ""
|
|
| 66 | + ++
|
|
| 67 | + "</assembly>\n"
|
|
| 55 | 68 | |
| 56 | 69 | writeFile manifest_filename manifest
|
| 57 | 70 |