File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -127,8 +127,16 @@ extension GenericUnixToolchain {
127127 isShared: hasRuntimeArgs
128128 )
129129
130- if hasRuntimeArgs && targetTriple. environment != . android &&
131- toolchainStdlibRpath {
130+ // An exception is made for native Android environments like the Termux
131+ // 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 {
132140 // FIXME: We probably shouldn't be adding an rpath here unless we know
133141 // ahead of time the standard library won't be copied.
134142 for path in runtimePaths {
You can’t perform that action at this time.
0 commit comments