1
Fork 0

Fix arch flag on i686-apple-darwin

i686-apple-darwin should use `-arch i386` instead of `-arch i686`
This commit is contained in:
Marcus Calhoun-Lopez 2022-12-19 08:34:06 -07:00
parent 4653c93e44
commit ee1a905f00

View file

@ -600,6 +600,9 @@ fn configure_cmake(
if target.starts_with("aarch64") {
// macOS uses a different name for building arm64
cfg.define("CMAKE_OSX_ARCHITECTURES", "arm64");
} else if target.starts_with("i686") {
// macOS uses a different name for building i386
cfg.define("CMAKE_OSX_ARCHITECTURES", "i386");
} else {
cfg.define("CMAKE_OSX_ARCHITECTURES", target.triple.split('-').next().unwrap());
}