Set the DLL storage class to export.

This commit is contained in:
Nick Lewycky
2020-08-17 23:22:27 -07:00
parent 9e89ee9b7b
commit 36850d6230
2 changed files with 15 additions and 0 deletions

View File

@ -112,6 +112,9 @@ impl FuncTranslator {
func.add_attribute(AttributeLoc::Function, intrinsics.stack_probe);
func.set_personality_function(intrinsics.personality);
func.as_global_value().set_section(FUNCTION_SECTION);
func.set_linkage(Linkage::DLLExport);
func.as_global_value()
.set_dll_storage_class(inkwell::DLLStorageClass::Export);
let entry = self.ctx.append_basic_block(func, "entry");
let start_of_code = self.ctx.append_basic_block(func, "start_of_code");