Skip to content

Commit

Permalink
Fix macOS build on x86 hosts
Browse files Browse the repository at this point in the history
We need to set PREFIX to one in config.asm such that the assembly
routine names get mangled correctly, otherwise linking will fail.
  • Loading branch information
thedataking committed Jul 4, 2023
1 parent 52a1be5 commit 415c123
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ fn build_nasm_files(x86_64: bool) {
config_file.write(b"%define STACK_ALIGNMENT 4\n").unwrap();
}
config_file.write(b"%define PIC 1\n").unwrap();
#[cfg(target_os = "macos")]
config_file.write(b"%define PREFIX 1\n").unwrap();
config_file
.write(b"%define FORCE_VEX_ENCODING 0\n")
.unwrap();
Expand Down

0 comments on commit 415c123

Please sign in to comment.