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

Rust bootstrap sysroot now has src in the same place as rust-src #1300

Merged
merged 1 commit into from
Apr 4, 2020

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Apr 4, 2020

So we can remove a special hack. I checked this locally to confirm it works.

Cc rust-lang/rust#70642 @eddyb

};
base_dir.join("src") // Xargo wants the src-subdir
// Check for `$SYSROOT/lib/rustlib/src/rust/src`; test if that contains `libstd/lib.rs`.
let rustup_src = sysroot.join("lib").join("rustlib").join("src").join("rust").join("src");
Copy link
Member

Choose a reason for hiding this comment

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

Hmm I should note something: $sysroot/lib/rustlib/src/rust corresponds to the "root" of rust-lang/rust, that's why it has a further src in it. It's annoying that it repeats but I think it would be to work with if $sysroot/lib/rustlib/src/rust was the directory being referred to and src/libstd/lib.rs a path within that directory.

Sadly it seems like XARGO_RUST_SRC includes the src directory component of rust-lang/rust, so this entire comment is unactionable 😞.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it would be nicer to treat rustlib/src/rust as the root but as you said, that's not what xargo did, and now it's too late to change it (and not worth trying anyway).

@RalfJung
Copy link
Member Author

RalfJung commented Apr 4, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 4, 2020

📌 Commit bd9ec74 has been approved by RalfJung

@bors
Copy link
Collaborator

bors commented Apr 4, 2020

⌛ Testing commit bd9ec74 with merge 26d7e9b...

@bors
Copy link
Collaborator

bors commented Apr 4, 2020

☀️ Test successful - checks-travis, status-appveyor
Approved by: RalfJung
Pushing 26d7e9b to master...

@bors bors merged commit 26d7e9b into rust-lang:master Apr 4, 2020
@RalfJung RalfJung deleted the rust-src branch April 4, 2020 15:08
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