Skip to content

Add -Z small-data-threshold #689

Closed
Closed
@paulmenage

Description

@paulmenage

Proposal

On some targets (including MIPS, M68K, RISC-V, Hexagon) and configurations, LLVM will place small static data objects in the .sdata and .sbss sections, intended to allow size optimizations in embedded systems that can access data in these sections via small offsets from a register. LLVM provides command line arguments and/or IR module flags to control/disable this behavior in the event that it's unwanted, but they're different on every target.

This proposal is to add the -Z small-data-threshold flag, which appropriately configures LLVM's small-data threshold for the target in use.

See rust-lang/rust#117465 for a possible implementation of the proposed change.

Mentors or Reviewers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was accepted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions