Skip to content

Commit 80b467f

Browse files
authored
Merge pull request #1372 from finagolfin/droid
Android: look in lib/linux/ for the LLVM sanitizers instead
2 parents c8e3c84 + eb14fa5 commit 80b467f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift

+7-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ extension Toolchain {
2626
for targetInfo: FrontendTargetInfo,
2727
parsedOptions: inout ParsedOptions
2828
) throws -> VirtualPath {
29+
var platform = targetInfo.target.triple.platformName(conflatingDarwin: true)!
30+
// compiler-rt moved these Android sanitizers into `lib/linux/` a couple
31+
// years ago, llvm/llvm-project@a68ccba, so look for them there instead.
32+
if platform == "android" {
33+
platform = "linux"
34+
}
2935
return VirtualPath.lookup(targetInfo.runtimeResourcePath.path)
30-
.appending(components: "clang", "lib",
31-
targetInfo.target.triple.platformName(conflatingDarwin: true)!)
36+
.appending(components: "clang", "lib", platform)
3237
}
3338

3439
func runtimeLibraryPaths(

0 commit comments

Comments
 (0)