Skip to content

Conversation

@eholk
Copy link
Contributor

@eholk eholk commented Dec 11, 2025

This is a companion to #149644 and adds a target that can be used to enable AddressSanitizer by default on Windows.

  • A tier 3 target must have a designated developer or developers (the "target
    maintainers") on record to be CCed when issues arise regarding the target.

I and the other maintainers of the Windows MSVC targets will be responsible for this target.

(cc @ChrisDenton @dpaoliello @Fulgen301 @lambdageek @sivadeilra @wesleywiser)

  • Targets must use naming consistent with any existing targets; for instance, a
    target for the same CPU or OS as an existing Rust target should use the same
    name for that CPU or OS. Targets should normally use the same names and
    naming conventions as used elsewhere in the broader ecosystem beyond Rust
    (such as in other toolchains), unless they have a very good reason to
    diverge. Changing the name of a target can be highly disruptive, especially
    once the target reaches a higher tier, so getting the name right is important
    even for a tier 3 target.

This target follows the naming conventions agreed on for the similar x86_64-asan-linux-gnu target.

  • Tier 3 targets may have unusual requirements to build or use, but must not
    create legal issues or impose onerous legal terms for the Rust project or for
    Rust developers or users.

This PR introduces no new legal terms or conditions.

  • Neither this policy nor any decisions made regarding targets shall create any
    binding agreement or estoppel by any party. If any member of an approving
    Rust team serves as one of the maintainers of a target, or has any legal or
    employment requirement (explicit or implicit) that might affect their
    decisions regarding a target, they must recuse themselves from any approval
    decisions regarding the target's tier status, though they may otherwise
    participate in discussions.

Understood.

  • Tier 3 targets should attempt to implement as much of the standard libraries
    as possible and appropriate (core for most targets, alloc for targets
    that can support dynamic memory allocation, std for targets with an
    operating system or equivalent layer of system-provided functionality), but
    may leave some code unimplemented (either unavailable or stubbed out as
    appropriate), whether because the target makes it impossible to implement or
    challenging to implement. The authors of pull requests are not obligated to
    avoid calling any portions of the standard library on the basis of a tier 3
    target not implementing those portions.

This is able to implement the same portions of the standard library that are supported by the other MSVC targets.

  • The target must provide documentation for the Rust community explaining how
    to build for the target, using cross-compilation if possible. If the target
    supports running binaries, or running tests (even if they do not pass), the
    documentation must explain how to run such binaries or tests for the target,
    using emulation if possible or dedicated hardware if necessary.

This PR includes such documentation.

  • Tier 3 targets must not impose burden on the authors of pull requests, or
    other developers in the community, to maintain the target. In particular,
    do not post comments (automated or manual) on a PR that derail or suggest a
    block on the PR based on a tier 3 target. Do not send automated messages or
    notifications (via any medium, including via @) to a PR author or others
    involved with a PR regarding a tier 3 target, unless they have opted into
    such messages.

Understood.

  • Patches adding or updating tier 3 targets must not break any existing tier 2
    or tier 1 target, and must not knowingly break another tier 3 target without
    approval of either the compiler team or the maintainers of the other tier 3
    target.

Understood.

  • Tier 3 targets must be able to produce assembly using at least one of
    rustc's supported backends from any host target. (Having support in a fork
    of the backend is not sufficient, it must be upstream.)

This target uses LLVM for code generation.

@rustbot
Copy link
Collaborator

rustbot commented Dec 11, 2025

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Dec 11, 2025
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 11, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 11, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@wesleywiser
Copy link
Member

r? wesleywiser

I'll wait for a bit to see if there are any objections from the other target maintainers against adding this but I'm very much in favor!

@rustbot rustbot assigned wesleywiser and unassigned SparrowLii Dec 11, 2025

("x86_64-pc-cygwin", x86_64_pc_cygwin),

("x86_64-asan-windows-msvc", x86_64_asan_windows_msvc),
Copy link
Member

Choose a reason for hiding this comment

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

nit: let's make sure this ends up grouped with x86_64-asan-unknown-gnu once #149644 lands.


## Testing

Programs compiled for this target require `clang_rt.asan_dynamic-x86_64.dll` to
Copy link
Member

Choose a reason for hiding this comment

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

I was initially going to suggest we just fold this file into the existing windows-msvc.md file but there are some important things to note like this, so I guess it makes sense to keep it as a separate file. If other maintainers feel differently, feel free to comment.

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants