diff options
author | Alp Mestanogullari <alpmestan@gmail.com> | 2018-12-11 13:10:03 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-12-11 13:10:04 -0500 |
commit | 7491cedb20d15a54e905205c51aea72a13ac73aa (patch) | |
tree | e6fe0373831f9eccd6aad2c2823a26486551b118 /hadrian/src/Rules.hs | |
parent | 066d3989a45003d2caaf96fab90ec30b55a647ee (diff) | |
download | haskell-7491cedb20d15a54e905205c51aea72a13ac73aa.tar.gz |
Hadrian: simple targets for building libraries and executables
This patch introduces (phony) build targets of the form
(1) stage<N>:<lib>:<name> (e.g: stage1:lib:Cabal)
(2) stage<N>:<exe>:<name> (e.g: stage2:exe:ghc-bin)
where (1) builds the given library with the stage N compiler and (2)
builds the given executable with the stage N-1 compiler. This patch may
be generating too many such targets but it's a first stab that we can
refine.
This fixes #15949.
Test Plan: hadrian/build.sh stage1:exe:ghc-bin
Reviewers: bgamari, snowleopard
Reviewed By: bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #15949
Differential Revision: https://phabricator.haskell.org/D5434
Diffstat (limited to 'hadrian/src/Rules.hs')
-rw-r--r-- | hadrian/src/Rules.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hadrian/src/Rules.hs b/hadrian/src/Rules.hs index 69a151c206..e51dae4e07 100644 --- a/hadrian/src/Rules.hs +++ b/hadrian/src/Rules.hs @@ -20,6 +20,7 @@ import qualified Rules.Libffi import qualified Rules.Library import qualified Rules.Program import qualified Rules.Register +import qualified Rules.SimpleTargets import Settings import Target import UserSettings @@ -109,6 +110,7 @@ packageRules = do let vanillaContexts = liftM2 vanillaContext allStages knownPackages forM_ vanillaContexts Rules.Generate.generatePackageCode + Rules.SimpleTargets.simplePackageTargets buildRules :: Rules () buildRules = do |