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

fix testing Miri with --stage 0 #85959

Merged
merged 1 commit into from
Jun 4, 2021
Merged

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jun 3, 2021

Fixes #78778 for Miri.

The issue remains open for error_index_generator, which has its own dylib logic:

rust/src/bootstrap/tool.rs

Lines 396 to 400 in 903e369

add_dylib_path(
vec![
PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host)),
PathBuf::from(builder.rustc_libdir(compiler)),
],

@jyn514 I could just copy the logic from add_rustc_lib_path, but that does not seem great. Any other suggestions?

Also I wonder if maybe prepare_tool_cargo should already call add_rustc_lib_path.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 3, 2021
@RalfJung
Copy link
Member Author

RalfJung commented Jun 3, 2021

@bors rollup=iffy
because bootstrap

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

@jyn514 I could just copy the logic from add_rustc_lib_path, but that does not seem great. Any other suggestions?

I don't have time to look into it now, but there's a whole mess of things I tried to do to fix it in #84776

@@ -45,6 +45,7 @@ pub fn libdir(target: TargetSelection) -> &'static str {
}

/// Adds a list of lookup paths to `cmd`'s dynamic library lookup path.
/// If The dylib_path_par is already set for this cmd, the old value will be overwritten!
Copy link
Member

Choose a reason for hiding this comment

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

Can we fix it to not do this? Overwriting the old value seems very confusing.

Copy link
Member Author

@RalfJung RalfJung Jun 3, 2021

Choose a reason for hiding this comment

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

(a) this is pre-existing, I'd rather not touch this since I have no idea what changing this will break,
(b) fixing it requires an unstable feature (#44434), which AFAIK bootstrap tries to avoid.

@RalfJung
Copy link
Member Author

RalfJung commented Jun 3, 2021

I don't have time to look into it now, but there's a whole mess of things I tried to do to fix it in #84776

Okay, so it seems reasonable then to ignore error_index_generator for this PR, I would say.

The main question that remains is if prepare_tool_cargo should call add_rustc_lib_path, or if we better leave that control to the individual tools.

@Mark-Simulacrum
Copy link
Member

IMO this is probably fine -- it should be ok to have more libraries in the search path, generally speaking, especially for tools which aren't generally linked dynamically (other than to rustc/llvm, and then we just need these libraries in the search path).

So I think this PR is good if it works -- r=me if we've tested that.

@RalfJung
Copy link
Member Author

RalfJung commented Jun 3, 2021

IMO this is probably fine -- it should be ok to have more libraries in the search path, generally speaking, especially for tools which aren't generally linked dynamically (other than to rustc/llvm, and then we just need these libraries in the search path).

I can't tell if "this" is what the PR does, or the proposal of calling add_rustc_lib_path already in prepare_tool_cargo.

So I think this PR is good if it works -- r=me if we've tested that.

What kind of tests are you thinking of? I did verify that ./x.py test src/tools/miri --stage 0 passes with this PR as-is.

@Mark-Simulacrum
Copy link
Member

Oh, I see -- yeah, this PR as is, or the more invasive patch both seem OK.

That verification seems sufficient for now. I'm not entirely sure this is correct but it does seem like the appropriate start.

@bors r+

@bors
Copy link
Contributor

bors commented Jun 3, 2021

📌 Commit 9e674af has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2021
@bors
Copy link
Contributor

bors commented Jun 4, 2021

⌛ Testing commit 9e674af with merge c4c2ab5...

@bors
Copy link
Contributor

bors commented Jun 4, 2021

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing c4c2ab5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 4, 2021
@bors bors merged commit c4c2ab5 into rust-lang:master Jun 4, 2021
@rustbot rustbot added this to the 1.54.0 milestone Jun 4, 2021
@RalfJung RalfJung deleted the miri-stage-0 branch June 9, 2021 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
6 participants