diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-02-04 18:56:41 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-04-06 15:18:26 -0400 |
commit | d4c5f29ceced0891dfad266ef1daa54975547068 (patch) | |
tree | 5e913ca2d6fb5b5487e6175a175c843b78e51ed1 /compiler | |
parent | f601f00246ffe3e4fcd1fc333c1d41e0dc738fc1 (diff) | |
download | haskell-d4c5f29ceced0891dfad266ef1daa54975547068.tar.gz |
driver: Drop hacks surrounding windres invocation
Drop hack for #1828, among others as they appear to be unnecessary when
using `llvm-windres`.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/SysTools/Tasks.hs | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/compiler/GHC/SysTools/Tasks.hs b/compiler/GHC/SysTools/Tasks.hs index ded526513a..d6532a6234 100644 --- a/compiler/GHC/SysTools/Tasks.hs +++ b/compiler/GHC/SysTools/Tasks.hs @@ -374,25 +374,11 @@ runRanlib logger dflags args = traceToolCommand logger "ranlib" $ do runWindres :: Logger -> DynFlags -> [Option] -> IO () runWindres logger dflags args = traceToolCommand logger "windres" $ do - let cc = pgm_c dflags - cc_args = map Option (sOpt_c (settings dflags)) + let cc_args = map Option (sOpt_c (settings dflags)) windres = pgm_windres dflags opts = map Option (getOpts dflags opt_windres) - quote x = "\"" ++ x ++ "\"" - args' = -- If windres.exe and gcc.exe are in a directory containing - -- spaces then windres fails to run gcc. We therefore need - -- to tell it what command to use... - [ Option ("--preprocessor=" ++ quote cc) ] - ++ map (Option . ("--preprocessor-arg=" ++) . quote) - (map showOpt opts ++ ["-E", "-xc", "-DRC_INVOKED"]) - -- ...but if we do that then if windres calls popen then - -- it can't understand the quoting, so we have to use - -- --use-temp-file so that it interprets it correctly. - -- See #1828. - ++ [ Option "--use-temp-file" ] - ++ args mb_env <- getGccEnv cc_args - runSomethingFiltered logger id "Windres" windres args' Nothing mb_env + runSomethingFiltered logger id "Windres" windres (opts ++ args) Nothing mb_env touch :: Logger -> DynFlags -> String -> String -> IO () touch logger dflags purpose arg = traceToolCommand logger "touch" $ |