Skip to content

Commit 1a28a91

Browse files
committed
[android] Switch armv7 vendor to 'unknown' in target triple to match other arches
Recent changes have made 'none' and 'unknown' not interchangeable anymore, so standardize on 'unknown' for armv7 too.
1 parent b9a895f commit 1a28a91

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ macro(configure_sdk_unix name architectures)
297297
else()
298298
message(SEND_ERROR "Couldn't find SWIFT_SDK_ANDROID_ARCH_armv7_PATH")
299299
endif()
300-
set(SWIFT_SDK_ANDROID_ARCH_${arch}_TRIPLE "armv7-none-linux-androideabi")
300+
set(SWIFT_SDK_ANDROID_ARCH_${arch}_TRIPLE "armv7-unknown-linux-androideabi")
301301
# The Android ABI isn't part of the module triple.
302-
set(SWIFT_SDK_ANDROID_ARCH_${arch}_MODULE "armv7-none-linux-android")
302+
set(SWIFT_SDK_ANDROID_ARCH_${arch}_MODULE "armv7-unknown-linux-android")
303303
elseif("${arch}" STREQUAL "aarch64")
304304
set(SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE "aarch64-linux-android")
305305
set(SWIFT_SDK_ANDROID_ARCH_${arch}_ALT_SPELLING "aarch64")

docs/Android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ $ NDK_PATH="path/to/android-ndk21"
103103
$ build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swiftc \ # The Swift compiler built in the previous step.
104104
# The location of the tools used to build Android binaries
105105
-tools-directory ${NDK_PATH}/toolchains/llvm/prebuilt/linux-x86_64/bin/ \
106-
-target armv7a-none-linux-androideabi \ # Targeting android-armv7, and supply the path to libgcc.
106+
-target armv7a-unknown-linux-androideabi \ # Targeting android-armv7, and supply the path to libgcc.
107107
-L ${NDK_PATH}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a \
108108
-sdk ${NDK_PATH}/platforms/android-21/arch-arm \ # Use the same architecture and API version as you used to build the stdlib in the previous step.
109109
hello.swift

test/Interop/Cxx/class/constructors-irgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Target-specific tests for C++ constructor call code generation.
22

33
// RUN: %swift -module-name Swift -target x86_64-apple-macosx10.9 -dump-clang-diagnostics -I %S/Inputs -enable-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=ITANIUM_X64
4-
// RUN: %swift -module-name Swift -target armv7-none-linux-androideabi -dump-clang-diagnostics -I %S/Inputs -enable-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=ITANIUM_ARM
4+
// RUN: %swift -module-name Swift -target armv7-unknown-linux-androideabi -dump-clang-diagnostics -I %S/Inputs -enable-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=ITANIUM_ARM
55
// RUN: %swift -module-name Swift -target x86_64-unknown-windows-msvc -dump-clang-diagnostics -I %S/Inputs -enable-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=MICROSOFT_X64
66

77
import Constructors

test/Parse/ConditionalCompilation/armAndroidTarget.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %swift -typecheck %s -verify -target armv7-none-linux-androideabi -disable-objc-interop -parse-stdlib
2-
// RUN: %swift-ide-test -test-input-complete -source-filename=%s -target armv7-none-linux-androideabi
1+
// RUN: %swift -typecheck %s -verify -target armv7-unknown-linux-androideabi -disable-objc-interop -parse-stdlib
2+
// RUN: %swift-ide-test -test-input-complete -source-filename=%s -target armv7-unknown-linux-androideabi
33

44
#if os(Linux)
55
// This block should not parse.

test/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ elif (run_os in ['linux-gnu', 'linux-gnueabihf', 'freebsd', 'openbsd', 'windows-
12961296
config.target_ld = "ld -L%r" % (make_path(test_resource_dir, config.target_sdk_name))
12971297
elif run_os == 'linux-androideabi' or run_os == 'linux-android':
12981298
# The module triple for Android ARMv7 seems to be canonicalized in LLVM
1299-
# to be armv7-none-linux-android, without the "eabi" bit. Let's remove the
1299+
# to be armv7-unknown-linux-android, without the "eabi" bit. Let's remove the
13001300
# same bit from the substitutions so the tests pass correctly.
13011301
target_specific_module_triple = re.sub(r'androideabi', 'android',
13021302
target_specific_module_triple)

0 commit comments

Comments
 (0)