Details
Description
Currently a list of profile names are specified INSIDE the project build files; instead each intersection between build "axes" should create a sub-profile for a multiplex build.
This creates major problems with Qt Creator for example, whose profiles are given automatically generated names. It also forces users into an arbitrary naming convention that may or may not scale.
An idea for how name-independent multiplexing might look with "axes":
Product { Depends { name: "foo" Axes { Axis { qbs.architecture: "x86" } Axis { qbs.architecture: "x86_64" } } } // container item to make composition easier Axes { Axis { qbs.architecture: "x86" } Axis { qbs.architecture: "x86_64" } } }
- What about multiplexing on the build variant? Currently that's kind of treated specially. It would matter for combing debug and release frameworks on Apple platforms
- This solution could be a bit too verbose. What about listing Axis items and/or dynamically generating them based on a list? Should that be treated as a separate problem entirely? What about QML Repeater?
Another concept with nested products (which behaves the same as the previous example but a different syntax):
Product { name: "foo" // Depends { name: "foo-axis0" } // illustrative only, indicates a dependency on the below product Product { qbs.architecture: "x86" } // Depends { name: "foo-axis1" } // illustrative only, indicates a dependency on the below product Product { qbs.architecture: "x86_64" } Rule { multiplex: true inputsFromDependencies: ["application"] outputFileTags: ["application"] prepare: { // lipo [args...] } } // alternatively... // Depends { name: "lipo" } // or name == multiarch? }
Lastly, I had some idea of "axis specific artifacts". For each axis an artifact specifies, it is built once for each instantiation of that axis, otherwise, it's axis independent. So for example, compiler and linker Rules would indicate their output artifacts were specific to the "qbs.architecture" Axis and the "qbs.buildVariant" Axis. The TypeScript compiler Rule would not indicate its output artifacts were specific to any axis.