-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Set correct build directory for codegen-units #61807
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@@ -484,6 +484,11 @@ pub fn run_tests(config: &Config) { | |||
|
|||
// FIXME(#33435) Avoid spurious failures in codegen-units/partitioning tests. | |||
if let Mode::CodegenUnits = config.mode { | |||
// codegen-units tests use wrong directory, for more info see | |||
// https://github.com/rust-lang/rust/issues/34586#issuecomment-501681886 | |||
if let Ok(build_dir) = env::var("BUILD_DIR") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, if the problem is that we are passing -Zincremental=tmp/foo
, maybe it would be better to have some way to alter the command-line flags to include the correct directory?
I'm imagining:
// compile-flags:-Zincremental=$BUILD_DIR/tmp/...
for example? (We'd have to replace that $BUILD_DIR
of course.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit worried about side-effects from changing the current directory in a narrow range of cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Environment variables doesn't seem to be expanded in compile-flags
and that results in $VARIABLE/tmp/...
directory.
I'm a bit worried about side-effects from changing the current directory in a narrow range of cases.
When I enabled it for everything only 3 rustdoc tests broke(I was building with --no-fail-fast
), I haven't investigated further but they should be fixable.
ping from triage @nikomatsakis @mati865 any updates? |
Fixes #34586