Skip to content

[Toolchains] - look for tools relative to the executable path. #25

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 2 commits into from
Dec 16, 2019

Conversation

JhonnyBillM
Copy link
Contributor

Once swift-driver is installed in the Toolchain, we can look for tools right next to it's executable path, this help us to be more platform agnostic while locating the toolchain.

This is the first step in this direction, we will need to make this more robust to get rid of xcrun if possible, and get a proper linux implementation.


The other options are:

  1. Shim LLVM's getMainExecutable method using swift-lldb, and expose the API from lldbSwift to tools-support-core, so other projects such as SwiftPM would benefit from this.

  2. Try to implement something like LLVM's getMainExecutable method in tools-support-core. But I don't think this is 100 % feasible right now; this should be implemented in some low-level library such as LLVM, swift-lldb or Foundation, to maintain projects as SwiftPM and swift-driver platform agnostic as possible.

@JhonnyBillM JhonnyBillM changed the title ADD - look for tools relative to the executable path. [Toolchains] - look for tools relative to the executable path. Oct 23, 2019
Copy link
Contributor

@harlanhaskins harlanhaskins left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this!

@harlanhaskins
Copy link
Contributor

Just wanna make sure this does the right thing falling back

@swift-ci please test

@harlanhaskins
Copy link
Contributor

@swift-ci please test

1 similar comment
@harlanhaskins
Copy link
Contributor

@swift-ci please test

…pecific behavior.

FIX - some typos and parameter names.
Merge branch 'master' into where-are-the-tools
@DougGregor
Copy link
Member

Conflicts everywhere! It'll be good to get this up-to-date and merged now that #25 is in. Thank you!

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor
Copy link
Member

@swift-ci please test

@JhonnyBillM
Copy link
Contributor Author

segmentation fault on Linux without further details 🤔.

I saw some tests failing on Linux in the main swift project too. I think this can be a CI configuration issue.

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor DougGregor dismissed harlanhaskins’s stale review December 16, 2019 16:28

All issues have been resolved

@DougGregor DougGregor merged commit cd2eb1b into swiftlang:master Dec 16, 2019
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