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
640b38fb
Commit
640b38fb
authored
Jan 04, 2015
by
Andrey Mokhov
Browse files
Minor changes and comments.
parent
a4f318fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Base.hs
View file @
640b38fb
...
...
@@ -7,7 +7,7 @@ module Base (
module
Data
.
Monoid
,
module
Data
.
List
,
Stage
(
..
),
Args
,
arg
,
args
,
ShowAction
(
..
),
Collect
(
..
),
Args
,
arg
,
args
,
ShowAction
(
..
),
Condition
(
..
),
joinArgs
,
joinArgsSpaced
,
splitArgs
,
filterOut
...
...
src/Package.hs
View file @
640b38fb
...
...
@@ -230,14 +230,14 @@ buildPackageDeps pkg @ (Package name path _) (stage, dist, settings) =
return
$
path
</>
dir
</>
modPath
<.>
extension
packageKey
<-
packagaDataOption
pkgData
PackageKey
run
(
Ghc
stage
)
$
mconcat
[
arg
[
"-M"
]
[
arg
"-M"
,
wayHcOpts
vanilla
-- TODO: i) is this needed? ii) shall we run GHC -M multiple times?
,
splitArgs
$
arg
[
SrcHcOpts
]
,
when
(
stage
==
Stage0
)
$
arg
[
"-package-db libraries/bootstrapping.conf"
]
,
arg
[
if
usePackageKey
then
"-this-package-key"
else
"-package-name"
]
,
arg
[
packageKey
]
-- TODO: check reasoning ($$($4_THIS_PACKAGE_KEY) $$($1_$2_PACKAGE_KEY))
,
arg
[
"-hide-all-packages"
]
,
arg
[
"-i"
]
-- resets the search path to nothing; TODO: check if really needed
,
splitArgs
$
arg
SrcHcOpts
-- TODO: get rid of splitArgs
,
when
(
stage
==
Stage0
)
$
arg
"-package-db libraries/bootstrapping.conf"
,
arg
$
if
usePackageKey
then
"-this-package-key"
else
"-package-name"
,
arg
packageKey
-- TODO: check reasoning ($$($4_THIS_PACKAGE_KEY) $$($1_$2_PACKAGE_KEY))
,
arg
"-hide-all-packages"
,
arg
"-i"
-- resets the search path to nothing; TODO: check if really needed
,
arg
$
map
(
\
d
->
"-i"
++
path
</>
d
)
srcDirs
,
arg
$
do
prefix
<-
[
"-i"
,
"-I"
]
-- 'import' and '#include' search paths
...
...
@@ -245,8 +245,8 @@ buildPackageDeps pkg @ (Package name path _) (stage, dist, settings) =
return
$
prefix
++
buildDir
</>
suffix
,
arg
$
map
(
\
d
->
"-I"
++
path
</>
d
)
$
filter
isRelative
includeDirs
,
arg
$
map
(
\
d
->
"-I"
++
d
)
$
filter
isAbsolute
includeDirs
,
arg
[
"-optP-include"
]
,
arg
[
"-optP"
++
buildDir
</>
"build/autogen/cabal_macros.h"
]
,
arg
"-optP-include"
,
arg
$
"-optP"
++
buildDir
</>
"build/autogen/cabal_macros.h"
,
if
usePackageKey
then
arg
$
concatMap
(
\
d
->
[
"-package-key"
,
d
])
depKeys
else
arg
$
concatMap
(
\
d
->
[
"-package"
,
d
])
deps
...
...
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