Skip to content

build: Assert that cfg makes sense - #5491

Merged
tgross35 merged 2 commits into
rust-lang:mainfrom
tgross35:cfg-assert
Sep 6, 2026
Merged

tgross35 merged 2 commits into
rust-lang:mainfrom
tgross35:cfg-assert

Conversation

@tgross35

@tgross35 tgross35 commented Sep 6, 2026

Copy link
Copy Markdown
Member

Adjust configuration so that we are not e.g. setting freebsd12 on
non-FreeBSD targets, and add assertions that similar configuration
setups make sense.

@rustbot

This comment has been minimized.

Adjust configuration so that we are not e.g. setting `freebsd12` on
non-FreeBSD targets, and add assertions that similar configuration
setups make sense. This also means we aren't spending the (small) time
to invoke version-fetching commands on targets where they won't even be
used.
@rustbot

rustbot commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@tgross35
tgross35 added this pull request to the merge queue Sep 6, 2026
Merged via the queue into rust-lang:main with commit 7e30c32 Sep 6, 2026
58 checks passed
Comment thread build.rs
/// Corresponds to `_TIME_BITS=64` in glibc. Also used in x86 Windows with
/// GNU to expose a 64-bit `time_t`.
/// Corresponds to `_TIME_BITS=64` in glibc. Also used in x86 Windows with GNU
/// to expose a 64-bit `time_t`. Implies 32-bit GNU target and 64-bit `off_t`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think it's right to say that it implies 64-bit off_t. Windows
has no issues with off_t; It is time_t that is made 64-bits when
this cfg is issued.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point, updating as part of #5508

@tgross35
tgross35 deleted the cfg-assert branch September 7, 2026 04:11
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Sep 17, 2026
@tgross35 tgross35 mentioned this pull request Sep 17, 2026
renovate-bot pushed a commit to renovate-bot/rust-lang-_-libc that referenced this pull request Sep 17, 2026
Adjust configuration so that we are not e.g. setting `freebsd12` on
non-FreeBSD targets, and add assertions that similar configuration
setups make sense. This also means we aren't spending the (small) time
to invoke version-fetching commands on targets where they won't even be
used.

(backport <rust-lang#5491>)
(cherry picked from commit 6840d7b)
renovate-bot pushed a commit to renovate-bot/rust-lang-_-libc that referenced this pull request Sep 17, 2026
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants