Uploaded image for project: 'Coin'
  1. Coin
  2. COIN-553

Provide a way to re-use cached host artifacts when building a cross-compile configuration

    XMLWordPrintable

    Details

      Description

      Currently for the Qt6 CMake builds, when we build a cross-compiling configuration like iOS, we build a host Qt before building the target Qt, even though host Qt has been built before in a different configuration.

      It is important that we-reuse the already-built host Qt from a specified configuration, rather than building it again.

      Not just for performance reasons, but also for correctness.
      In the Qt installer, we allow installing macOS, and installing iOS, and the iOS installation should use the same well-tested host macOS tools, which implies artifact re-usage.

      Two possible approaches on how the user-facing API would look like.

      Approach 1 (simpler, less flexible)

      Host configurations are tagged with a "Host" Feature.
      Target configurations are tagged with a "UseHost" Feature.

      Example: Tag a Windows configuration with "Host", a macOS one, and a Linux one. We only really have 3 hosts.
      Tag the iOS configurations with "UseHost", same for Android, and Embedded Linux ones.

      When downloading the artifacts for the iOS configuration, the Agent will notice that the configuration is tagged with "UseHost", will check what's the Host OS is => macOS, and then will find and download/extract all artifacts of the macOS configuration tagged with "Host", for the appropriate SHA1.

      This assumes that the macOS configuration has already been built, and if not, the configuration should wait until the Host one has finished.

      Approach 2 (harder, more generic)

      Host configurations are tagged with an ID field (similar to Host Os, Compiler, etc)
      Target configurations have a new "UseID: X" field.

      Most of the logic would be similar, except instead of the Host lookup of the same OS, you do it for the specified ID.

      The advantage is that it allows multiple configuration to be "Host"s, and target configurations can use different "Host"s, thus allowing mix and matching.
      Example: Host macOS 10.14 + iOS, Host macOS 10.15 + Developer-build + iOS.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              tosaario Toni Saario
              Reporter:
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes