Skip to content

Commit 8d69bf6

Browse files
committed
For scripts, use DYLD_FRAMEWORK/LIBRARY_PATH to find frameworks / runtimes.
Add DYLD_FRAMEWORK_PATH=/System/Library/Frameworks to the environment when constructing swift-frontend invocations for the interpreter so that dlopen can find autolinked frameworks. Resolves #68785.
1 parent 2738900 commit 8d69bf6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftDriver/Jobs/Toolchain+InterpreterSupport.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ extension DarwinToolchain {
4343

4444
addPathEnvironmentVariableIfNeeded("DYLD_FRAMEWORK_PATH", to: &envVars,
4545
currentEnv: env, option: .F,
46-
parsedOptions: &parsedOptions)
46+
parsedOptions: &parsedOptions,
47+
extraPaths: ["/System/Library/Frameworks"])
4748

4849
return envVars
4950
}

0 commit comments

Comments
 (0)