about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-01-27 00:00:40 +0100
committerBaitinq <[email protected]>2025-01-27 00:00:40 +0100
commita7939c042342b13b830b5e398269e1320448cf81 (patch)
tree0c2d7ae379c27a02854cf7bbbac9a91d0c3ae275
parentCodegen: PoC hello world (diff)
downloadpry-lang-a7939c042342b13b830b5e398269e1320448cf81.tar.gz
pry-lang-a7939c042342b13b830b5e398269e1320448cf81.tar.bz2
pry-lang-a7939c042342b13b830b5e398269e1320448cf81.zip
Codegen: PoC use _start
-rw-r--r--src/codegen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index d10aa88..60512bb 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -61,7 +61,7 @@ pub const CodeGen = struct {
         defer core.LLVMDisposeBuilder(builder);
 
         const main_func_type = core.LLVMFunctionType(core.LLVMInt32Type(), null, 0, 0);
-        const main_func = core.LLVMAddFunction(self.llvm_module, "main", main_func_type);
+        const main_func = core.LLVMAddFunction(self.llvm_module, "_start", main_func_type);
         const main_entry = core.LLVMAppendBasicBlock(main_func, "entrypoint");
         core.LLVMPositionBuilderAtEnd(builder, main_entry);