Skip to content

[build-script] Set the TOOLCHAINS variable in the environment. #8419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2017

Conversation

bob-wilson
Copy link
Contributor

Set TOOLCHAINS in the environment so that we use the linker from the toolchain specified by the build-script's darwin-xcrun-toolchain option.

On Darwin platforms, the Swift build scripts generally use "xcrun" to
locate various tools, and the build-script's darwin-xcrun-toolchain option
is specified to xcrun. However, with the change to use the just-built clang
to build the runtime (PR swiftlang#6112), there was an issue with the linker. Clang
normally tries to run the linker from the same directory as the clang
binary, but when there isn't one, it falls back on /usr/bin/ld, which is
just an xcrun-like wrapper. Since there is no way to specify an explicit
toolchain option in that case, set TOOLCHAINS in the environment to
make it use the linker from the specified toolchain.
rdar://problem/30709330
@bob-wilson
Copy link
Contributor Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 9964797 into swiftlang:master Mar 30, 2017
@bob-wilson bob-wilson deleted the toolchain-setting branch March 30, 2017 15:30
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