Skip to content

rsvg_internals/build.rs: Fix native, non-cross Windows builds

Chun-wei Fan requested to merge fix-build-rs-windows into master

Hi,

A recent change in rsvg_internals/build.rs broke native builds on Windows as it included a system Rust module that is supported on *nix only, std::os::unix::fs::symlink.

From the commit message:

Commit e310e36b broke builds on native Windows as it assumed the build is running on *NIX and is cross-compiling for Windows. Fix this by:

Including the *nix-only items conditionally, and include the Windows symlink items only on non-MSVC builds. The MSVC build files handle how the rust-built rsvg-internals.lib is being linked, so we don't need to build nor use generate_convenience_lib() on MSVC builds.

Only include the items related to generate_convenience_lib() when it is indeed being built.

At this point we do not support cross-compiling on *nix for MSVC builds, and it is unlikely it would be supported, at least in the near future.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports