diff options
author | Tamar Christina <tamar@zhox.com> | 2020-05-31 15:54:43 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-07-15 16:41:03 -0400 |
commit | 3ebd8ad9b1f7f77a928f2ff0d3e61ddfae068dd3 (patch) | |
tree | 4afd1a696e6fc82b2ad93a4e8603931e16549649 /compiler/GHC | |
parent | 256299b13e17044d6904a85043130d13bc592a62 (diff) | |
download | haskell-3ebd8ad9b1f7f77a928f2ff0d3e61ddfae068dd3.tar.gz |
winio: Various fixes related to rebase and testdriver
Diffstat (limited to 'compiler/GHC')
-rw-r--r-- | compiler/GHC/Driver/Pipeline.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/SysTools/Info.hs | 2 |
2 files changed, 7 insertions, 1 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 diff --git a/compiler/GHC/SysTools/Info.hs b/compiler/GHC/SysTools/Info.hs index 039c1d12aa..fec6ecff15 100644 --- a/compiler/GHC/SysTools/Info.hs +++ b/compiler/GHC/SysTools/Info.hs @@ -241,7 +241,7 @@ getCompilerInfo' dflags = do | any ("Apple clang version" `isPrefixOf`) stde = return AppleClang -- Unknown linker. - | otherwise = fail "invalid -v output, or compiler is unsupported" + | otherwise = fail $ "invalid -v output, or compiler is unsupported: " ++ unlines stde -- Process the executable call info <- catchIO (do |