Skip to content

Cabal: Add RUNPATH entries for transitive C library dependencies#1282

Merged
mergify[bot] merged 2 commits intomasterfrom
cabal-binary-runpath
Mar 30, 2020
Merged

Cabal: Add RUNPATH entries for transitive C library dependencies#1282
mergify[bot] merged 2 commits intomasterfrom
cabal-binary-runpath

Conversation

@aherrmann
Copy link
Copy Markdown
Contributor

Add RUNPATH entries for all transitive C library dependencies to Cabal targets. GHC passes -l flags for all transitive C library dependencies when linking. Accordingly, we need to provide RUNPATH entries for all transitive C libraries. Also, to ensure that binaries can find their dynamic library dependencies, we add them to the runfiles attribute of the DefaultInfo provider.

Also, make static Haskell libraries available in Cabal build action, so that Cabal binaries can link statically against Haskell libraries.

Extends the test-case introduced in #1267 to test for RUNPATH entries to transitive C library dependencies in Cabal binary targets.

@Profpatsch Profpatsch added the merge-queue merge on green CI label Mar 24, 2020
@thufschmitt thufschmitt added merge-queue merge on green CI and removed merge-queue merge on green CI labels Mar 30, 2020
@thufschmitt
Copy link
Copy Markdown
Contributor

@Profpatsch @aherrmann, any idea why this isn't picked-up by the merge bot?

@aherrmann
Copy link
Copy Markdown
Contributor Author

/azp run

@aherrmann
Copy link
Copy Markdown
Contributor Author

Azure didn't pick it up.

GHC passes `-l` flags for all transitive C library dependencies when
linking. Accordingly, we need to provide `RUNPATH` entries for all
transitive C libraries. Also, to ensure that binaries can find their
dynamic library dependencies, we add them to the `runfiles` attribute of
the `DefaultInfo` provider.
Regression test for Cabal binary targets not including RUNPATH entries
for transitive C library dependencies.
@mboes mboes force-pushed the cabal-binary-runpath branch from 063e8a4 to 8a88b9f Compare March 30, 2020 17:15
@mergify mergify bot merged commit 2c4c356 into master Mar 30, 2020
@mergify mergify bot deleted the cabal-binary-runpath branch March 30, 2020 17:42
@mergify mergify bot removed the merge-queue merge on green CI label Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants