Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Sep 13, 2025

These were previously disabled, in part for performance reasons, in part due to needing availability symbols __isPlatformVersionAtLeast and __isOSVersionAtLeast that compiler-builtins did not provide, see #62592 (comment) and #134275 (comment) for failed checks.

Since #138944 though, std now provides these symbols, so we should be able to re-enable LLVM assertions, debug assertions and overflow checks.

Fixes #59637.

try-job: *apple*

@madsmtm madsmtm added O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. A-CI Area: Our Github Actions CI labels Sep 13, 2025
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 13, 2025
@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 13, 2025

@bors try

rust-bors bot added a commit that referenced this pull request Sep 13, 2025
Re-enable assertions on macOS

try-job: `*apple*`
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Sep 13, 2025

💔 Test for beeae75 failed: CI. Failed jobs:

@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 13, 2025

Hmm, might need a stage0 bump, waiting for that:
@rustbot blocked

EDIT: #146636

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 16, 2025
@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 27, 2025

@rustbot author
@bors try

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Sep 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 27, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 27, 2025
Re-enable assertions on macOS

try-job: `*apple*`
@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 27, 2025

@bors try cancel
I need to rebase first probably

@rust-bors
Copy link

rust-bors bot commented Sep 27, 2025

Try build cancelled. Cancelled workflows:

@madsmtm madsmtm force-pushed the apple-reenable-assertions branch from 2bdfca2 to b2c7b6b Compare September 27, 2025 09:09
@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 27, 2025

@bors try

rust-bors bot added a commit that referenced this pull request Sep 27, 2025
Re-enable assertions on macOS

try-job: `*apple*`
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Sep 27, 2025

💔 Test for 56e5725 failed: CI. Failed jobs:

This wasn't caught by CI, because debug assertions aren't enabled there.
@madsmtm madsmtm force-pushed the apple-reenable-assertions branch from b2c7b6b to 25bedcd Compare September 27, 2025 12:41
@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 27, 2025

@bors try

rust-bors bot added a commit that referenced this pull request Sep 27, 2025
Re-enable assertions on macOS

try-job: `*apple*`
@rust-bors

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Sep 27, 2025

☀️ Try build successful (CI)
Build commit: b2aaeab (b2aaeab762eeba9432c7301480d7d9b3552699fd, parent: ade84871f718ea20a6460d28e82290353b4bf3d2)

@madsmtm madsmtm force-pushed the apple-reenable-assertions branch from 25bedcd to 9878be7 Compare September 27, 2025 16:06
@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 27, 2025

So, the -alt build succeeded! Let's try the normal one:
@bors try

rust-bors bot added a commit that referenced this pull request Sep 27, 2025
Re-enable assertions on macOS

try-job: `*apple*`
@rust-bors

This comment has been minimized.

@madsmtm madsmtm removed A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 27, 2025
@rust-bors
Copy link

rust-bors bot commented Sep 27, 2025

☀️ Try build successful (CI)
Build commit: 2ec5766 (2ec5766d21d2e578d3ba452d7d12814b21e8140b, parent: ade84871f718ea20a6460d28e82290353b4bf3d2)

@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 27, 2025

So, I think this works!
@rustbot ready

r? @Mark-Simulacrum since you're on t-infra and were assigned to #59637 in the past.

Also CC @jieyouxu, since you've tried to do this in the past.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 27, 2025
@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 27, 2025

I'm unsure if it has a performance impact, comparing it against the auto build on 959b450 gives:

Previously This PR
CI Run Link Link
dist-x86_64-apple 1h 40m 1h 56m
dist-apple-various 1h 5m 1h 5m
dist-aarch64-apple 2h 2m 1h 37m
aarch64-apple 1h 49m 2h 3m

Which feels like wayy too high a variance to really be able to say anything conclusive?

@madsmtm madsmtm marked this pull request as ready for review September 27, 2025 18:31
@rustbot
Copy link
Collaborator

rustbot commented Sep 27, 2025

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

I'm a bit confused. This appears to enable assertions on a bunch of dist targets, but distributed toolchains are not supposed to enable assertions.

Should this change be limited to only aarch64-apple, which is a test target and as such should enable assertions?

View changes since this review

@madsmtm
Copy link
Contributor Author

madsmtm commented Sep 27, 2025

I'm a bit confused. This appears to enable assertions on a bunch of dist targets, but distributed toolchains are not supposed to enable assertions.

Right, the dist- builds set DEPLOY. Only the -alt builds get debug assertions, overflow checks and LLVM assertions in here. So this PR as-is only actually affects aarch64-apple, the rest still have all the assertions disabled.

That said, it this will allow others to enable -alt if they find they need to test with debug assertions. I tested an -alt build in this CI run, it currently passes.

@Mark-Simulacrum Mark-Simulacrum changed the title Re-enable assertions on macOS Re-enable assertions on macOS alt builds Sep 28, 2025
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=never

This seems reasonable to me. Thanks! I agree that the CI times don't seem affected (at least within noise reasonable to achieve from a single PR's measurements).

@bors
Copy link
Collaborator

bors commented Sep 28, 2025

📌 Commit 9878be7 has been approved by Mark-Simulacrum

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 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI O-macos Operating system: macOS S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-enable LLVM and debug assertions for slow builders
6 participants