Skip to content

Respect -driver-use-frontend-path throughout job creation #50

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 4 commits into from
Jan 3, 2020

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Jan 2, 2020

A number of job-creation functions were asking the toolchain for the frontend path, rather than using the frontend path computed by the Driver instance. Fix them, and thread the Driver-computed Swift frontend path everywhere. We might want to change the way things are layered here in the future.

@DougGregor
Copy link
Member Author

@swift-ci please test

Allows overridden Swift compiler frontend paths to work.
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor requested a review from beccadax January 2, 2020 07:01
@DougGregor
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@beccadax beccadax left a comment

Choose a reason for hiding this comment

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

One optional suggestion about the factoring, but otherwise LGTM.

@@ -17,6 +17,7 @@ extension Toolchain {
func computeResourceDirPath(
for triple: Triple,
parsedOptions: inout ParsedOptions,
swiftCompiler: AbsolutePath,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these Toolchain extension methods still be on Toolchain? They used to call getToolPath(.swiftCompiler), but now that they’re taking swiftCompiler as an input, I don’t think they’re using any requirements. But I could be missing something, and even if I’m not, it’s reasonable to wait for a different PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems plausible that different toolchains could have different locations for the resource directory, so I feel like Toolchain needs to be involved here... but I don't have a good sense for how this should be architected. Perhaps all tools should be overridable in some generalized manner and we either register that with the toolchain or pass through some dictionary of overrides?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to tackle the fix-the-architecture question a bit later, because this unblocks more testing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Overridable tools make sense to me, but what you've got here is severable from that!

@DougGregor
Copy link
Member Author

@swift-ci please test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test platform macOS

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test platform macOS

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@DougGregor DougGregor merged commit c356d50 into swiftlang:master Jan 3, 2020
@DougGregor DougGregor deleted the driver-use-frontend-path branch January 3, 2020 00:40
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