Skip to content

[build-script] Respect TOOLCHAINS environment variable #14202

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 3 commits into from
Jan 30, 2018

Conversation

Rostepher
Copy link
Contributor

@Rostepher Rostepher commented Jan 26, 2018

Purpose

This PR modifies build-script to respect the environment variable TOOLCHAINS. If the --darwin-xcrun-toolchain flag is used then the environment variable will be ignored in favor of the explicit command line option.

I've also fixed the hardcoded toolchain in test/lit.cfg, which explicitly overwrites the TOOLCHAINS environment variable with default rather than passing the config.darwin_xcrun_toolchain or examining the system environment.

rdar://24795244
rdar://23397534

@Rostepher
Copy link
Contributor Author

@swift-ci please test

@Rostepher Rostepher requested review from shahmishal and zisko January 27, 2018 02:46
@Rostepher Rostepher self-assigned this Jan 27, 2018
@Rostepher Rostepher added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. enhancement labels Jan 27, 2018
Copy link
Member

@shahmishal shahmishal left a comment

Choose a reason for hiding this comment

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

LGTM!

@Rostepher Rostepher force-pushed the respect-thy-toolchain branch from e3bb111 to dadb2bc Compare January 29, 2018 19:58
…hen deciding the xcrun toolchain for Darwin platforms, rather than hardcoding the default.
@Rostepher
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e3bb11196c5ac3ee4a89508b3c4a841727c79086

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e3bb11196c5ac3ee4a89508b3c4a841727c79086

@Rostepher
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 1031abe

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 1031abe

@shahmishal shahmishal closed this Jan 30, 2018
@shahmishal
Copy link
Member

@swift-ci build toolchain

@shahmishal shahmishal reopened this Jan 30, 2018
@shahmishal
Copy link
Member

@Rostepher Sorry! I hit the wrong button.

@shahmishal
Copy link
Member

@swift-ci build toolchain

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - a94f434

Install command
tar zxf swift-PR-14202-5-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - a94f434

Install command
tar -zxf swift-PR-14202-10-osx.tar.gz --directory ~/

@Rostepher Rostepher merged commit a436044 into swiftlang:master Jan 30, 2018
@Rostepher Rostepher deleted the respect-thy-toolchain branch January 30, 2018 21:21
Rostepher added a commit to Rostepher/swift that referenced this pull request Jan 30, 2018
* Respect the TOOLCHAINS environment variable if set when deciding the darwin xcrun toolchain.

* Updated test/lit.cfg to respect the TOOLCHAINS environment variable when deciding the xcrun toolchain for Darwin platforms, rather than hardcoding the default.

* Fixed the default darwin xcrun toolchain logic.

(cherry picked from commit a436044)
Rostepher added a commit that referenced this pull request Jan 31, 2018
* Respect the TOOLCHAINS environment variable if set when deciding the darwin xcrun toolchain.

* Updated test/lit.cfg to respect the TOOLCHAINS environment variable when deciding the xcrun toolchain for Darwin platforms, rather than hardcoding the default.

* Fixed the default darwin xcrun toolchain logic.

(cherry picked from commit a436044)
@AnthonyLatsis AnthonyLatsis added the build-script Area → utils: The build script label Nov 13, 2022
@AnthonyLatsis AnthonyLatsis added bug fix improvement and removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. enhancement labels Nov 13, 2022
@AnthonyLatsis AnthonyLatsis added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. and removed bug fix labels Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants