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
Packages
Cabal
Commits
9e8fea3e
Commit
9e8fea3e
authored
Oct 02, 2016
by
Edward Z. Yang
Browse files
Update 'getHaskellObjects' to take 'ComponentLocalBuildInfo'
Eliminating the use of deprecated 'getComponentLocalBuildInfo'
parent
99e83f87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Cabal/Distribution/Simple/GHC.hs
View file @
9e8fea3e
...
...
@@ -675,16 +675,16 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
|
ghcVersion
<
mkVersion
[
7
,
2
]
-- ghc-7.2+ does not make _stub.o files
,
x
<-
allLibModules
lib
clbi
]
hObjs
<-
Internal
.
getHaskellObjects
implInfo
lib
lbi
hObjs
<-
Internal
.
getHaskellObjects
implInfo
lib
lbi
clbi
libTargetDir
objExtension
True
hProfObjs
<-
if
withProfLib
lbi
then
Internal
.
getHaskellObjects
implInfo
lib
lbi
then
Internal
.
getHaskellObjects
implInfo
lib
lbi
clbi
libTargetDir
(
"p_"
++
objExtension
)
True
else
return
[]
hSharedObjs
<-
if
withSharedLib
lbi
then
Internal
.
getHaskellObjects
implInfo
lib
lbi
then
Internal
.
getHaskellObjects
implInfo
lib
lbi
clbi
libTargetDir
(
"dyn_"
++
objExtension
)
False
else
return
[]
...
...
Cabal/Distribution/Simple/GHC/Internal.hs
View file @
9e8fea3e
...
...
@@ -356,8 +356,9 @@ ghcLookupProperty prop comp =
-- when using -split-objs, we need to search for object files in the
-- Module_split directory for each module.
getHaskellObjects
::
GhcImplInfo
->
Library
->
LocalBuildInfo
->
ComponentLocalBuildInfo
->
FilePath
->
String
->
Bool
->
NoCallStackIO
[
FilePath
]
getHaskellObjects
_implInfo
lib
lbi
pref
wanted_obj_ext
allow_split_objs
getHaskellObjects
_implInfo
lib
lbi
clbi
pref
wanted_obj_ext
allow_split_objs
|
splitObjs
lbi
&&
allow_split_objs
=
do
let
splitSuffix
=
"_"
++
wanted_obj_ext
++
"_split"
dirs
=
[
pref
</>
(
ModuleName
.
toFilePath
x
++
splitSuffix
)
...
...
@@ -371,8 +372,6 @@ getHaskellObjects _implInfo lib lbi pref wanted_obj_ext allow_split_objs
|
otherwise
=
return
[
pref
</>
ModuleName
.
toFilePath
x
<.>
wanted_obj_ext
|
x
<-
allLibModules
lib
clbi
]
where
clbi
=
getComponentLocalBuildInfo
lbi
CLibName
mkGhcOptPackages
::
ComponentLocalBuildInfo
->
[(
UnitId
,
ModuleRenaming
)]
...
...
Cabal/Distribution/Simple/GHCJS.hs
View file @
9e8fea3e
...
...
@@ -430,16 +430,16 @@ buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
sharedLibFilePath
=
libTargetDir
</>
mkSharedLibName
compiler_id
uid
ghciLibFilePath
=
libTargetDir
</>
Internal
.
mkGHCiLibName
uid
hObjs
<-
Internal
.
getHaskellObjects
implInfo
lib
lbi
hObjs
<-
Internal
.
getHaskellObjects
implInfo
lib
lbi
clbi
libTargetDir
objExtension
True
hProfObjs
<-
if
(
withProfLib
lbi
)
then
Internal
.
getHaskellObjects
implInfo
lib
lbi
then
Internal
.
getHaskellObjects
implInfo
lib
lbi
clbi
libTargetDir
(
"p_"
++
objExtension
)
True
else
return
[]
hSharedObjs
<-
if
(
withSharedLib
lbi
)
then
Internal
.
getHaskellObjects
implInfo
lib
lbi
then
Internal
.
getHaskellObjects
implInfo
lib
lbi
clbi
libTargetDir
(
"dyn_"
++
objExtension
)
False
else
return
[]
...
...
Cabal/Distribution/Simple/LHC.hs
View file @
9e8fea3e
...
...
@@ -364,16 +364,16 @@ buildLib verbosity pkg_descr lbi lib clbi = do
(
ModuleName
.
toFilePath
x
++
"_stub"
)
|
x
<-
allLibModules
lib
clbi
]
hObjs
<-
getHaskellObjects
lib
lbi
hObjs
<-
getHaskellObjects
lib
lbi
clbi
pref
objExtension
True
hProfObjs
<-
if
(
withProfLib
lbi
)
then
getHaskellObjects
lib
lbi
then
getHaskellObjects
lib
lbi
clbi
pref
(
"p_"
++
objExtension
)
True
else
return
[]
hSharedObjs
<-
if
(
withSharedLib
lbi
)
then
getHaskellObjects
lib
lbi
then
getHaskellObjects
lib
lbi
clbi
pref
(
"dyn_"
++
objExtension
)
False
else
return
[]
...
...
@@ -535,9 +535,9 @@ hackThreadedFlag verbosity comp prof bi
-- when using -split-objs, we need to search for object files in the
-- Module_split directory for each module.
getHaskellObjects
::
Library
->
LocalBuildInfo
getHaskellObjects
::
Library
->
LocalBuildInfo
->
ComponentLocalBuildInfo
->
FilePath
->
String
->
Bool
->
NoCallStackIO
[
FilePath
]
getHaskellObjects
lib
lbi
pref
wanted_obj_ext
allow_split_objs
getHaskellObjects
lib
lbi
clbi
pref
wanted_obj_ext
allow_split_objs
|
splitObjs
lbi
&&
allow_split_objs
=
do
let
dirs
=
[
pref
</>
(
ModuleName
.
toFilePath
x
++
"_split"
)
|
x
<-
allLibModules
lib
clbi
]
...
...
@@ -550,8 +550,6 @@ getHaskellObjects lib lbi pref wanted_obj_ext allow_split_objs
|
otherwise
=
return
[
pref
</>
ModuleName
.
toFilePath
x
<.>
wanted_obj_ext
|
x
<-
allLibModules
lib
clbi
]
where
clbi
=
getComponentLocalBuildInfo
lbi
CLibName
constructGHCCmdLine
...
...
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