diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-09 14:59:00 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-09 22:53:48 +0200 |
commit | d9fb502b20129ef975cc6e20df306dcd84c64142 (patch) | |
tree | 24375f76321b18561d99295e8dacd0aafbe7a722 | |
parent | 89984a8a61a7e33a4ff62db98083a0e3c0c7b4b1 (diff) |
Fix android architecture detection
Android is also unix, so can pick up the host 'arch' binary when
rerunning configure. This patch splits the names so we don't end up
confusing target and host binaries.
Task-number: QTBUG-76445
Change-Id: Ib65251a514e45ad8873f523d71c17e13e56ea58a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | config.tests/arch/arch.pro | 1 | ||||
-rw-r--r-- | config.tests/arch/arch_host.pro | 2 | ||||
-rw-r--r-- | configure.json | 2 | ||||
-rw-r--r-- | configure.pri | 17 |
4 files changed, 12 insertions, 10 deletions
diff --git a/config.tests/arch/arch.pro b/config.tests/arch/arch.pro index 2ffdb2c889..45a7eb33af 100644 --- a/config.tests/arch/arch.pro +++ b/config.tests/arch/arch.pro @@ -1,2 +1 @@ -TARGET = arch SOURCES = arch.cpp diff --git a/config.tests/arch/arch_host.pro b/config.tests/arch/arch_host.pro index f7acef0c5d..cefdbc77ef 100644 --- a/config.tests/arch/arch_host.pro +++ b/config.tests/arch/arch_host.pro @@ -1,2 +1,2 @@ option(host_build) -include(arch.pro) +SOURCES = arch.cpp diff --git a/configure.json b/configure.json index 525cb5a12c..7279259484 100644 --- a/configure.json +++ b/configure.json @@ -233,12 +233,14 @@ "label": "target architecture", "type": "architecture", "test": "arch", + "output": "arch", "log": "arch" }, "host_architecture": { "label": "host architecture", "type": "architecture", "test": "arch", + "output": "arch_host", "host": true, "pro": "arch_host.pro", "log": "arch" diff --git a/configure.pri b/configure.pri index 131aa868c2..da5d22382d 100644 --- a/configure.pri +++ b/configure.pri @@ -267,15 +267,16 @@ defineTest(qtConfTest_architecture) { error("Could not determine $$eval($${1}.label). See config.log for details.") test = $$eval($${1}.test) + output = $$eval($${1}.output) test_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)/$$test - unix:exists($$test_out_dir/arch): \ - content = $$cat($$test_out_dir/arch, blob) - else: win32:exists($$test_out_dir/arch.exe): \ - content = $$cat($$test_out_dir/arch.exe, blob) - else: android:exists($$test_out_dir/libarch.so): \ - content = $$cat($$test_out_dir/libarch.so, blob) - else: wasm:exists($$test_out_dir/arch.wasm): \ - content = $$cat($$test_out_dir/arch.wasm, blob) + unix:exists($$test_out_dir/$$output): \ + content = $$cat($$test_out_dir/$$output, blob) + else: win32:exists($$test_out_dir/$${output}.exe): \ + content = $$cat($$test_out_dir/$${output}.exe, blob) + else: android:exists($$test_out_dir/lib$${output}.so): \ + content = $$cat($$test_out_dir/lib$${output}.so, blob) + else: wasm:exists($$test_out_dir/$${output}.wasm): \ + content = $$cat($$test_out_dir/$${output}.wasm, blob) else: \ error("$$eval($${1}.label) detection binary not found.") |