Skip to content

build: Replace RUST_LIBC_UNSTABLE env with libc_unstable* cfg#4977

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
tgross35:libc-cfg
Jun 24, 2026
Merged

build: Replace RUST_LIBC_UNSTABLE env with libc_unstable* cfg#4977
tgross35 merged 1 commit into
rust-lang:mainfrom
tgross35:libc-cfg

Conversation

@tgross35

@tgross35 tgross35 commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

The current environment variable setup makes it easy to set a
configuration for both the host (build scripts) and target, even when
that is not the intent. Change to a rustc cfg, which is easier to set
for only the target.

This was briefly discussed on Zulip around 1.

@rustbot rustbot added the A-CI Area: CI-related items label Feb 14, 2026
@tgross35
tgross35 force-pushed the libc-cfg branch 3 times, most recently from 3d160eb to f2aa125 Compare February 14, 2026 22:29
@tgross35 tgross35 mentioned this pull request Apr 13, 2026
3 tasks
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@tgross35
tgross35 force-pushed the libc-cfg branch 5 times, most recently from deaf2aa to 426a449 Compare June 23, 2026 05:25
The current environment variable setup makes it easy to set a
configuration for both the host (build scripts) and target, even when
that is not the intent. Change to a rustc cfg, which is easier to set
for only the target.

This was briefly discussed on Zulip around [1].

[1]: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Questions.20and.20polls.20about.20.60libc.60.201.2E0/near/511723332
@tgross35 tgross35 changed the title Replace RUST_LIBC_UNSTABLE env with libc_unstable* cfg build: Replace RUST_LIBC_UNSTABLE env with libc_unstable* cfg Jun 23, 2026
@tgross35
tgross35 marked this pull request as ready for review June 23, 2026 05:45
@tgross35
tgross35 requested a review from JohnTitor June 23, 2026 05:45
@tgross35

Copy link
Copy Markdown
Contributor Author

Woo I think this works finally. FreeBSD is the only remaining RUST_LIBC_UNSTABLE flag, which is taken care of in #5201.

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jun 24, 2026
@tgross35

Copy link
Copy Markdown
Contributor Author

I'm going to go ahead since this seems functional, and there are a few things that want to stack on top of it

@tgross35
tgross35 added this pull request to the merge queue Jun 24, 2026
Merged via the queue into rust-lang:main with commit f08bfce Jun 24, 2026
54 checks passed
@tgross35
tgross35 deleted the libc-cfg branch July 5, 2026 00:12
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Jul 20, 2026
The current environment variable setup makes it easy to set a
configuration for both the host (build scripts) and target, even when
that is not the intent. Change to a rustc cfg, which is easier to set
for only the target.

This was briefly discussed on Zulip around [1].

[1]: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Questions.20and.20polls.20about.20.60libc.60.201.2E0/near/511723332

(backport <rust-lang#4977>)
(cherry picked from commit f08bfce)
This was referenced Jul 20, 2026
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Jul 20, 2026
The current environment variable setup makes it easy to set a
configuration for both the host (build scripts) and target, even when
that is not the intent. Change to a rustc cfg, which is easier to set
for only the target.

This was briefly discussed on Zulip around [1].

[1]: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Questions.20and.20polls.20about.20.60libc.60.201.2E0/near/511723332

(backport <rust-lang#4977>)
(cherry picked from commit f08bfce)
@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 Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI-related items 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.

2 participants