Skip to content

Commit d09ed82

Browse files
committed
fix: cross compilation from aarch64 to x86_64 MacOS
1 parent e40c431 commit d09ed82

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libsql-ffi/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,10 @@ fn build_multiple_ciphers(target: &str, out_path: &Path) {
478478
cmake_opts.push(&cmake_toolchain_opt);
479479
writeln!(toolchain_file, "set(CMAKE_SYSTEM_NAME \"Linux\")").unwrap();
480480
writeln!(toolchain_file, "set(CMAKE_SYSTEM_PROCESSOR \"arm64\")").unwrap();
481+
} else if cc.contains("x86_64") && cc.contains("darwin") {
482+
cmake_opts.push(&cmake_toolchain_opt);
483+
writeln!(toolchain_file, "set(CMAKE_SYSTEM_NAME \"Darwin\")").unwrap();
484+
writeln!(toolchain_file, "set(CMAKE_SYSTEM_PROCESSOR \"x86_64\")").unwrap();
481485
}
482486
}
483487
if let Some(cc) = cross_cc {

0 commit comments

Comments
 (0)