Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-912

Multiplexing needs to be independent of profile names

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 1.9.0
    • None
    • General
    • 41595d0cf8ac00416a3a8a437eedde2715f75500

    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.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jbornema Joerg Bornemann
              jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes