Skip to content

Conversation

owenv
Copy link
Collaborator

@owenv owenv commented Sep 9, 2025

For example, on macOS dsymutil in a Swift.org toolchain may need to find lipo in the Xcode toolchain

@owenv
Copy link
Collaborator Author

owenv commented Sep 9, 2025

@swift-ci test

public override func environmentFromSpec(_ cbc: CommandBuildContext, _ delegate: any DiagnosticProducingDelegate, lookup: ((MacroDeclaration) -> MacroExpression?)? = nil) -> [(String, String)] {
var env: [(String, String)] = super.environmentFromSpec(cbc, delegate, lookup: lookup)
// dsymutil may need to lookup lipo, which is not necessarily in the same toolchain.
env.append(("PATH", cbc.producer.executableSearchPaths.environmentRepresentation))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this particular PR is about lipo but note that PATH is usually spelled Path on Windows -- this might be a good opportunity to switch out String for EnvironmentKey in a few more places, though I can understand if that's too far outside the scope of what you're aiming to fix right now.

@owenv owenv merged commit f5e366e into swiftlang:main Sep 9, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants