Skip to content

build: Don't warn when enabling opting into musl 1.2 via multiple ways - #5517

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
Gelbpunkt:no-warn-musl-1-2-multiple-ways
Sep 8, 2026
Merged

tgross35 merged 1 commit into
rust-lang:mainfrom
Gelbpunkt:no-warn-musl-1-2-multiple-ways

Conversation

@Gelbpunkt

Copy link
Copy Markdown
Contributor

In Alpine, we have to set both the old and new cfg and the environment variable since various versions of libc are being used by packaged software.

This will then emit the warnings about the options being deprecated, even though we fully intentionally set them. I believe the primary purpose of the warnings is to tell people to migrate to the new cfg, so we can just not print a warning if musl 1.2 is being opted into via a different way (and the cfg or env var has no effect) already.

In Alpine, we have to set both the old and new `cfg` *and* the
environment variable since various versions of libc are being used by
packaged software.

This will then emit the warnings about the options being deprecated,
even though we fully intentionally set them. I believe the primary
purpose of the warnings is to tell people to migrate to the new `cfg`,
so we can just not print a warning if musl 1.2 is being opted into via
a different way (and the `cfg` or env var has no effect) already.
@Gelbpunkt

Copy link
Copy Markdown
Contributor Author

@rustbot label +stable-nominated

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Sep 8, 2026

@tgross35 tgross35 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tgross35
tgross35 added this pull request to the merge queue Sep 8, 2026
Merged via the queue into rust-lang:main with commit df65616 Sep 8, 2026
58 checks passed
@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
In Alpine, we have to set both the old and new `cfg` *and* the
environment variable since various versions of libc are being used by
packaged software.

This will then emit the warnings about the options being deprecated,
even though we fully intentionally set them. I believe the primary
purpose of the warnings is to tell people to migrate to the new `cfg`,
so we can just not print a warning if musl 1.2 is being opted into via
a different way (and the `cfg` or env var has no effect) already.

(backport <rust-lang#5517>)
(cherry picked from commit df65616)
@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