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

A procedural macro library can exceed the PE/COFF export ordinal limit on x86_64-pc-windows-gnu #92212

Open
tay64 opened this issue Dec 22, 2021 · 0 comments
Labels
O-windows Operating system: Windows

Comments

@tay64
Copy link

tay64 commented Dec 22, 2021

Please see the SixtyFPS issue #764.

When building sixtyfps-rs on Windows, its procedural macro library fails to build with the linker error export ordinal too large.

The library has 70000+ exports (the exact number depends on the rust toolchain version and platform). The majority of the exports relate to the library's dependencies, not the symbols provided by the library itself.

The PE/COFF format has a limit of 65535 export ordinals.

When building on Windows, procedural macro libraries must compile into PE/COFF, to match the native toolchain.

This seems related to the Rust issue #37530, which solved the "export everything" problem for cdylibs.

(I am just a dabbler in Rust and this is my first issue submission here. Not sure what are the options. Maybe some workaround on the SixtyFPS side is possible? How other procedural macro libraries avoid this problem?)

@workingjubilee workingjubilee added the O-windows Operating system: Windows label Mar 21, 2023
rvolosatovs added a commit to rvolosatovs/wasmCloud that referenced this issue Oct 30, 2023
Unfortunately, `wash` cannot be built for mingw due to
rust-lang/rust#92212

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

2 participants