forked from tweag/rules_haskell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add th_deps attribute for compile-time dependencies
Implements the proposal in tweag#1382. A new `th_deps` attribute is added to `haskell_(library|binary|test)` that is similar to `deps` but makes only the libraries in the formaer available at compile-time. As discussed in the issue, this reduces the number of dependencies for the build action, creating more opportunities for parallel work. In addition, adding all cc deps at compile time was preventing some configurations from working: ghc's dynamic linker apparently tries to load the .so files in the order in which they are specified so if a.so declares symbols referenced by b.so, a.so needs to be given first. We don't seem to control the order in which these are passed from the rules, though. E.g., without `th_deps` defaulting to `[]` I'm unable to package llvm-hs to use a bazel-built llvm, since the former uses TH and FFI (but no FFI during TH) and the latter splits things in several several packages.
- Loading branch information
1 parent
9772e52
commit 8716d1f
Showing
11 changed files
with
259 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.