Skip to content

Commit

Permalink
For scripts, use DYLD_FRAMEWORK/LIBRARY_PATH to find frameworks / run…
Browse files Browse the repository at this point in the history
…times.

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.
  • Loading branch information
lhames committed Jan 25, 2024
1 parent 2738900 commit 8d69bf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/SwiftDriver/Jobs/Toolchain+InterpreterSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ extension DarwinToolchain {

addPathEnvironmentVariableIfNeeded("DYLD_FRAMEWORK_PATH", to: &envVars,
currentEnv: env, option: .F,
parsedOptions: &parsedOptions)
parsedOptions: &parsedOptions,
extraPaths: ["/System/Library/Frameworks"])

return envVars
}
Expand Down

0 comments on commit 8d69bf6

Please sign in to comment.