buck2-prelude icon indicating copy to clipboard operation
buck2-prelude copied to clipboard

WIP - Dynamic dependencies for Haskell (discussion)

Open avdv opened this issue 1 year ago • 0 comments

  • Pass correct rpath origin setting to linker on Darwin
  • Add cxx_merge_cpreprocessors_actions function with AnalysisActions parameter
  • Add script to generate target metadata for Haskell
  • Add ghc wrapper script which writes ABI hash and a deps file
  • Add is_haskell_boot helper function
  • Add HaskellToolchainLibrary provider
  • Add haskell_toolchain_library rule
  • Add generate_target_metadata and ghc_wrapper tool targets
  • make compiler_flags be of arg type (#34)
  • Add scripts to haskell rules
  • Allow to declare dependencies for haskell sources manually
  • Add get_source_prefixes helper function
  • Make ghci_lib_path optional in template processor script
  • Add attributes to haskell rules
  • Support HaskellToolchainLibs for ide BXL
  • Make cc toolchain tools optional
  • Determine haskell dependencies and compile modules according to the dependency graph

IMPORTANT: Please don't raise pull requests here, but at facebook/buck2.

NOTE: this is a PR to get the discussion started on how to incorporate our changes into upstream.

I'll raise a PR at the buck2 repo soonish.


These changes requires a few GHC patches:

  • add -dep-json flag for emitting machine-readable dependency info https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11994
  • --show-iface-abi-hash https://gitlab.haskell.org/ghc/ghc/-/tree/wip/show-iface-abi-hash?ref_type=heads

avdv avatar Sep 17 '24 10:09 avdv