Skip to content

Commit

Permalink
Upgrade target-lexicon to 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 20, 2024
1 parent ed994b0 commit 5a82b1d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fat-macho = { version = "0.4.8", default-features = false }
once_cell = "1.7.2"
rustc_version = "0.4.0"
semver = "1.0.22"
target-lexicon = "0.12.14"
target-lexicon = "0.13.0"
indexmap = "2.2.3"
pyproject-toml = "0.11.0"
python-pkginfo = "0.6.5"
Expand Down Expand Up @@ -97,7 +97,7 @@ clap = { version = "4.0.0", features = [
clap_complete_command = { version = "0.6.1", optional = true }

# cross compile
cargo-zigbuild = { version = "0.19.5", default-features = false, optional = true }
cargo-zigbuild = { version = "0.19.6", default-features = false, optional = true }
cargo-xwin = { version = "0.17.5", default-features = false, optional = true }

# log
Expand Down
5 changes: 4 additions & 1 deletion src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,10 @@ pub(crate) fn rustc_macosx_target_version(target: &str) -> (u16, u16) {
.context("llvm-target is not a string")?;
let triple = llvm_target.parse::<target_lexicon::Triple>();
let (major, minor) = match triple.map(|t| t.operating_system) {
Ok(OperatingSystem::MacOSX { major, minor, .. }) => (major, minor),
Ok(
OperatingSystem::MacOSX(Some(deployment_target))
| OperatingSystem::Darwin(Some(deployment_target)),
) => (deployment_target.major, u16::from(deployment_target.minor)),
_ => fallback_version,
};
Ok((major, minor))
Expand Down
4 changes: 2 additions & 2 deletions src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ impl Target {
let os = match platform.operating_system {
OperatingSystem::Linux => Os::Linux,
OperatingSystem::Windows => Os::Windows,
OperatingSystem::MacOSX { .. } | OperatingSystem::Darwin => Os::Macos,
OperatingSystem::Ios => Os::Ios,
OperatingSystem::MacOSX(_) | OperatingSystem::Darwin(_) => Os::Macos,
OperatingSystem::IOS(_) => Os::Ios,
OperatingSystem::Netbsd => Os::NetBsd,
OperatingSystem::Freebsd => Os::FreeBsd,
OperatingSystem::Openbsd => Os::OpenBsd,
Expand Down

0 comments on commit 5a82b1d

Please sign in to comment.