diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-05-07 15:55:04 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-12 21:41:44 -0400 |
commit | 67a5a91ef5e61f3b3c84481d8a396ed48cd5d96e (patch) | |
tree | 109ee95b75507cd49355135d53da2dbc9d9231cb /compiler/GHC/SysTools | |
parent | 0ef119071347f7bc14f0fa89904b0cfd0b230ac1 (diff) | |
download | haskell-67a5a91ef5e61f3b3c84481d8a396ed48cd5d96e.tar.gz |
Remove useless {-# LANGUAGE CPP #-} pragmas
Diffstat (limited to 'compiler/GHC/SysTools')
-rw-r--r-- | compiler/GHC/SysTools/Ar.hs | 3 | ||||
-rw-r--r-- | compiler/GHC/SysTools/Tasks.hs | 21 |
2 files changed, 11 insertions, 13 deletions
diff --git a/compiler/GHC/SysTools/Ar.hs b/compiler/GHC/SysTools/Ar.hs index 198ad6596f..daed11f432 100644 --- a/compiler/GHC/SysTools/Ar.hs +++ b/compiler/GHC/SysTools/Ar.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, CPP #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-} {- Note: [The need for Ar.hs] Building `-staticlib` required the presence of libtool, and was a such restricted to mach-o only. As libtool on macOS and gnu libtool are very diff --git a/compiler/GHC/SysTools/Tasks.hs b/compiler/GHC/SysTools/Tasks.hs index a3bde302bc..ce286fe8ca 100644 --- a/compiler/GHC/SysTools/Tasks.hs +++ b/compiler/GHC/SysTools/Tasks.hs @@ -1,5 +1,5 @@ {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE CPP #-} + ----------------------------------------------------------------------------- -- -- Tasks running external programs for SysTools @@ -27,6 +27,7 @@ import GHC.Utils.Outputable import GHC.Utils.Misc import GHC.Utils.Logger import GHC.Utils.TmpFs +import GHC.Utils.Constants (isWindowsHost) import Data.List (tails, isPrefixOf) import System.IO @@ -308,23 +309,19 @@ ld: warning: symbol referencing errors -- See Note [Merging object files for GHCi] in GHC.Driver.Pipeline. runMergeObjects :: Logger -> TmpFs -> DynFlags -> [Option] -> IO () -#if defined(mingw32_HOST_OS) -runMergeObjects logger tmpfs dflags args = -#else -runMergeObjects logger _tmpfs dflags args = -#endif +runMergeObjects logger tmpfs dflags args = traceToolCommand logger dflags "merge-objects" $ do let (p,args0) = pgm_lm dflags optl_args = map Option (getOpts dflags opt_lm) args2 = args0 ++ args ++ optl_args -- N.B. Darwin's ld64 doesn't support response files. Consequently we only -- use them on Windows where they are truly necessary. -#if defined(mingw32_HOST_OS) - mb_env <- getGccEnv args2 - runSomethingResponseFile logger tmpfs dflags id "Merge objects" p args2 mb_env -#else - runSomething logger dflags "Merge objects" p args2 -#endif + if isWindowsHost + then do + mb_env <- getGccEnv args2 + runSomethingResponseFile logger tmpfs dflags id "Merge objects" p args2 mb_env + else do + runSomething logger dflags "Merge objects" p args2 runLibtool :: Logger -> DynFlags -> [Option] -> IO () runLibtool logger dflags args = traceToolCommand logger dflags "libtool" $ do |