Skip to content

Allow a custom env for more xcrun invocations #1770

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
Sep 7, 2018

Conversation

neonichu
Copy link
Contributor

Basically a continuation of #1766

@neonichu neonichu requested a review from aciidgh August 29, 2018 20:23
@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

@aciidgh
Copy link
Contributor

aciidgh commented Aug 29, 2018

We shouldn't put the env in UserToolchain instead of getClangCompiler()

@neonichu
Copy link
Contributor Author

I was 🤔 about that, but decided that there might be a need to have a different environment for manifest parsing vs. building. I guess if someone really needs that customisability, they can create a custom Toolchain type though. I'll update the PR 🔨.

@aciidgh aciidgh added the WIP Work in progress label Aug 31, 2018
@neonichu neonichu force-pushed the allow-environment-override-2 branch from 35827d2 to 485e35e Compare September 5, 2018 17:47
@neonichu
Copy link
Contributor Author

neonichu commented Sep 5, 2018

@swift-ci please smoke test

@neonichu neonichu added pending evolution proposal and removed WIP Work in progress labels Sep 5, 2018
@@ -129,6 +129,8 @@ public final class UserToolchain: Toolchain {
return lookupExecutablePath(filename: getenv(variable), searchPaths: searchPaths)
}

private let environment: [String:String]
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: needs doc comment and space between : and String.

Copy link
Contributor

Choose a reason for hiding this comment

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

should we call it processEnv maybe?

@@ -159,6 +161,7 @@ public final class UserToolchain: Toolchain {

public init(destination: Destination, environment: [String:String] = Process.env) throws {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: /s/[String:String/[String: String]/

@neonichu neonichu force-pushed the allow-environment-override-2 branch 2 times, most recently from aa22715 to 0897e28 Compare September 5, 2018 21:10
@neonichu
Copy link
Contributor Author

neonichu commented Sep 5, 2018

@swift-ci please smoke test

@neonichu neonichu force-pushed the allow-environment-override-2 branch from 0897e28 to aef1c45 Compare September 6, 2018 17:21
@neonichu
Copy link
Contributor Author

neonichu commented Sep 6, 2018

@swift-ci please smoke test

@neonichu
Copy link
Contributor Author

neonichu commented Sep 6, 2018

This should be good to merge now.

@aciidgh aciidgh merged commit ba9d373 into swiftlang:master Sep 7, 2018
@neonichu neonichu deleted the allow-environment-override-2 branch September 7, 2018 18:02
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