
#13287: The runtime parses arguments past -- under windows but passes them on as arguments on linux -------------------------------------+------------------------------------- Reporter: AndreasK | Owner: AndreasK Type: bug | Status: new Priority: high | Milestone: 8.2.1 Component: Runtime System | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by AndreasK): The issue was slightly more complicated than expected. * The runtime parses arguments correctly and ignores RTS flags past `--` * On linux `getArgs` fetches the arguments from the runtime and returns these as expected. * On Windows `getArgs` ignores the arguments provided by the RTS and instead uses `GetCommandLineW` to get the arguments, parsing these and throwing out any RTS flags without parsing them. The issue is that the code throwing out RTS flags didn't consider the case of `--` resulting in the above behavior. I see two ways to fix this: * Update the parsing code in base (easy). * Use getCommandLineW and consorts instead of argv in the RTS on Windows. (A more proper fix). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13287#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler