Skip to content

Add support for ASM foreign files (.s) in TH (#16180)

Sylvain Henry requested to merge hsyl20/ghc:hsyl20-T16180 into master

This patch adds missing support for assembly language foreign files (.s) in TH.

We can now easily link TH generated assembly files with the current module. A workaround was to generate a C file with an asm directive but it's better to add direct support (no need to escape the asm source, etc.).

This can be used to implement inline-asm or to embed resources in the executable as I'm doing here.

Merge request reports