Skip to content

Update std_detect support for AArch64 Darwin - #163516

Open
pthariensflame wants to merge 1 commit into
rust-lang:mainfrom
pthariensflame:detect-aarch64-darwin-2026-09-update
Open

pthariensflame wants to merge 1 commit into
rust-lang:mainfrom
pthariensflame:detect-aarch64-darwin-2026-09-update

Conversation

@pthariensflame

Copy link
Copy Markdown
Contributor

This makes it current as of late September, 2026.

No part of this was done using LLMs in any capacity.

Current as of late September, 2026.
@rustbot

rustbot commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in std_detect

cc @Amanieu, @folkertdev, @sayantn

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 30, 2026
@rustbot

rustbot commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

r? @Darksonn

rustbot has assigned @Darksonn.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 12 candidates
  • Random selection from Darksonn, JohnTitor, Mark-Simulacrum, clarfonthey, jhpratt

enable_feature(Feature::flagm2, flagm2);
enable_feature(Feature::fp, fp);
enable_feature(Feature::fp16, fp16);
enable_feature(Feature::fp8, fp8);

@Darksonn Darksonn Sep 30, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't match the Linux check:

let fp8 = self.f8cvt && self.faminmax && self.lut && self.bf16;
enable_feature(Feature::fp8, fp8);

Note that the fp8 feature was changed in LLVM to depend on just neon rather than FeatureFAMINMAX, FeatureLUT, FeatureBF16 in llvm/llvm-project#125874. But rustc still lists those three features. Should this also be updated to match LLVM?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We have no idea; who would be the best person to consult for this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hopefully one of the people cc'd above by the bot can help.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cc @davidtwco @adamgemmell (target maintainers), but seems to me that we should follow LLVM here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unfortunately it's a breaking change to do so as this example would require an unsafe context on the call:

#[target_feature(enable="fp8")]
fn fp8() {
    bf16();
}

#[target_feature(enable="bf16")]
fn bf16() {}

@pthariensflame pthariensflame Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately it's a breaking change to do so as this example would require an unsafe context on the call

Would that be potentially solvable by use of a new feature (fp8cvt, name subject to bikeshedding) to represent the actual FEAT_FP8 and then redefining fp8 retroactively to imply fp8cvt+lut+bf16+faminmax?

Or is it okay to do this breaking change as fp8 is currently unstable anyway?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, if fp8 is still unstable then we can just make that change :)

@Darksonn Darksonn added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 30, 2026

This branch has not been deployed

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

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants