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
92352f77
Commit
92352f77
authored
Jan 13, 2015
by
Andrey Mokhov
Browse files
Fix missing options and pkgDepObjects.
parent
02297c23
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Package/Base.hs
View file @
92352f77
...
...
@@ -122,9 +122,10 @@ pkgDepObjects :: FilePath -> FilePath -> Way -> Action [FilePath]
pkgDepObjects
path
dist
way
=
do
let
pkgData
=
path
</>
dist
</>
"package-data.mk"
buildDir
=
path
</>
dist
</>
"build"
hs2obj
=
(
buildDir
++
)
.
drop
(
length
path
)
.
(
-<.>
osuf
way
)
srcs
<-
pkgHsSources
path
dist
return
$
map
(
toStandard
.
hs2obj
)
srcs
dirs
<-
map
(
normaliseEx
.
(
path
</>
))
<$>
arg
(
SrcDirs
pkgData
)
fmap
concat
$
forM
dirs
$
\
d
->
map
(
toStandard
.
(
buildDir
++
)
.
(
-<.>
osuf
way
)
.
drop
(
length
d
))
<$>
(
findModuleFiles
pkgData
[
d
]
[
".hs"
,
".lhs"
])
-- Find objects that go to library
pkgLibObjects
::
FilePath
->
FilePath
->
Stage
->
Way
->
Action
[
FilePath
]
...
...
src/Package/Compile.hs
View file @
92352f77
...
...
@@ -48,6 +48,7 @@ oRule (Package name path _) (stage, dist, settings) =
<>
arg
SrcHcOpts
<>
packageArgs
stage
pkgData
<>
includeArgs
path
dist
<>
concatArgs
[
"-optP"
]
(
CppOpts
pkgData
)
-- TODO: now we have both -O and -O2
<>
arg
[
"-Wall"
,
"-XHaskell2010"
,
"-O2"
]
<>
productArgs
[
"-odir"
,
"-hidir"
,
"-stubdir"
]
buildDir
...
...
@@ -55,7 +56,7 @@ oRule (Package name path _) (stage, dist, settings) =
<>
arg
(
"-c"
:
srcs
)
<>
arg
[
"-o"
,
toStandard
out
]
-- TODO: This rule looks
a bit of a
hack... combine it with the above?
-- TODO: This rule looks hack
y
... combine it with the above?
hiRule
::
Package
->
TodoItem
->
Rules
()
hiRule
(
Package
name
path
_
)
(
stage
,
dist
,
settings
)
=
let
buildDir
=
path
</>
dist
</>
"build"
...
...
src/Package/Dependencies.hs
View file @
92352f77
...
...
@@ -13,6 +13,7 @@ buildPackageDependencies (Package name path _) (stage, dist, settings) =
terseRun
(
Ghc
stage
)
$
arg
"-M"
<>
packageArgs
stage
pkgData
<>
includeArgs
path
dist
<>
concatArgs
[
"-optP"
]
(
CppOpts
pkgData
)
<>
productArgs
[
"-odir"
,
"-stubdir"
,
"-hidir"
]
buildDir
<>
arg
[
"-dep-makefile"
,
toStandard
$
out
<.>
"new"
]
<>
productArgs
"-dep-suffix"
(
map
wayPrefix
<$>
ways
settings
)
...
...
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