We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22645f3 commit 1e7ed77Copy full SHA for 1e7ed77
Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift
@@ -127,8 +127,16 @@ extension GenericUnixToolchain {
127
isShared: hasRuntimeArgs
128
)
129
130
- if hasRuntimeArgs && targetTriple.environment != .android &&
131
- toolchainStdlibRpath {
+ // An exception is made for native Android environments like the Termux
+ // app as they build and run natively like a Unix environment on Android,
132
+ // so add the stdlib RPATH by default there.
133
+ #if os(Android)
134
+ let addRpath = true
135
+ #else
136
+ let addRpath = targetTriple.environment != .android
137
+ #endif
138
+
139
+ if hasRuntimeArgs && addRpath && toolchainStdlibRpath {
140
// FIXME: We probably shouldn't be adding an rpath here unless we know
141
// ahead of time the standard library won't be copied.
142
for path in runtimePaths {
0 commit comments