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