Skip to content

Commit

Permalink
use zig for musl
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Nov 20, 2022
1 parent c45f781 commit a85bc3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cli/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,15 @@ export class BuildCommand extends Command {
triple.platform === 'win32' && process.platform !== 'win32'
const isCrossForLinux =
triple.platform === 'linux' &&
(process.platform !== 'linux' || triple.arch !== process.arch)
(process.platform !== 'linux' ||
triple.arch !== process.arch ||
(function () {
const glibcVersionRuntime =
// @ts-expect-error
process.report?.getReport()?.header?.glibcVersionRuntime
const libc = glibcVersionRuntime ? 'gnu' : 'musl'
return triple.abi !== libc
})())
const isCrossForMacOS =
triple.platform === 'darwin' && process.platform !== 'darwin'
const cargo = process.env.CARGO ?? isCrossForWin ? 'cargo-xwin' : 'cargo'
Expand Down

0 comments on commit a85bc3b

Please sign in to comment.