Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Travis Whitaker
GHC
Commits
d7e0b57f
Commit
d7e0b57f
authored
Apr 08, 2020
by
Alp Mestanogullari
Committed by
Marge Bot
May 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hadrian: add a --freeze2 option to freeze stage 1 and 2
parent
55e35c0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
hadrian/README.md
hadrian/README.md
+3
-0
hadrian/src/CommandLine.hs
hadrian/src/CommandLine.hs
+11
-3
hadrian/src/Main.hs
hadrian/src/Main.hs
+6
-1
No files found.
hadrian/README.md
View file @
d7e0b57f
...
...
@@ -101,6 +101,9 @@ time when you are working on a feature that affects both Stage1 and Stage2
compilers, but may lead to incorrect build results. To unfreeze Stage1 GHC
simply drop the
`--freeze1`
flag and Hadrian will rebuild all out-of-date files.
*
`--freeze2`
: just like
`--freeze1`
but tell Hadrian to additionally freeze
Stage2 GHC.
*
`--integer-simple`
: build GHC using the
`integer-simple`
integer library
(instead of
`integer-gmp`
).
...
...
hadrian/src/CommandLine.hs
View file @
d7e0b57f
module
CommandLine
(
optDescrs
,
cmdLineArgsMap
,
cmdFlavour
,
lookupFreeze1
,
cmdIntegerSimple
,
cmdProgressInfo
,
cmdConfigure
,
cmdCompleteSetting
,
optDescrs
,
cmdLineArgsMap
,
cmdFlavour
,
lookupFreeze1
,
lookupFreeze2
,
cmdIntegerSimple
,
cmdProgressInfo
,
cmdConfigure
,
cmdCompleteSetting
,
cmdDocsArgs
,
lookupBuildRoot
,
TestArgs
(
..
),
TestSpeed
(
..
),
defaultTestArgs
)
where
...
...
@@ -24,6 +24,7 @@ data CommandLineArgs = CommandLineArgs
{
configure
::
Bool
,
flavour
::
Maybe
String
,
freeze1
::
Bool
,
freeze2
::
Bool
,
integerSimple
::
Bool
,
progressInfo
::
ProgressInfo
,
buildRoot
::
BuildRoot
...
...
@@ -38,6 +39,7 @@ defaultCommandLineArgs = CommandLineArgs
{
configure
=
False
,
flavour
=
Nothing
,
freeze1
=
False
,
freeze2
=
False
,
integerSimple
=
False
,
progressInfo
=
Brief
,
buildRoot
=
BuildRoot
"_build"
...
...
@@ -100,8 +102,9 @@ readBuildRoot ms =
set
::
BuildRoot
->
CommandLineArgs
->
CommandLineArgs
set
flag
flags
=
flags
{
buildRoot
=
flag
}
readFreeze1
::
Either
String
(
CommandLineArgs
->
CommandLineArgs
)
readFreeze1
,
readFreeze2
::
Either
String
(
CommandLineArgs
->
CommandLineArgs
)
readFreeze1
=
Right
$
\
flags
->
flags
{
freeze1
=
True
}
readFreeze2
=
Right
$
\
flags
->
flags
{
freeze1
=
True
,
freeze2
=
True
}
readIntegerSimple
::
Either
String
(
CommandLineArgs
->
CommandLineArgs
)
readIntegerSimple
=
Right
$
\
flags
->
flags
{
integerSimple
=
True
}
...
...
@@ -239,6 +242,8 @@ optDescrs =
"Build flavour (Default, Devel1, Devel2, Perf, Prof, Quick or Quickest)."
,
Option
[]
[
"freeze1"
]
(
NoArg
readFreeze1
)
"Freeze Stage1 GHC."
,
Option
[]
[
"freeze2"
]
(
NoArg
readFreeze2
)
"Freeze Stage2 GHC."
,
Option
[]
[
"integer-simple"
]
(
NoArg
readIntegerSimple
)
"Build GHC with integer-simple library."
,
Option
[]
[
"progress-info"
]
(
OptArg
readProgressInfo
"STYLE"
)
...
...
@@ -336,6 +341,9 @@ lookupBuildRoot = buildRoot . lookupExtra defaultCommandLineArgs
lookupFreeze1
::
Map
.
HashMap
TypeRep
Dynamic
->
Bool
lookupFreeze1
=
freeze1
.
lookupExtra
defaultCommandLineArgs
lookupFreeze2
::
Map
.
HashMap
TypeRep
Dynamic
->
Bool
lookupFreeze2
=
freeze2
.
lookupExtra
defaultCommandLineArgs
cmdIntegerSimple
::
Action
Bool
cmdIntegerSimple
=
integerSimple
<$>
cmdLineArgs
...
...
hadrian/src/Main.hs
View file @
d7e0b57f
...
...
@@ -30,7 +30,12 @@ main = do
BuildRoot
buildRoot
=
CommandLine
.
lookupBuildRoot
argsMap
rebuild
=
[
(
RebuildLater
,
buildRoot
-/-
"stage0/**"
)
|
CommandLine
.
lookupFreeze1
argsMap
]
|
CommandLine
.
lookupFreeze1
argsMap
||
CommandLine
.
lookupFreeze2
argsMap
]
++
[
(
RebuildLater
,
buildRoot
-/-
"stage1/**"
)
|
CommandLine
.
lookupFreeze2
argsMap
]
cwd
<-
getCurrentDirectory
shakeColor
<-
shouldUseColor
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment