diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-09-19 09:47:24 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-21 09:11:12 -0400 |
commit | a4dbd102af1989526ca87f4dd949f72231284e68 (patch) | |
tree | 8a9c0192ff2c0f6b19b971fac26c13b272d80a13 | |
parent | 0eba81e8b02cb964cd1be5a6161e81eef3ef5870 (diff) | |
download | haskell-a4dbd102af1989526ca87f4dd949f72231284e68.tar.gz |
Fix manifest filename when writing Windows .rc files
As noted in #12971, we previously used `show` which resulted in
inappropriate escaping of non-ASCII characters.
-rw-r--r-- | compiler/GHC/Linker/Windows.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/GHC/Linker/Windows.hs b/compiler/GHC/Linker/Windows.hs index a791cdf007..b09f68f5db 100644 --- a/compiler/GHC/Linker/Windows.hs +++ b/compiler/GHC/Linker/Windows.hs @@ -50,10 +50,8 @@ maybeCreateManifest logger tmpfs dflags exe_filename = do newTempName logger tmpfs (tmpDir dflags) TFL_GhcSession (objectSuf dflags) writeFile rc_filename $ - "1 24 MOVEABLE PURE " ++ show manifest_filename ++ "\n" + "1 24 MOVEABLE PURE \"" ++ manifest_filename ++ "\"\n" -- magic numbers :-) - -- show is a bit hackish above, but we need to escape the - -- backslashes in the path. runWindres logger dflags $ map GHC.SysTools.Option $ ["--input="++rc_filename, |