Skip to content

Commit

Permalink
Make macOS static libraries thin for linking
Browse files Browse the repository at this point in the history
This just used

    lipo libftd2xx.a -thin x86_64 -output x86_64/libftd2xx.a
    lipo libftd2xx.a -thin arm64 -output arm64/libftd2xx.a

See rust-lang/cargo#8875 (comment)
  • Loading branch information
mac authored and KoviRobi committed Dec 13, 2022
1 parent 72ebd81 commit 56f055d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ fn search_path() -> PathBuf {
path.push("build");
}
"macos" => match env::var("CARGO_CFG_TARGET_ARCH").unwrap().as_str() {
"x86_64" | "aarch64" => {
"x86_64" => {
path.push("macos");
path.push("build");
path.push("x86_64");
}
"aarch64" => {
path.push("macos");
path.push("build");
path.push("arm64");
}
target_arch => panic!("Target architecture not supported: {}", target_arch),
},
Expand Down
Binary file added vendor/macos/build/arm64/libftd2xx.a
Binary file not shown.
Binary file added vendor/macos/build/x86_64/libftd2xx.a
Binary file not shown.

0 comments on commit 56f055d

Please sign in to comment.