summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-02-04 18:56:41 -0500
committerBen Gamari <ben@smart-cactus.org>2022-03-30 22:23:24 -0400
commit04fff86a5b06e60626088ea551f7dc1b8ae7a0fd (patch)
treeda75932c1999faf7a3adbe9abd83a0968091ed82
parent953c4016dda900de6b4308682b6f97687e99c264 (diff)
downloadhaskell-04fff86a5b06e60626088ea551f7dc1b8ae7a0fd.tar.gz
driver: Drop hacks surrounding windres invocation
Drop hack for #1828, among others as they appear to be unnecessary when using `llvm-windres`.
-rw-r--r--compiler/GHC/SysTools/Tasks.hs18
1 files changed, 2 insertions, 16 deletions
diff --git a/compiler/GHC/SysTools/Tasks.hs b/compiler/GHC/SysTools/Tasks.hs
index 73b3835282..efc747c522 100644
--- a/compiler/GHC/SysTools/Tasks.hs
+++ b/compiler/GHC/SysTools/Tasks.hs
@@ -369,25 +369,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" $