-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
c-variadic: bpf and spirv do not support c-variadic definitions #149557
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1925,6 +1925,24 @@ impl Arch { | |
| Self::Other(name) => rustc_span::Symbol::intern(name), | ||
| } | ||
| } | ||
|
|
||
| pub fn supports_c_variadic_definitions(&self) -> bool { | ||
| use Arch::*; | ||
|
|
||
| match self { | ||
| // These targets just do not support c-variadic definitions. | ||
| Bpf | SpirV => false, | ||
|
|
||
| // We don't know if the target supports c-variadic definitions, but we don't want | ||
| // to needlessly restrict custom target.json configurations. | ||
| Other(_) => true, | ||
|
Comment on lines
+1936
to
+1938
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is kind of up for debate, but a custom
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That seems fine to me. |
||
|
|
||
| AArch64 | AmdGpu | Arm | Arm64EC | Avr | CSky | Hexagon | LoongArch32 | LoongArch64 | ||
| | M68k | Mips | Mips32r6 | Mips64 | Mips64r6 | Msp430 | Nvptx64 | PowerPC | ||
| | PowerPC64 | PowerPC64LE | RiscV32 | RiscV64 | S390x | Sparc | Sparc64 | Wasm32 | ||
| | Wasm64 | X86 | X86_64 | Xtensa => true, | ||
| } | ||
| } | ||
| } | ||
|
|
||
| crate::target_spec_enum! { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
emitting other errors here doesn't seem useful when the target just does not support c-variadics.