Backport "Store interfaces files separately from library object files #3982" to 1.24#3983
Backport "Store interfaces files separately from library object files #3982" to 1.24#3983christiaanb wants to merge 2 commits intohaskell:1.24from
Conversation
These two flags indicate where the two distinct aspects of a
Haskell library end up.
--commonlibdir: The subdirectory of --libdir where the object
library files (.so/.a/.dll/.dylib) get installed.
--hidir: The directory where the interface files (.hi)
get installed.
The reason we want to do this is because we want dynamic libraries
to all end up in a shared directory to reduce start-up times of
the run-time linker. However, we still want the .hi to end up
in one directory per package.
We cannot repurpose --libsubdir to take over the role of what
--commonlibdir is doing because then we would run into trouble
with Setup.hs files build against an older Cabal. If we were
to repurpose --libsubdir, then all the object and interface
files would end up in a single shared directory for all
packages when using an older Cabal.
|
@christiaanb, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dcoutts, @23Skidoo and @ezyang to be potential reviewers. |
|
This appears to fail with |
|
I think it's unfortunate that 1.24 |
|
ping @dcoutts about |
|
Do I understand correctly that |
|
No, new-build works just fine on Sierra, as long as you don't run into the bug that this PR is fixing for non-new-build. |
|
Half a loaf is better than no loaf, but it would be good if a comprehensive solution shipped before 8.0.2 so that Sierra isn't rendered a second class GHC citizen. The question is whether there is a possibility of a single fix that will address the problem for both non-new-build and new-build. If so, this PR may end up having to be backed out. If there is no reasonable prospect of having a common fix, then there's a case for "pretending" like they're different problems, though they actually aren't, and shipping this PR. |
|
For |
|
@23Skidoo this doesn't. Yet the store layout is decided only in |
The bug I referred to is not caused by this PR. So no it won't break HEAD or anything else. |
|
OK, just to be absolutely 100% clear: This PR does not break anything. What is going on, is that this PR does currently not solve the issues mentioned in https://ghc.haskell.org/trac/ghc/ticket/12479 when we use I believe that the changes in this PR to The tests on this PR are all green, so I'm just waiting for the reviewers to give the go-ahead for a merge. |
|
Also, regardless of whether this PR solves https://ghc.haskell.org/trac/ghc/ticket/12479, it allows us to place library object files (.dll/.so/.a/.dylib) in a directory seperate from interface files |
| libsubdir :: dir, | ||
| commonlibdir :: dir, | ||
| hidir :: dir, | ||
| libsubdir :: dir, -- This field is basically deprecated by the |
There was a problem hiding this comment.
s/basically deprecated/deprecated/
| hidir :: dir, | ||
| libsubdir :: dir, -- This field is basically deprecated by the | ||
| -- introduction of commonlibdir and hidir. However, | ||
| -- We must keep it so that we can still work with |
|
|
||
| `--commonlibdir=`_dir_ | ||
| : For use with Setup.hs files build against a version of Cabal prior to 1.24.1. | ||
| For later versions of Cabal, this flag is basically deprecated, and you |
There was a problem hiding this comment.
For later versions of Cabal, this flag is basically deprecated
I think you were talking about libsubdir here.
`--binlibsubdir` more properly describes what this flag does: it indicates the directory in which the binary libraries go, and it is a subdir of `--libdir`.
|
Closing in favour of #3979, context: #3982 (comment). |
These two flags indicate where the two distinct aspects of a
Haskell library end up.
--commonlibdir: The subdirectory of --libdir where the object
library files (.so/.a/.dll/.dylib) get installed.
--hidir: The directory where the interface files (.hi)
get installed.
The reason we want to do this is because we want dynamic libraries
to all end up in a shared directory to reduce start-up times of
the run-time linker. However, we still want the .hi to end up
in one directory per package.
We cannot repurpose --libsubdir to take over the role of what
--commonlibdir is doing because then we would run into trouble
with Setup.hs files build against an older Cabal. If we were
to repurpose --libsubdir, then all the object and interface
files would end up in a single shared directory for all
packages when using an older Cabal.
This PR backports #3982 to the 1.24 branch in order to solve https://ghc.haskell.org/trac/ghc/ticket/12479