wasm is not friends with compiler-rt

This commit is contained in:
Brendan Hansknecht 2023-12-08 20:22:08 -08:00
parent 8aa68ccf8e
commit 3dc1389cdd
No known key found for this signature in database
GPG key ID: A199D0660F95F948

View file

@ -59,6 +59,7 @@ fn generateLlvmIrFile(
const obj = b.addObject(.{ .name = object_name, .root_source_file = main_path, .optimize = mode, .target = target, .use_llvm = true }); const obj = b.addObject(.{ .name = object_name, .root_source_file = main_path, .optimize = mode, .target = target, .use_llvm = true });
obj.strip = true; obj.strip = true;
obj.disable_stack_probing = true; obj.disable_stack_probing = true;
if (target.cpu_arch != .wasm32)
obj.bundle_compiler_rt = true; obj.bundle_compiler_rt = true;
// Generating the bin seems required to get zig to generate the llvm ir. // Generating the bin seems required to get zig to generate the llvm ir.
@ -92,6 +93,7 @@ fn generateObjectFile(
obj.link_function_sections = true; obj.link_function_sections = true;
obj.force_pic = true; obj.force_pic = true;
obj.disable_stack_probing = true; obj.disable_stack_probing = true;
if (target.cpu_arch != .wasm32)
obj.bundle_compiler_rt = true; obj.bundle_compiler_rt = true;
const obj_file = obj.getEmittedBin(); const obj_file = obj.getEmittedBin();