Skip to content

Remove legacy support for i386 windows and stdcall calling convention

Cheng Shao requested to merge wip/rip-stdcall into master

This patch removes all legacy code paths related to i386 windows (#18487 (closed)) and stdcall calling convention (#24883 (closed)), making it much easier to add arm64 windows support (#24603) in the future. A high-level overview of changes:

  • i386 windows related logic is stripped everywhere. While we stopped testing and building bindists a long time ago, it might have still worked for a certain degree, but that's no longer the case from now on.
  • stdcall is still valid Haskell syntax, GHC will emit a warning (-Wunsupported-calling-conventions, implied by -Wdefault) and treat it as ccall unconditionally on all platforms.
  • Apart from minimum parsing/warning logic, all stdcall related logic is completely stripped from the compiler and the RTS.
  • The legacy CPP pattern of using different stdcall/ccall conventions are rewritten to use ccall uniformly and remove CPP usage.
  • The testsuite is adjusted accordingly, some stdcalls are replaced by ccalls, but there do exist test case that preserve stdcall usage and ensure -Wunsupported-calling-conventions fire as expected.
  • There is not a single modification to base, nor any change in user-facing interface-stability.

Closes #24883 (closed).

Edited by Cheng Shao

Merge request reports