mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
add pie in hopes to fix relocations
This commit is contained in:
parent
cf463c16bb
commit
4f29d46bdc
1 changed files with 4 additions and 2 deletions
|
@ -75,11 +75,12 @@ fn generateLlvmIrFile(
|
|||
) void {
|
||||
const obj = b.addObject(.{ .strip = true, .name = object_name, .root_source_file = main_path, .optimize = mode, .target = target, .use_llvm = true });
|
||||
|
||||
obj.root_module.stack_check = false;
|
||||
obj.pie = true;
|
||||
|
||||
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();
|
||||
|
@ -110,6 +111,7 @@ fn generateObjectFile(
|
|||
|
||||
obj.link_function_sections = true;
|
||||
obj.root_module.stack_check = false;
|
||||
obj.pie = true;
|
||||
|
||||
if (target.result.cpu.arch != std.Target.Cpu.Arch.wasm32)
|
||||
obj.bundle_compiler_rt = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue