Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
366b35b2
Commit
366b35b2
authored
Apr 26, 2016
by
Andrey Mokhov
Browse files
Minor revision.
parent
64ae7fe8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Settings/Builders/Ghc.hs
View file @
366b35b2
...
...
@@ -2,6 +2,8 @@ module Settings.Builders.Ghc (
ghcBuilderArgs
,
ghcMBuilderArgs
,
commonGhcArgs
)
where
import
Control.Monad.Trans.Reader
import
Base
import
Expression
import
GHC
...
...
@@ -20,11 +22,7 @@ import Settings.Builders.Common (cIncludeArgs)
-- $$(addsuffix .$$(dyn_osuf)-boot,$$(basename $$@)))
ghcBuilderArgs
::
Args
ghcBuilderArgs
=
(
stagedBuilder
(
Ghc
Compile
)
||^
stagedBuilder
(
Ghc
Link
))
?
do
output
<-
getOutput
stage
<-
getStage
way
<-
getWay
when
(
stage
>
Stage0
)
.
lift
$
needTouchy
let
buildObj
=
any
(
\
s
->
(
"//*."
++
s
way
)
?==
output
)
[
osuf
,
obootsuf
]
needTouchy
mconcat
[
commonGhcArgs
,
arg
"-H32m"
,
stage0
?
arg
"-O"
...
...
@@ -32,8 +30,8 @@ ghcBuilderArgs = (stagedBuilder (Ghc Compile) ||^ stagedBuilder (Ghc Link)) ? do
,
arg
"-Wall"
,
arg
"-fwarn-tabs"
,
splitObjectsArgs
,
not
buildObj
?
ghcLinkArgs
,
buildObj
?
arg
"-c"
,
ghcLinkArgs
,
stagedBuilder
(
Ghc
Compile
)
?
arg
"-c"
,
append
=<<
getInputs
,
arg
"-o"
,
arg
=<<
getOutput
]
...
...
@@ -54,10 +52,15 @@ ghcLinkArgs = stagedBuilder (Ghc Link) ? do
,
append
[
"-optl-l"
++
lib
|
lib
<-
libs
++
gmpLibs
]
,
append
[
"-optl-L"
++
dir
|
dir
<-
libDirs
]
]
needTouchy
::
Action
()
needTouchy
=
whenM
windowsHost
$
need
[
fromJust
$
programPath
(
vanillaContext
Stage0
touchy
)]
-- TODO: Add Touchy builder and use needBuilder.
needTouchy
::
ReaderT
Target
Action
()
needTouchy
=
do
stage
<-
getStage
windows
<-
lift
$
windowsHost
lift
.
when
(
stage
>
Stage0
&&
windows
)
$
need
[
fromJust
$
programPath
(
vanillaContext
Stage0
touchy
)]
-- TODO: Add GhcSplit builder and use needBuilder.
splitObjectsArgs
::
Args
splitObjectsArgs
=
splitObjects
?
do
lift
$
need
[
ghcSplit
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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