Skip to content

Commit

Permalink
Revert "Change relocation mode to Default from PIC"
Browse files Browse the repository at this point in the history
This reverts commit 90a72c1.

The bug was in the wrong length to `memcpy` for fixed array
initializers. And we apparently need PIC to build correctly on some OSs.
  • Loading branch information
tjammer committed Feb 29, 2024
1 parent e954040 commit 4f63e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codegen/codegen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ let generate ~target ~outname ~release ~modul
Llvm_all_backends.initialize ();

let target = Llvm_target.Target.by_triple triple in
let reloc_mode = Llvm_target.RelocMode.Default in
let reloc_mode = Llvm_target.RelocMode.PIC in
let machine = TargetMachine.create ~triple target ~reloc_mode in
let layout = DataLayout.as_string (TargetMachine.data_layout machine) in

Expand Down

0 comments on commit 4f63e1b

Please sign in to comment.