diff options
Diffstat (limited to 'hadrian/src/Rules')
-rw-r--r-- | hadrian/src/Rules/Generate.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs index e2097d8d79..98ea2bd353 100644 --- a/hadrian/src/Rules/Generate.hs +++ b/hadrian/src/Rules/Generate.hs @@ -119,6 +119,7 @@ generatePackageCode context@(Context stage pkg _) = do when (pkg == ghcBoot) $ do root -/- "**" -/- dir -/- "GHC/Version.hs" %> go generateVersionHs root -/- "**" -/- dir -/- "GHC/Platform/Host.hs" %> go generatePlatformHostHs + root -/- "**" -/- dir -/- "GHC/Platform/Constants.hs" %> genPlatformConstantsType context when (pkg == compiler) $ do root -/- primopsTxt stage %> \file -> do @@ -145,6 +146,11 @@ genPrimopCode context@(Context stage _pkg _) file = do need [root -/- primopsTxt stage] build $ target context GenPrimopCode [root -/- primopsTxt stage] [file] +genPlatformConstantsType :: Context -> FilePath -> Action () +genPlatformConstantsType context file = do + withTempDir $ \tmpdir -> + build $ target context DeriveConstants [] [file,"--gen-haskell-type",tmpdir] + copyRules :: Rules () copyRules = do root <- buildRootRules |