Skip to content

Add min_$TARGET_API_version cfg predicates#3036

Closed
rylev wants to merge 3 commits intorust-lang:masterfrom
rylev:min-target-api-version
Closed

Add min_$TARGET_API_version cfg predicates#3036
rylev wants to merge 3 commits intorust-lang:masterfrom
rylev:min-target-api-version

Conversation

@rylev
Copy link
Member

@rylev rylev commented Dec 15, 2020

This RFC adds various min_$TARGET_API_version cfg predicates which allow users to conditionally compile code based on the minimum supported API version for a particular target platform API such as libc, the windows build version, macOS version, etc.. For example, this allows for conditionally compiling code for Windows 10+ that will not be compiled when targeting older versions of Windows.

Zulip discussion thread
Pre-RFC discourse thread

cc @joshtriplett

Rendered

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cfg Conditional compilation related proposals & ideas Libs-Tracked Libs issues that are tracked on the team's project board. T-lang Relevant to the language team, which will review and decide on the RFC. T-libs-api Relevant to the library API team, which will review and decide on the RFC.

Projects

None yet

Development

Successfully merging this pull request may close these issues.