File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -747,6 +747,12 @@ impl Zig {
747
747
) -> Result < ( ) > {
748
748
for target in & cargo. target {
749
749
if target. contains ( "apple" ) {
750
+ let rustc_ver = rustc_version:: version ( ) ?;
751
+ if ( rustc_ver. major , rustc_ver. minor ) >= ( 1 , 66 ) {
752
+ // Rust 1.66.0+ doesn't pull in libiconv on Apple platforms by default
753
+ // See https://github.com/rust-lang/rust/pull/103277/
754
+ return Ok ( ( ) ) ;
755
+ }
750
756
let target_dir = if let Some ( target_dir) = cargo. target_dir . clone ( ) {
751
757
target_dir. join ( target)
752
758
} else {
@@ -755,9 +761,10 @@ impl Zig {
755
761
// cargo install doesn't pass a manifest path so `Cargo.toml` in cwd may not exist
756
762
continue ;
757
763
}
758
- let mut metadata_cmd = cargo_metadata:: MetadataCommand :: new ( ) ;
759
- metadata_cmd. manifest_path ( manifest_path) ;
760
- let metadata = metadata_cmd. exec ( ) ?;
764
+ let metadata = cargo_metadata:: MetadataCommand :: new ( )
765
+ . manifest_path ( manifest_path)
766
+ . no_deps ( )
767
+ . exec ( ) ?;
761
768
metadata. target_directory . into_std_path_buf ( ) . join ( target)
762
769
} ;
763
770
let profile = match cargo. profile . as_deref ( ) {
You can’t perform that action at this time.
0 commit comments