From adafc021928918728e4640859ae3d0309797a78f Mon Sep 17 00:00:00 2001 From: Christian Stenger <christian.stenger@digia.com> Date: Wed, 27 Mar 2013 13:56:27 +0100 Subject: [PATCH] Squish: Fix detection of ABIs on Mac Change-Id: If3cca65f1f3ccf7e62dc79cde72d1bce41ab92b9 Reviewed-by: Robert Loehning <robert.loehning@digia.com> --- .../system/settings/unix/QtProject/qtcreator/toolchains.xml | 1 + tests/system/shared/qtcreator.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/system/settings/unix/QtProject/qtcreator/toolchains.xml b/tests/system/settings/unix/QtProject/qtcreator/toolchains.xml index a2525c73ac0..5c9c9b48c8f 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/toolchains.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/toolchains.xml @@ -9,6 +9,7 @@ <valuelist type="QVariantList" key="ProjectExplorer.GccToolChain.SupportedAbis"> <value type="QString">x86-linux-generic-elf-64bit</value> <value type="QString">x86-linux-generic-elf-32bit</value> + <value type="QString">x86-macos-generic-mach_o-64bit</value> </valuelist> <value type="QString" key="ProjectExplorer.GccToolChain.TargetAbi">SET_BY_SQUISH</value> <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">false</value> diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index d1c5a61eb92..41bbbde0b15 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -147,6 +147,10 @@ def substituteDefaultCompiler(settingsDir): test.log("Injected default compiler '%s' to qtversion.xml..." % compiler) def __guessABI__(supportedABIs, use64Bit): + if platform.system() == 'Linux': + supportedABIs = filter(lambda x: 'linux' in x, supportedABIs) + elif platform.system() == 'Darwin': + supportedABIs = filter(lambda x: 'macos' in x, supportedABIs) if use64Bit: searchFor = "64bit" else: @@ -162,8 +166,6 @@ def __guessABI__(supportedABIs, use64Bit): return '' def __is64BitOS__(): - if platform.system() == 'Darwin': - return sys.maxsize > (2 ** 32) if platform.system() in ('Microsoft', 'Windows'): machine = os.getenv("PROCESSOR_ARCHITEW6432", os.getenv("PROCESSOR_ARCHITECTURE")) else: -- GitLab