summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Pipeline.hs
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2020-05-31 15:54:43 +0100
committerBen Gamari <ben@smart-cactus.org>2020-07-15 16:41:03 -0400
commit3ebd8ad9b1f7f77a928f2ff0d3e61ddfae068dd3 (patch)
tree4afd1a696e6fc82b2ad93a4e8603931e16549649 /compiler/GHC/Driver/Pipeline.hs
parent256299b13e17044d6904a85043130d13bc592a62 (diff)
downloadhaskell-3ebd8ad9b1f7f77a928f2ff0d3e61ddfae068dd3.tar.gz
winio: Various fixes related to rebase and testdriver
Diffstat (limited to 'compiler/GHC/Driver/Pipeline.hs')
-rw-r--r--compiler/GHC/Driver/Pipeline.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs
index 83e637401e..81a141afee 100644
--- a/compiler/GHC/Driver/Pipeline.hs
+++ b/compiler/GHC/Driver/Pipeline.hs
@@ -1980,6 +1980,7 @@ doCpp dflags raw input_fn output_fn = do
let targetArch = stringEncodeArch $ platformArch $ targetPlatform dflags
targetOS = stringEncodeOS $ platformOS $ targetPlatform dflags
+ isWindows = (platformOS $ targetPlatform dflags) == OSMinGW32
let target_defs =
[ "-D" ++ HOST_OS ++ "_BUILD_OS",
"-D" ++ HOST_ARCH ++ "_BUILD_ARCH",
@@ -1988,6 +1989,10 @@ doCpp dflags raw input_fn output_fn = do
-- remember, in code we *compile*, the HOST is the same our TARGET,
-- and BUILD is the same as our HOST.
+ let io_manager_defs =
+ [ "-D__IO_MANAGER_WINIO__=1" | isWindows ] ++
+ [ "-D__IO_MANAGER_MIO__=1" ]
+
let sse_defs =
[ "-D__SSE__" | isSseEnabled dflags ] ++
[ "-D__SSE2__" | isSse2Enabled dflags ] ++
@@ -2033,6 +2038,7 @@ doCpp dflags raw input_fn output_fn = do
++ map GHC.SysTools.Option hscpp_opts
++ map GHC.SysTools.Option sse_defs
++ map GHC.SysTools.Option avx_defs
+ ++ map GHC.SysTools.Option io_manager_defs
++ mb_macro_include
-- Set the language mode to assembler-with-cpp when preprocessing. This
-- alleviates some of the C99 macro rules relating to whitespace and the hash