Skip to content

Conversation

etcwilde
Copy link
Member

Cherry-picking: #1605

'+' isn't allowed in environment variable names so it's impossible to set the Clang++ executable at the moment. Replace + with X so that we can set SWIFT_DRIVER_CLANGXX_EXEC to set the clang++ executable.

Fixes: rdar://128007218

Explanation: Replaces + with X in the toolchain while doing tool lookup from an environment variable because + is not allowed in valid environment variable names. This prevents us from telling the driver where to look for the clang++ binary.

Risk: Low. Only affects projects that set the SWIFT_DRIVER_CLANGXX_EXEC environment variable. Since that doesn't do anything today, that would be a silly thing to do. Otherwise, projects cannot currently set SWIFT_DRIVER_CLANG++_EXEC because that's an invalid environment variable name.

Testing: Added test to verify that the substitution is made correctly.

Fixes: rdar://128007218

etcwilde added 2 commits June 21, 2024 08:26
Check that the clang override environment variables actually do
something. Note that clang++ is only used to link on non-Darwin
platforms when the interop mode is swift-5.9.
'+' isn't allowed in environment variable names so it's impossible to
set the Clang++ executable at the moment. Replace `+` with `X` so that
we can set `SWIFT_DRIVER_CLANGXX_EXEC` to set the clang++ executable.
@etcwilde etcwilde requested review from artemcm and tshortli June 21, 2024 16:20
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde merged commit ac0b93f into swiftlang:release/6.0 Nov 4, 2024
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.

2 participants