[Git][ghc/ghc][master] hadrian: remove broken hsc2hs flag when cross compiling to windows
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 4c9395f5 by Cheng Shao at 2026-01-08T13:30:16-05:00 hadrian: remove broken hsc2hs flag when cross compiling to windows This patch removes the `--via-asm` hsc2hs flag when cross compiling to windows. With recent llvm-mingw toolchain, it would fail with: ``` x86_64-w64-mingw32-hsc2hs: Cannot combine instructions: [Quad 8,Long 4,Long 241,Ref ".Ltmp1-.Ltmp0"] ``` The hsc2hs default `--cross-compile` logic is slower but works. - - - - - 1 changed file: - hadrian/src/Settings/Builders/Hsc2Hs.hs Changes: ===================================== hadrian/src/Settings/Builders/Hsc2Hs.hs ===================================== @@ -34,13 +34,6 @@ hsc2hsBuilderArgs = builder Hsc2Hs ? do , notStage0 ? arg ("--cflag=-D" ++ tOs ++ "_HOST_OS=1" ) , arg $ "--cflag=-D__GLASGOW_HASKELL__=" ++ version , arg $ "--template=" ++ tmpl - -- We'll assume we compile with gcc or clang, and both support - -- `-S` and can as such use the --via-asm flag, which should be - -- faster and is required for cross compiling to windows, as the c - -- compiler complains about non-constant expressions even though - -- they are constant and end up as constants in the assembly. - -- See #12849 - , flag CrossCompiling ? isWinTarget ? arg "--via-asm" , arg =<< getInput , arg "-o", arg =<< getOutput ] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c9395f5e3921d56c98c226c6e97e318... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c9395f5e3921d56c98c226c6e97e318... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)