Skip to content

Commit

Permalink
Merge pull request #1372 from finagolfin/droid
Browse files Browse the repository at this point in the history
Android: look in lib/linux/ for the LLVM sanitizers instead
  • Loading branch information
artemcm committed Jun 14, 2023
2 parents c8e3c84 + eb14fa5 commit 80b467f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ extension Toolchain {
for targetInfo: FrontendTargetInfo,
parsedOptions: inout ParsedOptions
) throws -> VirtualPath {
var platform = targetInfo.target.triple.platformName(conflatingDarwin: true)!
// compiler-rt moved these Android sanitizers into `lib/linux/` a couple
// years ago, llvm/llvm-project@a68ccba, so look for them there instead.
if platform == "android" {
platform = "linux"
}
return VirtualPath.lookup(targetInfo.runtimeResourcePath.path)
.appending(components: "clang", "lib",
targetInfo.target.triple.platformName(conflatingDarwin: true)!)
.appending(components: "clang", "lib", platform)
}

func runtimeLibraryPaths(
Expand Down

0 comments on commit 80b467f

Please sign in to comment.