-
- # Complete the compilation of the FFI code
- fun finalize_ffi_wrapper(compdir: String, mainmodule: MModule)
- do
- ensure_compile_ffi_wrapper
-
- for language in present_languages do if ffi_callbacks.keys.has(language) then
- for callback in ffi_callbacks[language] do
- language.compile_callback(callback, self, mainmodule, ffi_ccu.as(not null))
- end
-
- language.compile_to_files(self, compdir)
- end
-
- # include dependancies FFI
- for mod in mmodule.header_dependencies do
- if mod.uses_ffi then ffi_ccu.header_custom.add("#include \"{mod.name}._ffi.h\"\n")
- end
-
- ffi_ccu.write_as_impl(self, compdir)
- for filename in ffi_ccu.files do ffi_files.add(new ExternCFile(filename, mmodule.c_compiler_options))
- end