diff options
author | Brad King <brad.king@kitware.com> | 2019-07-26 16:48:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-26 18:17:07 (GMT) |
commit | 97bca2f9fab58fcf5bbcb29e1e7e86e37b5cc1e0 (patch) | |
tree | 048fee25cd8797b3527994c504c5b8ce50e2ede2 /Tests | |
parent | 19f36c5fb2497703e4f071b3a9424a8d121ccef9 (diff) | |
download | CMake-97bca2f9fab58fcf5bbcb29e1e7e86e37b5cc1e0.zip CMake-97bca2f9fab58fcf5bbcb29e1e7e86e37b5cc1e0.tar.gz CMake-97bca2f9fab58fcf5bbcb29e1e7e86e37b5cc1e0.tar.bz2 |
Android: Use unified toolchain in NDK r19+
The NDK build system now uses only a single toolchain in
<ndk>/toolchains/llvm/prebuilt/<host>
Its compilers are always `bin/{clang,clang++}` and its binutils are
always `bin/<triple>-*`. It is a standalone toolchain:
* The Anrdoid API level is specified at the end of `--target=`.
* The standard library may be specified via `-stdlib=`.
* No need to pass system includes or libraries explicitly.
* No need to pass `--sysroot` or `-gcc-toolchain`.
Teach CMake to recognize NDK versions that have a unified
toolchain with its own sysroot and use the above approach.
Fixes: #18739
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/Android/ndk-arm64-v8a-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-armeabi-arm-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-armeabi-v7a-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-badver-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-badvernum-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-mips-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-mips64-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-x86-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Android/ndk-x86_64-stdout.txt | 2 |
10 files changed, 15 insertions, 12 deletions
diff --git a/Tests/RunCMake/Android/ndk-arm64-v8a-stdout.txt b/Tests/RunCMake/Android/ndk-arm64-v8a-stdout.txt index 8d0bdc2..a228ccc 100644 --- a/Tests/RunCMake/Android/ndk-arm64-v8a-stdout.txt +++ b/Tests/RunCMake/Android/ndk-arm64-v8a-stdout.txt @@ -1,2 +1,2 @@ -- Android: Targeting API '[0-9]+' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64' --- Android: Selected (Clang toolchain '[^']+' with )?GCC toolchain '[^']+' +-- Android: Selected (unified Clang toolchain|(Clang toolchain '[^']+' with )?GCC toolchain '[^']+') diff --git a/Tests/RunCMake/Android/ndk-armeabi-arm-stdout.txt b/Tests/RunCMake/Android/ndk-armeabi-arm-stdout.txt index 3741da3..72ec00e 100644 --- a/Tests/RunCMake/Android/ndk-armeabi-arm-stdout.txt +++ b/Tests/RunCMake/Android/ndk-armeabi-arm-stdout.txt @@ -1,3 +1,3 @@ -- Android: Targeting API '[0-9]+' with architecture 'arm', ABI 'armeabi', and processor 'armv5te' --- Android: Selected (Clang toolchain '[^']+' with )?GCC toolchain '[^']+' +-- Android: Selected (unified Clang toolchain|(Clang toolchain '[^']+' with )?GCC toolchain '[^']+') .*-- CMAKE_ANDROID_ARM_MODE=1 diff --git a/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stdout.txt b/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stdout.txt index ac2bfd5..8bd87fa 100644 --- a/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stdout.txt +++ b/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stdout.txt @@ -1,3 +1,3 @@ -- Android: Targeting API '[0-9]+' with architecture 'arm', ABI 'armeabi-v7a', and processor 'armv7-a' --- Android: Selected (Clang toolchain '[^']+' with )?GCC toolchain '[^']+' +-- Android: Selected (unified Clang toolchain|(Clang toolchain '[^']+' with )?GCC toolchain '[^']+') .*-- CMAKE_ANDROID_ARM_NEON=1 diff --git a/Tests/RunCMake/Android/ndk-armeabi-v7a-stdout.txt b/Tests/RunCMake/Android/ndk-armeabi-v7a-stdout.txt index 0edb4f7..554548e 100644 --- a/Tests/RunCMake/Android/ndk-armeabi-v7a-stdout.txt +++ b/Tests/RunCMake/Android/ndk-armeabi-v7a-stdout.txt @@ -1,3 +1,3 @@ -- Android: Targeting API '[0-9]+' with architecture 'arm', ABI 'armeabi-v7a', and processor 'armv7-a' --- Android: Selected (Clang toolchain '[^']+' with )?GCC toolchain '[^']+' +-- Android: Selected (unified Clang toolchain|(Clang toolchain '[^']+' with )?GCC toolchain '[^']+') .*-- CMAKE_ANDROID_ARM_NEON=0 diff --git a/Tests/RunCMake/Android/ndk-badver-stderr.txt b/Tests/RunCMake/Android/ndk-badver-stderr.txt index df2c5e6..ce6bc4e 100644 --- a/Tests/RunCMake/Android/ndk-badver-stderr.txt +++ b/Tests/RunCMake/Android/ndk-badver-stderr.txt @@ -1,11 +1,12 @@ ^CMake Error at .*/Modules/Platform/Android/Determine-Compiler-NDK.cmake:[0-9]+ \(message\): - Android: The CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION value 'badver' is not one + Android: The CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION value 'badver' is not( + supported by this NDK. It must be 'clang' or not set at all\.| one of the allowed forms: <major>.<minor> = GCC of specified version clang<major>.<minor> = Clang of specified version clang = Clang of most recent available version - +) Call Stack \(most recent call first\): .* ndk-badver.cmake:1 \(enable_language\) diff --git a/Tests/RunCMake/Android/ndk-badvernum-stderr.txt b/Tests/RunCMake/Android/ndk-badvernum-stderr.txt index adacaf1..aec91d9 100644 --- a/Tests/RunCMake/Android/ndk-badvernum-stderr.txt +++ b/Tests/RunCMake/Android/ndk-badvernum-stderr.txt @@ -1,4 +1,6 @@ -^CMake Error at .*/Modules/Platform/Android/Determine-Compiler-NDK.cmake:[0-9]+ \(message\): +^CMake Error at .*/Modules/Platform/Android/Determine-Compiler-NDK.cmake:[0-9]+ \(message\):( + Android: The CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION value '1.0' is not + supported by this NDK. It must be 'clang' or not set at all.| Android: No toolchain for ABI 'armeabi(-v7a)?' found in the NDK: .* @@ -6,7 +8,7 @@ of the version specified by CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION: 1\.0 - +) Call Stack \(most recent call first\): .* ndk-badvernum.cmake:1 \(enable_language\) diff --git a/Tests/RunCMake/Android/ndk-mips-stdout.txt b/Tests/RunCMake/Android/ndk-mips-stdout.txt index c744683..8ce544d 100644 --- a/Tests/RunCMake/Android/ndk-mips-stdout.txt +++ b/Tests/RunCMake/Android/ndk-mips-stdout.txt @@ -1,2 +1,2 @@ -- Android: Targeting API '[0-9]+' with architecture 'mips', ABI 'mips', and processor 'mips' --- Android: Selected (Clang toolchain '[^']+' with )?GCC toolchain '[^']+' +-- Android: Selected (unified Clang toolchain|(Clang toolchain '[^']+' with )?GCC toolchain '[^']+') diff --git a/Tests/RunCMake/Android/ndk-mips64-stdout.txt b/Tests/RunCMake/Android/ndk-mips64-stdout.txt index 839ddfd..1d7edea 100644 --- a/Tests/RunCMake/Android/ndk-mips64-stdout.txt +++ b/Tests/RunCMake/Android/ndk-mips64-stdout.txt @@ -1,2 +1,2 @@ -- Android: Targeting API '[0-9]+' with architecture 'mips64', ABI 'mips64', and processor 'mips64' --- Android: Selected (Clang toolchain '[^']+' with )?GCC toolchain '[^']+' +-- Android: Selected (unified Clang toolchain|(Clang toolchain '[^']+' with )?GCC toolchain '[^']+') diff --git a/Tests/RunCMake/Android/ndk-x86-stdout.txt b/Tests/RunCMake/Android/ndk-x86-stdout.txt index 2dbb2f0..8d710fe 100644 --- a/Tests/RunCMake/Android/ndk-x86-stdout.txt +++ b/Tests/RunCMake/Android/ndk-x86-stdout.txt @@ -1,2 +1,2 @@ -- Android: Targeting API '[0-9]+' with architecture 'x86', ABI 'x86', and processor 'i686' --- Android: Selected (Clang toolchain '[^']+' with )?GCC toolchain '[^']+' +-- Android: Selected (unified Clang toolchain|(Clang toolchain '[^']+' with )?GCC toolchain '[^']+') diff --git a/Tests/RunCMake/Android/ndk-x86_64-stdout.txt b/Tests/RunCMake/Android/ndk-x86_64-stdout.txt index a7ae91d..695a088 100644 --- a/Tests/RunCMake/Android/ndk-x86_64-stdout.txt +++ b/Tests/RunCMake/Android/ndk-x86_64-stdout.txt @@ -1,2 +1,2 @@ -- Android: Targeting API '[0-9]+' with architecture 'x86_64', ABI 'x86_64', and processor 'x86_64' --- Android: Selected (Clang toolchain '[^']+' with )?GCC toolchain '[^']+' +-- Android: Selected (unified Clang toolchain|(Clang toolchain '[^']+' with )?GCC toolchain '[^']+') |