summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Pipeline
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-11-21 13:27:23 -0500
committerBen Gamari <ben@smart-cactus.org>2022-11-21 13:27:23 -0500
commit3a56337be36496ae4c11eb9afff092ebc0283256 (patch)
treea8b461b6f7ac334a3d7a4e391265c22bdee8aaae /compiler/GHC/Driver/Pipeline
parent451aeac3b07f171f148995717d0d9a1eefe08f0e (diff)
downloadhaskell-wip/drop-touch.tar.gz
Drop dependence on `touch`wip/drop-touch
This drops GHC's dependence on the `touch` program, instead implementing it within GHC. This eliminates an external dependency and means that we have one fewer program to keep track of in the `configure` script
Diffstat (limited to 'compiler/GHC/Driver/Pipeline')
-rw-r--r--compiler/GHC/Driver/Pipeline/Execute.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/GHC/Driver/Pipeline/Execute.hs b/compiler/GHC/Driver/Pipeline/Execute.hs
index 2a1e877292..b1a9660647 100644
--- a/compiler/GHC/Driver/Pipeline/Execute.hs
+++ b/compiler/GHC/Driver/Pipeline/Execute.hs
@@ -74,6 +74,7 @@ import GHC.Linker.ExtraObj
import GHC.Linker.Dynamic
import Data.Version
import GHC.Utils.Panic
+import GHC.Utils.Touch
import GHC.Unit.Module.Env
import GHC.Driver.Env.KnotVars
import GHC.Driver.Config.Finder
@@ -529,7 +530,7 @@ runHscBackendPhase pipe_env hsc_env mod_name src_flavour location result = do
-- In the case of hs-boot files, generate a dummy .o-boot
-- stamp file for the benefit of Make
- HsBootFile -> touchObjectFile logger dflags o_file
+ HsBootFile -> touchObjectFile o_file
HsSrcFile -> panic "HscUpdate not relevant for HscSrcFile"
return ([], iface, emptyHomeModInfoLinkable, o_file)
@@ -1148,10 +1149,10 @@ generateMacros prefix name version =
-touchObjectFile :: Logger -> DynFlags -> FilePath -> IO ()
-touchObjectFile logger dflags path = do
+touchObjectFile :: FilePath -> IO ()
+touchObjectFile path = do
createDirectoryIfMissing True $ takeDirectory path
- GHC.SysTools.touch logger dflags "Touching object file" path
+ GHC.Utils.Touch.touch path
-- Note [-fPIC for assembler]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~