Skip to content

carry cconv sig

Moritz Angermann requested to merge wip/angerman/carry-cconv-sig into ghc-8.10

The core part of !4795 (closed)

This adds the logic to carry c signature from the foreign import ... statement to the codegen.

It's a hack for 8.10 and 9.0, as we don't necessarily need this in 9.2 where we have properly sized primitves.

Prior to 9.2 we only have Word sized primitives that end up in the codegen, and from which we can't recover the exact size (1, 8, 16, 32, ...) required to produce proper C ABI calls on aarch64-darwin.

Merge request reports