Skip to content

Commit

Permalink
Upgrade cargo-xwin to 0.17.5
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 1, 2024
1 parent 3fb7490 commit c99eb69
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ clap_complete_command = { version = "0.6.1", optional = true }

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

# log
tracing = "0.1.36"
Expand Down
1 change: 1 addition & 0 deletions guide/src/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ See [environment variables Cargo reads](https://doc.rust-lang.org/cargo/referenc
* `SOURCE_DATE_EPOCH`: The time to use for the timestamp in the wheel metadata
* `MATURIN_EMSCRIPTEN_VERSION`: The version of emscripten to use for emscripten builds
* `MATURIN_NO_MISSING_BUILD_BACKEND_WARNING`: Suppress missing build backend warning
* `MATURIN_USE_XWIN`: Set to `1` to force to use `xwin` for cross compiling even on Windows that supports native compilation
* `TARGET_SYSROOT`: The sysroot to use for auditwheel wheel when cross compiling
* `ARCHFLAGS`: Flags to control the architecture of the build on macOS, for example you can use `ARCHFLAGS="-arch x86_64 -arch arm64"` to build universal2 wheels
4 changes: 3 additions & 1 deletion src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ fn cargo_build_command(
.extend(["-C".to_string(), "strip=symbols".to_string()]);
}

let mut build_command = if target.is_msvc() && target.cross_compiling() {
let mut build_command = if target.is_msvc()
&& (target.cross_compiling() || env::var("MATURIN_USE_XWIN").ok().as_deref() == Some("1"))
{
#[cfg(feature = "xwin")]
{
println!("🛠️ Using xwin for cross-compiling to {target_triple}");
Expand Down

0 comments on commit c99eb69

Please sign in to comment.