Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amend target policy to require codegen support #655

Closed
3 tasks done
workingjubilee opened this issue Jul 17, 2023 · 3 comments
Closed
3 tasks done

Amend target policy to require codegen support #655

workingjubilee opened this issue Jul 17, 2023 · 3 comments
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team

Comments

@workingjubilee
Copy link
Member

workingjubilee commented Jul 17, 2023

Proposal

We may wish to adopt the recommendation by @nikic to amend the target tier policy to explicitly require codegen support for all target architectures that rustc actually supports. While strongly implied123 by the policy, it's left slightly ambiguous. Recent events have undermined certainty that all targets in-tree functionally support even emitting object code, leading to inadequate returns on our own maintenance efforts.

More specifically, I would elaborate this to require:

  • All target architectures must have a cross-compilable assembly test
    • "emit correct assembly" is usually LLVM's job, but is useless if rustc is incorrectly configured
    • describes a minimum for tier 3: "can ANYTHING build if you twist rustc's arm hard enough?"
  • Significant variants of architectures should test to validate the variant is emitted correctly
    • For instance, aarch64_ilp32 might test the pointers are actually 32-bit
  • For tier 3, quality of codegen is not required, merely codegen
  • Tiers 1 and 2 need an upstream machine backend maintainer/reviewer group/codeowner/etc.

Mentors or Reviewers

@nikic?
@workingjubilee?

Process

The main points of the Major Change Process are as follows:

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

Footnotes

  1. "Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries" suggests that such compilation can be done but does not directly state that it can happen.

  2. "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)," does not explicitly say, say, addition should work.

  3. "Tier 2 targets must not leave any significant portions of core or the standard library unimplemented or stubbed out, unless they cannot possibly be supported on the target." does not specify, for instance, that these implementations should emit the correct object code and survive even minimal testing... it just seems reasonable to imagine they would.

@workingjubilee workingjubilee added major-change A proposal to make a major change to rustc T-compiler Add this label so rfcbot knows to poll the compiler team labels Jul 17, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 17, 2023

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/compiler @rust-lang/compiler-contributors

@rustbot rustbot added the to-announce Announce this issue on triage meeting label Jul 17, 2023
@nagisa
Copy link
Member

nagisa commented Jul 17, 2023

@rustbot second

@rustbot rustbot added the final-comment-period The FCP has started, most (if not all) team members are in agreement label Jul 17, 2023
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jul 20, 2023
@compiler-errors compiler-errors added major-change-accepted A major change proposal that was accepted and removed final-comment-period The FCP has started, most (if not all) team members are in agreement labels Jul 29, 2023
@rustbot rustbot added the to-announce Announce this issue on triage meeting label Jul 29, 2023
@compiler-errors
Copy link
Member

This MCP is accepted.

@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Aug 4, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 11, 2023
…t, r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? `@wesleywiser`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 11, 2023
…t, r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? ``@wesleywiser``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 11, 2023
…t, r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? ```@wesleywiser```
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 11, 2024
… r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? `@wesleywiser`
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 11, 2024
… r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? `@wesleywiser`
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 12, 2024
… r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? `@wesleywiser`
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 12, 2024
… r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? `@wesleywiser`
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 15, 2024
… r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? `@wesleywiser`
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 17, 2024
… r=Mark-Simulacrum

tests: add sanity-check assembly test for every target

Fixes rust-lang#119910.

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? `@wesleywiser`
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jan 18, 2024
…imulacrum

tests: add sanity-check assembly test for every target

Fixes #119910.

Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this.

cc rust-lang/compiler-team#655
r? `@wesleywiser`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team
Projects
None yet
Development

No branches or pull requests

5 participants