disable stack probing on zig builtins

This commit is contained in:
Luke Boswell 2024-08-04 19:42:06 +10:00
parent f176bead42
commit a4259e8d8e
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0

View file

@ -78,6 +78,8 @@ fn generateLlvmIrFile(
if (target.result.cpu.arch != std.Target.Cpu.Arch.wasm32)
obj.bundle_compiler_rt = true;
obj.root_module.stack_check = false;
// Generating the bin seems required to get zig to generate the llvm ir.
_ = obj.getEmittedBin();
const ir_file = obj.getEmittedLlvmIr();
@ -107,6 +109,7 @@ fn generateObjectFile(
const obj = b.addObject(.{ .strip = true, .pic = true, .name = object_name, .root_source_file = main_path, .optimize = mode, .target = target, .use_llvm = true });
obj.link_function_sections = true;
obj.root_module.stack_check = false;
if (target.result.cpu.arch != std.Target.Cpu.Arch.wasm32)
obj.bundle_compiler_rt = true;