bytecodealliance / target-lexicon

Target "triple" support
Apache License 2.0
47 stars 42 forks source link

Return correct pointer width for the x32 abi #97

Closed bjorn3 closed 10 months ago

bjorn3 commented 10 months ago

Currently x86_64-unknown-linux-gnux32 will incorrectly give a pointer width of 64. This causes an ICE for cg_clif due to an assertion about the pointer width known to rustc and known to Cranelift not matching: https://github.com/rust-lang/rust/issues/118739

bjorn3 commented 10 months ago

I don't expect Cranelift to support the x32 ABI, but returning the correct pointer width from target-lexicon would allow easier checks in Cranelift to return an error which cg_clif then turns into a rustc fatal error that the target is not supported as opposed to giving an ICE.