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

rustbuild: Pass ccache to build scripts #48059

Merged
merged 1 commit into from
Feb 10, 2018
Merged

Conversation

alexcrichton
Copy link
Member

Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like librustc_llvm can be a bit
speedier.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @Mark-Simulacrum

};
match &ccache[..] {
"ccache" | "sccache" => format!("{} {}", ccache, s.display()),
_ => s.display().to_string(),
Copy link
Member

Choose a reason for hiding this comment

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

Why we need to special-case ccache | sccache here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately cc-rs isn't the most general either :(

Copy link
Member

Choose a reason for hiding this comment

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

So to me it seems like both places are somewhat wrong - and would be nice to fix. I install sccache locally and it would ideally be supported by path too. To be specific, I configure sccache = "/some/path/sccache" which we should probably support here... And eventually in cc too.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll leave a comment saying how to fix this, but I'll probably leave as-is for now.

@BatmanAoD BatmanAoD added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 7, 2018
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

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

r=me if you don't think my suggestion makes sense at this point. We can always improve further later.

};
match &ccache[..] {
"ccache" | "sccache" => format!("{} {}", ccache, s.display()),
_ => s.display().to_string(),
Copy link
Member

Choose a reason for hiding this comment

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

So to me it seems like both places are somewhat wrong - and would be nice to fix. I install sccache locally and it would ideally be supported by path too. To be specific, I configure sccache = "/some/path/sccache" which we should probably support here... And eventually in cc too.

Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like `librustc_llvm` can be a bit
speedier.
@alexcrichton
Copy link
Member Author

@bors: r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Feb 9, 2018

📌 Commit 64a8730 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 Feb 9, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Feb 9, 2018
…lacrum

rustbuild: Pass `ccache` to build scripts

Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like `librustc_llvm` can be a bit
speedier.
bors added a commit that referenced this pull request Feb 9, 2018
Rollup of 12 pull requests

- Successful merges: #47835, #47854, #48015, #48047, #48051, #48058, #48064, #47790, #48059, #48078, #48080, #48085
- Failed merges:
@alexcrichton
Copy link
Member Author

@bors: rollup

kennytm added a commit to kennytm/rust that referenced this pull request Feb 9, 2018
…lacrum

rustbuild: Pass `ccache` to build scripts

Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like `librustc_llvm` can be a bit
speedier.
bors added a commit that referenced this pull request Feb 9, 2018
Rollup of 17 pull requests

- Successful merges: #47790, #47835, #47854, #48015, #48047, #48051, #48058, #48059, #48064, #48078, #48080, #48085, #48086, #48090, #48093, #48098, #48101
- Failed merges:
kennytm added a commit to kennytm/rust that referenced this pull request Feb 10, 2018
…lacrum

rustbuild: Pass `ccache` to build scripts

Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like `librustc_llvm` can be a bit
speedier.
bors added a commit that referenced this pull request Feb 10, 2018
Rollup of 16 pull requests

- Successful merges: #47790, #47835, #47854, #48015, #48047, #48051, #48058, #48059, #48064, #48078, #48080, #48086, #48098, #48101, #48107, #48100
- Failed merges:
bors added a commit that referenced this pull request Feb 10, 2018
@bors bors merged commit 64a8730 into rust-lang:master Feb 10, 2018
bors added a commit that referenced this pull request Feb 14, 2018
Try to fix 48116 and 48192

The bug #48116 happens because of a misoptimization of the `import_path_to_string` function, where a `names` slice is empty but the `!names.is_empty()` branch is executed.

https://github.com/rust-lang/rust/blob/4d2d3fc5dadf894a8ad709a5860a549f2c0b1032/src/librustc_resolve/resolve_imports.rs#L1015-L1042

Yesterday, @eddyb had locally reproduced the bug, and [came across the `position` function](https://mozilla.logbot.info/rust-infra/20180214#c14296834) where the `assume()` call is found to be suspicious. We have *not* concluded that this `assume()` causes #48116, but given [the reputation of `assume()`](#45501 (comment)), this seems higher relevant. Here we try to see if commenting it out can fix the errors.

Later @alexcrichton has bisected and found a potential bug [in the LLVM side](#48116 (comment)). We are currently testing if reverting that LLVM commit is enough to stop the bug. If true, this PR can be reverted (keep the `assume()`) and we could backport the LLVM patch instead.

(This PR also includes an earlier commit from #48127 for help debugging ICE happening in compile-fail/parse-fail tests.)

The PR also reverts #48059, which seems to cause #48192.

r? @alexcrichton
cc @eddyb, @arthurprs (#47333)
@alexcrichton alexcrichton deleted the sccachebs branch February 26, 2018 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants