Merge pull request #1035 from napi-rs/zig-cross-fix

This commit is contained in:
LongYinan 2022-01-17 20:25:34 +08:00 committed by GitHub
commit 859b422ba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,12 @@ function processZigLinkerArgs(platform: string, args: string[]) {
return newArgs
}
if (platform.includes('linux')) {
return args.filter((arg) => arg !== '-lgcc_s' && arg !== '-lunwind')
return args.map((arg) => {
if (arg === '-lgcc_s') {
return '-lunwind'
}
return arg
})
}
return args
}