Rollup merge of #105904 - MarcusCalhoun-Lopez:darwin_arch_i386, r=bjorn3

Fix arch flag on i686-apple-darwin

i686-apple-darwin should use `-arch i386` instead of `-arch i686`
This commit is contained in:
Matthias Krüger 2022-12-20 23:35:15 +01:00 committed by GitHub
commit 2ddfa8fd3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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());
}