Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Only pass -Zincremental to nightly rustc. #4000

Merged
merged 1 commit into from
May 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/cargo/ops/cargo_rustc/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
Err(_) => false,
};

// -Z can only be used on nightly builds; other builds complain loudly.
// Since incremental builds only work on nightly anyway, we silently
// ignore CARGO_INCREMENTAL on anything but nightly. This allows users
// to always have CARGO_INCREMENTAL set without getting unexpected
// errors on stable/beta builds.
let incremental_enabled = incremental_enabled
&& config.rustc()?.verbose_version.contains("nightly");

Ok(Context {
ws: ws,
host: host_layout,
Expand Down