Skip to content

Commit b309476

Browse files
committed
[android][test] Fix new C++ interop test on Android armv7 and new IRGen test, and disable CxxToSwiftToCxx bridging test that now fails on Android
Also, make the analogous change to swiftlang/swift-driver#1372, which gets the sanitizer tests working on Android again.
1 parent 47b73eb commit b309476

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

lib/Driver/ToolChains.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,9 +1459,11 @@ void ToolChain::getClangLibraryPath(const ArgList &Args,
14591459
getResourceDirPath(LibPath, Args, /*Shared=*/true);
14601460
// Remove platform name.
14611461
llvm::sys::path::remove_filename(LibPath);
1462-
llvm::sys::path::append(LibPath, "clang", "lib",
1463-
T.isOSDarwin() ? "darwin"
1464-
: getPlatformNameForTriple(T));
1462+
auto platformName =
1463+
T.isOSDarwin() ? "darwin" : getPlatformNameForTriple(Triple);
1464+
if (platformName == "android")
1465+
platformName = "linux";
1466+
llvm::sys::path::append(LibPath, "clang", "lib", platformName);
14651467
}
14661468

14671469
/// Get the runtime library link path, which is platform-specific and found

test/IRGen/section.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
// ASM-NOT: .section
3939
// ASM: $s7section3fooyyF:
4040
// ASM-linux-gnu: .section{{.*}}__TEXT,__mysection
41+
// ASM-linux-android: .section{{.*}}__TEXT,__mysection
42+
// ASM-linux-androideabi: .section{{.*}}__TEXT,__mysection
4143
// ASM-NOT: .section
4244
// ASM: $s7section2g0Sivp:
4345
// ASM-NOT: .section

test/Interop/CxxToSwiftToCxx/bridge-cxx-struct-back-to-cxx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
// RUN: %target-interop-build-clangxx -fsyntax-only -x c++-header %t/full-cxx-swift-cxx-bridging.h -std=gnu++20 -c -fmodules -fcxx-modules -I %t
2222

23+
// XFAIL: OS=linux-android, OS=linux-androideabi
24+
2325
//--- header.h
2426

2527
struct Trivial {

0 commit comments

Comments
 (0)