Skip to content
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

Remove incorrect SYSROOT usage #3594

Closed
wants to merge 1 commit into from
Closed

Remove incorrect SYSROOT usage #3594

wants to merge 1 commit into from

Conversation

o01eg
Copy link
Contributor

@o01eg o01eg commented Dec 29, 2018

Fixes #2874
Temporary solution until rust-lang/rust#57117 would be fixed.
Make sys_root optional to use internal rustc_driver sysroot.

Temporary solution until rust-lang/rust#57117
would be fixed.
Make sys_root optional to use internal rustc_driver sysroot.
@o01eg
Copy link
Contributor Author

o01eg commented Dec 29, 2018

If rust-lang/rust#57196 will be fixed it should be possible to remove rustc call.

@phansch phansch added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 30, 2018
@phansch
Copy link
Member

phansch commented Dec 30, 2018

@o01eg So I'm attempting to review this. The code changes look fine to me, but I have some general questions as I've never dealt with custom sysroots so far.

  1. I assume the custom sysroot is needed if you want to do embedded development or cross compile to different targets? It's the root directory for locating headers and library files, right?

  2. Unfortunately I can't find a place with documentation about rusts sysroot usage. Is there one?

  3. Do you think it's possible to add regression tests for this particular usage of Clippy?

Thanks for digging into this!

@o01eg
Copy link
Contributor Author

o01eg commented Dec 30, 2018

  1. I assume the custom sysroot is needed if you want to do embedded development or cross compile to different targets? It's the root directory for locating headers and library files, right?

As I understand sysroot is a install.prefix where all binaries, libraries, and docs are placed. Rustc searches internal libraries in /$sysroot/$libdir.

  1. Unfortunately I can't find a place with documentation about rusts sysroot usage. Is there one?

No, the best I found are commentaries in rustc sources or ask @alexcrichton. Maybe read related PRs and issues.

  1. Do you think it's possible to add regression tests for this particular usage of Clippy?

No. There should be system-wide installed rustc with custom libdir. When I asked about to add tests for this case in rustc I was said they don't have enough CI resources.

@bors
Copy link
Contributor

bors commented Feb 6, 2019

☔ The latest upstream changes (presumably #3665) made this pull request unmergeable. Please resolve the merge conflicts.

@oli-obk
Copy link
Contributor

oli-obk commented Feb 10, 2019

There have been some refactorings around our sysroot detection, especially when the user tries to overwrite them. Can you check if the current system does what you need?

@o01eg
Copy link
Contributor Author

o01eg commented Feb 10, 2019

Currently I'm waiting for clippy to be fixed in rust's source tree.

@flip1995
Copy link
Member

ping from triage @o01eg. Clippy is fixed in the current nightly.

@o01eg
Copy link
Contributor Author

o01eg commented Feb 24, 2019

Now they broke rustdoc again.

@o01eg
Copy link
Contributor Author

o01eg commented Mar 5, 2019

I have it fixed with patch on rust from rust-lang/rust#57101
Patch for clippy didn't required.

@o01eg o01eg closed this Mar 5, 2019
@phansch
Copy link
Member

phansch commented Mar 5, 2019

@o01eg hasn't that PR been reverted as part of rust-lang/rust#57303?

@o01eg
Copy link
Contributor Author

o01eg commented Mar 5, 2019

I patch it in Gentoo build script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clippy cannot find 'std' with non-standard libdir
5 participants