Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

mati865
Copy link
Contributor

@mati865 mati865 commented Jun 13, 2019

Fixes #34586

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(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 13, 2019
@@ -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") {
Copy link
Contributor

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.)

Copy link
Contributor

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.

Copy link
Contributor Author

@mati865 mati865 Jun 14, 2019

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.

@Dylan-DPC-zz
Copy link

ping from triage @nikomatsakis @mati865 any updates?

@mati865 mati865 closed this Jul 1, 2019
@Dylan-DPC-zz Dylan-DPC-zz added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2019
@mati865 mati865 deleted the double-tmp branch November 3, 2022 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustbuild: There are two tmp/ directories
4 participants