[Git][ghc/ghc][master] 2 commits: Fix manifest filename when writing Windows .rc files
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Oct 21 13:11:28 UTC 2022
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
a4dbd102 by Ben Gamari at 2022-10-21T09:11:12-04:00
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.
- - - - -
30f0d9a9 by Ben Gamari at 2022-10-21T09:11:12-04:00
Write response files in UTF-8 on Windows
This reverts the workaround introduced in
f63c8ef33ec9666688163abe4ccf2d6c0428a7e7, which taught our response file
logic to write response files with the `latin1` encoding to workaround
`gcc`'s lacking Unicode support. This is now no longer necessary (and in
fact actively unhelpful) since we rather use Clang.
- - - - -
2 changed files:
- compiler/GHC/Linker/Windows.hs
- compiler/GHC/SysTools/Process.hs
Changes:
=====================================
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,
=====================================
compiler/GHC/SysTools/Process.hs
=====================================
@@ -170,11 +170,7 @@ runSomethingResponseFile logger tmpfs dflags filter_fn phase_name pgm args mb_en
getResponseFile args = do
fp <- newTempName logger tmpfs (tmpDir dflags) TFL_CurrentModule "rsp"
withFile fp WriteMode $ \h -> do
-#if defined(mingw32_HOST_OS)
- hSetEncoding h latin1
-#else
hSetEncoding h utf8
-#endif
hPutStr h $ unlines $ map escape args
return fp
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0eba81e8b02cb964cd1be5a6161e81eef3ef5870...30f0d9a9ded55a822e094847d5ac8087262fb8da
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0eba81e8b02cb964cd1be5a6161e81eef3ef5870...30f0d9a9ded55a822e094847d5ac8087262fb8da
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221021/a42f2c45/attachment-0001.html>
More information about the ghc-commits
mailing list