Skip to content
  • Duncan Coutts's avatar
    Change the handling of the RTS flag --io-manager= · 85b0f87a
    Duncan Coutts authored and Marge Bot's avatar Marge Bot committed
    Now instead of it being just used on Windows to select between the WinIO
    vs the MIO or Win32-legacy I/O managers, it is now used on all platforms
    for selecting the I/O manager to use.
    
    Right now it remains the case that there is only an actual choice on
    Windows, but that will change later.
    
    Document the --io-manager flag in the user guide.
    
    This change is also reflected in the RTS flags types in the base
    library. Deprecate the export of IoSubSystem from GHC.RTS.Flags with a
    message to import it from GHC.IO.Subsystem.
    
    The way the 'IoSubSystem' is detected also changes. Instead of looking
    at the RTS flag, there is now a C bool global var in the RTS which gets
    set on startup when the I/O manager is selected. This bool var says
    whether the selected I/O manager classifies as "native" on Windows,
    which in practice means the WinIO I/O manager has been selected.
    
    Similarly, the is_io_mng_native_p RTS helper function is re-implemented
    in terms of the selected I/O manager, rather than based on the RTS
    flags.
    
    We do however remove the ./configure --native-io-manager flag because
    we're bringing the WinIO/MIO/Win32-legacy choice under the new general
    scheme for selecting I/O managers, and that new scheme involves no
    ./configure time user choices, just runtime RTS flag choices.
    85b0f87a