You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cc_library(
name = "threaded-rts",
srcs = glob(
["lib/ghc-*/rts/libHSrts_thr-ghc*." + ext for ext in ["so", "dylib"]]
# dependency of `libHSrts_thr_ghc*`
# globbing on the `so` version to stay working when they update
+ ["lib/ghc-*/rts/libffi.so.*"],
),
hdrs = glob(["lib/ghc-*/include/**/*.h"]),
strip_include_prefix = glob(["lib/ghc-*/include"], exclude_directories=0)[0],
)
Most projects using the threaded-rts needs te copy/paste this boilerplate. This is not documented and error prone. We need to find a way te expose this file and avoid this boilerplate, or document.
The text was updated successfully, but these errors were encountered:
If I ever pick up #387 again, this might be something we work into that (providing haskell_nixpkgs_toolchain, haskell_local_toolchain etc.) I've currently parked that to work on (read: pester/file bugs) against #442; the two together will I think make rules_haskell something very user friendly (and possibly remove the "need" for Hazel, in most cases)
With the introduction of haskell_register_ghc_bindists() and haskell_register_ghc_nixpkgs(), this is now resolved. Both macros use ghc.BUILD, which in turn exposes the threaded RTS. The user doesn't need to do anything here.
The tutorial only shows how to import
ghc
fromnixpkgs
usingnixpkgs_package
or a custom rule such as:Unfortunately this is incomplete and does not import the
threaded-rts
library. PR #436 shows that it is not trivial and introduce the following lines inside a fileghc.BUILD
(see https://github.com/tweag/rules_haskell/blob/fcfa800a59b6d2323ce3b47d76e15b68c289356e/haskell/ghc.BUILD):Most projects using the
threaded-rts
needs te copy/paste this boilerplate. This is not documented and error prone. We need to find a way te expose this file and avoid this boilerplate, or document.The text was updated successfully, but these errors were encountered: