Skip to content

Conversation

@madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Oct 24, 2025

Fixes #147776. I feel like there's a cleaner way to write this, but that probably requires further refactoring.

The build can be tested with ./x build --target arm64_32-apple-watchos (or with any other 32-bit Apple target).

Tested it works at runtime on an Intel Macbook Pro with macOS 10.12.6, in x86 emulation mode with something similar to ./x test library/std --target x86_64-apple-darwin,i686-apple-darwin, as well as with a custom test with a timeout of Duration::from_secs((u32::MAX as u64) + 1) (which the naive fix would have treated as a duration of 1 second).

r? libs
CC @joboet

@madsmtm madsmtm added O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state O-x32 32 bit ABI for x86-64 O-apple Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS) labels Oct 24, 2025
@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 24, 2025
Copy link
Member

@joboet joboet left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!
r=me after your tests
r? joboet

View changes since this review

@rustbot rustbot assigned joboet and unassigned Mark-Simulacrum Oct 24, 2025
@joboet
Copy link
Member

joboet commented Oct 24, 2025

@bors delegate+

@bors
Copy link
Collaborator

bors commented Oct 24, 2025

✌️ @madsmtm, you can now approve this pull request!

If @joboet told you to "r=me" after making some further change, please make that change, then do @bors r=@joboet

@madsmtm
Copy link
Contributor Author

madsmtm commented Oct 24, 2025

Tested and updated the PR description.

@bors r=joboet rollup

@bors
Copy link
Collaborator

bors commented Oct 24, 2025

📌 Commit 66b992d has been approved by joboet

It is now in the queue for this repository.

@madsmtm madsmtm marked this pull request as ready for review October 24, 2025 22:07
@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 24, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Oct 25, 2025
…=joboet

Fix compiling `CondVar::wait_timeout` on 32-bit Apple platforms

Fixes rust-lang#147776. I feel like there's a cleaner way to write this, but that probably requires further refactoring.

The build can be tested with `./x build --target arm64_32-apple-watchos` (or with any other 32-bit Apple target).

Tested it works at runtime on an Intel Macbook Pro with macOS 10.12.6, in x86 emulation mode with something similar to `./x test library/std --target x86_64-apple-darwin,i686-apple-darwin`, as well as with a custom test with a timeout of `Duration::from_secs((u32::MAX as u64) + 1)` (which the naive fix would have treated as a duration of 1 second).

r? libs
CC `@joboet`
bors added a commit that referenced this pull request Oct 25, 2025
Rollup of 6 pull requests

Successful merges:

 - #147406 (Remove needs-asm-support directive in tests with explicit targets)
 - #147790 (constify comparison traits on slices)
 - #148056 (refactor(rustdoc): Remove redundant langstr checks)
 - #148065 (compiletest: Add concrete examples for some config/test path fields)
 - #148072 (Fix compiling `CondVar::wait_timeout` on 32-bit Apple platforms)
 - #148073 (test(frontmatter): Rename tests to make coverage more obvious)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Oct 25, 2025
Rollup of 5 pull requests

Successful merges:

 - #147406 (Remove needs-asm-support directive in tests with explicit targets)
 - #148056 (refactor(rustdoc): Remove redundant langstr checks)
 - #148065 (compiletest: Add concrete examples for some config/test path fields)
 - #148072 (Fix compiling `CondVar::wait_timeout` on 32-bit Apple platforms)
 - #148073 (test(frontmatter): Rename tests to make coverage more obvious)

r? `@ghost`
`@rustbot` modify labels: rollup
@jieyouxu jieyouxu removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2025
@bors bors merged commit 0462a38 into rust-lang:master Oct 25, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 25, 2025
rust-timer added a commit that referenced this pull request Oct 25, 2025
Rollup merge of #148072 - madsmtm:fix-apple-condvar-32bit, r=joboet

Fix compiling `CondVar::wait_timeout` on 32-bit Apple platforms

Fixes #147776. I feel like there's a cleaner way to write this, but that probably requires further refactoring.

The build can be tested with `./x build --target arm64_32-apple-watchos` (or with any other 32-bit Apple target).

Tested it works at runtime on an Intel Macbook Pro with macOS 10.12.6, in x86 emulation mode with something similar to `./x test library/std --target x86_64-apple-darwin,i686-apple-darwin`, as well as with a custom test with a timeout of `Duration::from_secs((u32::MAX as u64) + 1)` (which the naive fix would have treated as a duration of 1 second).

r? libs
CC ``@joboet``
@madsmtm madsmtm deleted the fix-apple-condvar-32bit branch October 25, 2025 20:42
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Oct 27, 2025
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#147406 (Remove needs-asm-support directive in tests with explicit targets)
 - rust-lang/rust#148056 (refactor(rustdoc): Remove redundant langstr checks)
 - rust-lang/rust#148065 (compiletest: Add concrete examples for some config/test path fields)
 - rust-lang/rust#148072 (Fix compiling `CondVar::wait_timeout` on 32-bit Apple platforms)
 - rust-lang/rust#148073 (test(frontmatter): Rename tests to make coverage more obvious)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-apple Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS) O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state O-unix Operating system: Unix-like O-x32 32 bit ABI for x86-64 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standard library fails to build for arm64_32-apple-watchos

6 participants