Skip to content

Support for run-tool-depends #5411

@Ericson2314

Description

@Ericson2314

build-tool-depends is for for executables used when building a component. run-tool-depends is for executables used when running a component. [Library ones are propagated to the final executable.] This distinction is important for build-time parallelism: the executable need not be built before the thing that needs it, garbage collection: installed things don't need their build-tool-depends but do need theirrun-tool-depends, and cross compilation: the former is built for the build platform while the latter is built for the host platform. [for reference, regular libraries are built for the host platform while plugins/TH should be built for the build platform.]

The motivating example would be for Setup.hs and #4648. But I think special-casing Setup.hs is not needed when the same principle can applies to any component.(likewise I sometimes wish we had build-depends for the custom setup stanza not setup-depends for consistency.)

For the cross stuff, recall that the Setup executable is built on the build platform for the build platform, so it's host and build platform (as opposed to that for the rest of the components) are the same. That removes the build-tool-depends and run-tools-depends distinction for cross for custom setups, but still keeps the others.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions