diff options
author | Simo Fält <simo.falt@qt.io> | 2021-11-25 16:08:21 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-12-01 20:10:54 +0000 |
commit | 71ceb878544a51c5e518641cd366ddcdc73ed8fe (patch) | |
tree | e4027bec9c8ed66b8fb6180bf77fabd4d8a4088e | |
parent | b0e4946a9b8cbdb115e7672ddecd48534f0a7515 (diff) |
Build macOS universal binaryv6.2.2
Change-Id: I0a889258ec4f89ca3a26c8bf2ee76f0d5c676a7a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e94154f02bf8f93e812dcc4edb633b9fd03331b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | coin/instructions/common_environment.yaml | 9 | ||||
-rw-r--r-- | coin/instructions/execute_build_instructions.yaml | 26 | ||||
-rw-r--r-- | coin_build_instructions.py | 3 |
3 files changed, 35 insertions, 3 deletions
diff --git a/coin/instructions/common_environment.yaml b/coin/instructions/common_environment.yaml index fcbd97455..de83714e5 100644 --- a/coin/instructions/common_environment.yaml +++ b/coin/instructions/common_environment.yaml @@ -163,3 +163,12 @@ instructions: - type: EnvironmentVariable variableName: LLVM_INSTALL_DIR variableValue: "{{.Env.LLVM_DYNAMIC_LIBS_100}}" + disable_if: + condition: and + conditions: + - condition: property + property: target.arch + equals_value: X86_64-ARM64 # When target arch is universal binary, we can use the default libclang + - condition: property + property: host.os + equals_value: MacOS diff --git a/coin/instructions/execute_build_instructions.yaml b/coin/instructions/execute_build_instructions.yaml index e1a082bb6..71ed80172 100644 --- a/coin/instructions/execute_build_instructions.yaml +++ b/coin/instructions/execute_build_instructions.yaml @@ -15,9 +15,29 @@ instructions: maxTimeInSeconds: 14400 maxTimeBetweenOutput: 1200 enable_if: - condition: property - property: host.os - equals_value: MacOS + condition: and + conditions: + - condition: property + property: target.arch + equals_value: X86_64 + - condition: property + property: host.os + equals_value: MacOS + userMessageOnFailure: > + Failed to execute build instructions on osx + - type: ExecuteCommand + command: "python3 -u coin_build_instructions.py --os={{.Env.CI_OS}} {{.Env.CI_PACKAGING_FEATURE}} {{.Env.CI_USE_SCCACHE}} --instdir=/Users/qt/work/install --targetOs={{.Env.CI_OS}} --hostArch=X86_64 --targetArch=X86_64-ARM64 --phase=ALL" + maxTimeInSeconds: 14400 + maxTimeBetweenOutput: 1200 + enable_if: + condition: and + conditions: + - condition: property + property: target.arch + equals_value: X86_64-ARM64 + - condition: property + property: host.os + equals_value: MacOS userMessageOnFailure: > Failed to execute build instructions on osx - type: ExecuteCommand diff --git a/coin_build_instructions.py b/coin_build_instructions.py index ed7055e31..fff680587 100644 --- a/coin_build_instructions.py +++ b/coin_build_instructions.py @@ -148,6 +148,9 @@ def call_setup(python_ver, phase): cmd += ["--build-tests", "--verbose-build"] + if CI_TARGET_ARCH == "X86_64-ARM64": + cmd += ["--macos-arch='x86_64;arm64'"] + if CI_USE_SCCACHE: cmd += [f"--compiler-launcher={CI_USE_SCCACHE}"] |