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
Glasgow Haskell Compiler
Packages
Cabal
Commits
321f6db3
Commit
321f6db3
authored
Jun 29, 2020
by
Oleg Grenrus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Output flib binfile location in plan.json
Also output extension for executables.
parent
b9eeda19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
cabal-install/Distribution/Client/ProjectPlanOutput.hs
cabal-install/Distribution/Client/ProjectPlanOutput.hs
+13
-3
No files found.
cabal-install/Distribution/Client/ProjectPlanOutput.hs
View file @
321f6db3
...
...
@@ -44,6 +44,8 @@ import Distribution.Simple.GHC
(
getImplInfo
,
GhcImplInfo
(
supportsPkgEnvFiles
)
,
GhcEnvironmentFileEntry
(
..
),
simpleGhcEnvironmentFile
,
writeGhcEnvironmentFile
)
import
Distribution.Simple.BuildPaths
(
dllExtension
,
exeExtension
)
import
qualified
Distribution.Compat.Graph
as
Graph
import
Distribution.Compat.Graph
(
Graph
,
Node
)
import
qualified
Distribution.Compat.Binary
as
Binary
...
...
@@ -98,7 +100,7 @@ encodePlanAsJson distDirLayout elaboratedInstallPlan elaboratedSharedConfig =
,
"install-plan"
J
..=
installPlanToJ
elaboratedInstallPlan
]
where
Platform
arch
os
=
pkgConfigPlatform
elaboratedSharedConfig
plat
@
(
Platform
arch
os
)
=
pkgConfigPlatform
elaboratedSharedConfig
installPlanToJ
::
ElaboratedInstallPlan
->
[
J
.
Value
]
installPlanToJ
=
map
planPackageToJ
.
InstallPlan
.
toList
...
...
@@ -230,13 +232,21 @@ encodePlanAsJson distDirLayout elaboratedInstallPlan elaboratedSharedConfig =
ComponentDeps
.
ComponentExe
s
->
bin_file'
s
ComponentDeps
.
ComponentTest
s
->
bin_file'
s
ComponentDeps
.
ComponentBench
s
->
bin_file'
s
ComponentDeps
.
ComponentFLib
s
->
flib_file'
s
_
->
[]
bin_file'
s
=
[
"bin-file"
J
..=
J
.
String
bin
]
where
bin
=
if
elabBuildStyle
elab
==
BuildInplaceOnly
then
dist_dir
</>
"build"
</>
prettyShow
s
</>
prettyShow
s
else
InstallDirs
.
bindir
(
elabInstallDirs
elab
)
</>
prettyShow
s
then
dist_dir
</>
"build"
</>
prettyShow
s
</>
prettyShow
s
<.>
exeExtension
plat
else
InstallDirs
.
bindir
(
elabInstallDirs
elab
)
</>
prettyShow
s
<.>
exeExtension
plat
flib_file'
s
=
[
"bin-file"
J
..=
J
.
String
bin
]
where
bin
=
if
elabBuildStyle
elab
==
BuildInplaceOnly
then
dist_dir
</>
"build"
</>
prettyShow
s
</>
(
"lib"
++
prettyShow
s
)
<.>
dllExtension
plat
else
InstallDirs
.
bindir
(
elabInstallDirs
elab
)
</>
(
"lib"
++
prettyShow
s
)
<.>
dllExtension
plat
comp2str
::
ComponentDeps
.
Component
->
String
comp2str
=
prettyShow
...
...
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