-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Variadic functions don't allow "system" on non-x86 Windows #110505
Copy link
Copy link
Closed
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
While testing variadic function support with
raw-dylibI discovered that Rust requires such functions to use either "C" or "cdecl" ABIs butraw-dylibrequires the "system" ABI on non-x86 Windows.My undertstanding from discussing with @dpaoliello is that this is not an issue with
raw-dylibitself but with Rust's insistence that such functions aren't allowed to use the "system" ABI. It's just thatraw-dylibis very strict about calling convention so that's where the issue surfaced.On x64 I should be able to compile this but Rust says no:
This example works if I change the ABI to "cdecl" but that's not meant to be a valid ABI on x64 and so when I try to compile this with
raw-dylibit fails:The practical result is that it is impossible to link this function with
raw-dylibon non-x86.