mirror of
https://github.com/imjasonh/krust
synced 2026-07-11 16:10:00 +00:00
Fix cross-compilation toolchain installation for all platforms
- macOS: Use messense/macos-cross-toolchains tap for musl toolchain - Windows: Fix PowerShell syntax for creating cargo config - Add verification step to check musl target installation - Update builder to try platform-specific linker names - Fix YAML syntax error in Windows config generation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
642472c548
commit
5dc87b282e
3 changed files with 23 additions and 8 deletions
|
|
@ -56,7 +56,13 @@ impl RustBuilder {
|
|||
debug!("Using linker: rust-lld");
|
||||
} else {
|
||||
// Try common linker names on other platforms
|
||||
for linker in &["x86_64-linux-musl-gcc", "musl-gcc", "x86_64-linux-gnu-gcc"] {
|
||||
let linkers = if cfg!(target_os = "macos") {
|
||||
vec!["x86_64-unknown-linux-musl-gcc", "x86_64-linux-musl-gcc", "musl-gcc"]
|
||||
} else {
|
||||
vec!["x86_64-linux-musl-gcc", "musl-gcc", "x86_64-linux-gnu-gcc"]
|
||||
};
|
||||
|
||||
for linker in &linkers {
|
||||
if which::which(linker).is_ok() {
|
||||
cmd.env("CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER", linker);
|
||||
debug!("Using linker: {}", linker);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue