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

Update version of cc crate #122498

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

jfgoog
Copy link
Contributor

@jfgoog jfgoog commented Mar 14, 2024

Reason:

In order to build the Windows version of the Rust toolchain for the Android platform, the following patch to the cc is crate is required to avoid incorrectly determining that we are building with the Android NDK: rust-lang/cc-rs@57853c4

This patch is present in version 1.0.80 and newer versions of the cc crate. The rustc source distribution currently has 3 different versions of cc in the vendor directory, only one of which has the necessary fix.

We (the Android Rust toolchain) are currently maintaining local patches to upgrade the cc crate dependency versions, which we would like to upstream.

Reason:

In order to build the Windows version of the Rust toolchain for the Android platform, the following patch to the cc is crate is required to avoid incorrectly determining that we are building with the Android NDK: rust-lang/cc-rs@57853c4

This patch is present in version 1.0.80 and newer versions of the cc crate. The rustc source distribution currently has 3 different versions of cc in the vendor directory, only one of which has the necessary fix.

We (the Android Rust toolchain) are currently maintaining local patches to upgrade the cc crate dependency versions, which we would like to upstream.
@rustbot
Copy link
Collaborator

rustbot commented Mar 14, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 14, 2024
@workingjubilee
Copy link
Member

@jfgoog I have no objection about merging this, however: this version is patch-compatible. The Cargo.lock has already been updated. The Cargo.lock is our source of truth for version to use. We do not actually care that much about the Cargo.toml versions, so they are often out of date. My understanding is that you use a build system that is very... different. Does it ignore Cargo.lock?

@workingjubilee
Copy link
Member

[[package]]
name = "cargotest2"
version = "0.1.0"

[[package]]
name = "cc"
version = "1.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"

[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-core",
]

From our perspective, this is the only version of cc.

@workingjubilee
Copy link
Member

Hmm, I didn't notice there's another .lock in bootstrap, interesting.

@jfgoog
Copy link
Contributor Author

jfgoog commented Mar 14, 2024

@jfgoog I have no objection about merging this, however: this version is patch-compatible. The Cargo.lock has already been updated. The Cargo.lock is our source of truth for version to use. We do not actually care that much about the Cargo.toml versions, so they are often out of date. My understanding is that you use a build system that is very... different. Does it ignore Cargo.lock?

Actually, for building rustc, we use x.py. The build system for the rest of Android is very different, but we build the toolchain itself in a fairly normal way.

I am not exactly sure how the versions in vendor/ are chosen, because there are multiple workspaces in the Rust source distribution. It seemed safest to me to make sure that the versions in the various Cargo.toml are new enough.

You are correct that there's also a version in bootstrap. As an extra complication, that version is pinned and may be trickier to upgrade.

There's also a dependency in the bootstrap crate.

Here are all 3 PRs I've sent:

#122498
rust-lang/backtrace-rs#592
#122504

@workingjubilee
Copy link
Member

Actually, for building rustc, we use x.py. The build system for the rest of Android that is very different, but we build the toolchain itself in a fairly normal way.

Oh good!

The backtrace-rs cc version doesn't matter much because we do something incredibly accursed when building std: it's not included like a normal crate, but instead #[path] included as a module.

I agree that it's wisest to just go ahead and bump things forward for everything, the last 10 versions of cc did a bit of wrestling before fixing a lot of different things for a lot of different targets.

@workingjubilee
Copy link
Member

This is harmless and doesn't affect anything really, as noted above, but might as well.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 14, 2024

📌 Commit 2190431 has been approved by workingjubilee

It is now in the queue for this repository.

@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 Mar 14, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 14, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#117118 ([AIX] Remove AixLinker's debuginfo() implementation)
 - rust-lang#121650 (change std::process to drop supplementary groups based on CAP_SETGID)
 - rust-lang#121764 (Make incremental sessions identity no longer depend on the crate names provided by source code)
 - rust-lang#122212 (Copy byval argument to alloca if alignment is insufficient)
 - rust-lang#122322 (coverage: Initial support for branch coverage instrumentation)
 - rust-lang#122373 (Fix the conflict problem between the diagnostics fixes of lint `unnecessary_qualification`  and  `unused_imports`)
 - rust-lang#122479 (Implement `Duration::as_millis_{f64,f32}`)
 - rust-lang#122487 (Rename `StmtKind::Local` variant into `StmtKind::Let`)
 - rust-lang#122498 (Update version of cc crate)
 - rust-lang#122503 (Make `SubdiagMessageOp` well-formed)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 15, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#117118 ([AIX] Remove AixLinker's debuginfo() implementation)
 - rust-lang#121650 (change std::process to drop supplementary groups based on CAP_SETGID)
 - rust-lang#121764 (Make incremental sessions identity no longer depend on the crate names provided by source code)
 - rust-lang#122212 (Copy byval argument to alloca if alignment is insufficient)
 - rust-lang#122322 (coverage: Initial support for branch coverage instrumentation)
 - rust-lang#122373 (Fix the conflict problem between the diagnostics fixes of lint `unnecessary_qualification`  and  `unused_imports`)
 - rust-lang#122479 (Implement `Duration::as_millis_{f64,f32}`)
 - rust-lang#122487 (Rename `StmtKind::Local` variant into `StmtKind::Let`)
 - rust-lang#122498 (Update version of cc crate)
 - rust-lang#122503 (Make `SubdiagMessageOp` well-formed)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6366c64 into rust-lang:master Mar 15, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 15, 2024
Rollup merge of rust-lang#122498 - jfgoog:update-cc-crate-version, r=workingjubilee

Update version of cc crate

Reason:

In order to build the Windows version of the Rust toolchain for the Android platform, the following patch to the cc is crate is required to avoid incorrectly determining that we are building with the Android NDK: rust-lang/cc-rs@57853c4

This patch is present in version 1.0.80 and newer versions of the cc crate. The rustc source distribution currently has 3 different versions of cc in the vendor directory, only one of which has the necessary fix.

We (the Android Rust toolchain) are currently maintaining local patches to upgrade the cc crate dependency versions, which we would like to upstream.
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.

5 participants