Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

alternative approach #25

Open
samdeane opened this issue Jul 19, 2018 · 0 comments
Open

alternative approach #25

samdeane opened this issue Jul 19, 2018 · 0 comments

Comments

@samdeane
Copy link
Member

samdeane commented Jul 19, 2018

Some thoughts about an alternative approach:

Running builder should:

  • look for a known llbuild file, generate it if it's missing
  • execute the llbuild file

If the llbuild file needs (re)generating, it's done by:

  • build & execute a product in the root package with a known name (eg: "Configure")
  • this outputs the llbuild file

The llbuild file contains enough information to:

  • spot that it itself needs regenerating, and to do so in that case
  • (re)generate a (hidden) Package.swift file which is used to do the actual build
  • build & invoke any pre-compile tools
  • invoke swift build on the generated Package.swift, with the correct flags
  • invoke any post-compile tools

The advantages of this approach:

  • having an llbuild file at the top level enables full dependency checking
  • generating a Package.swift for the actual build allows dynamic dependencies to be added (eg platform-specific)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant