Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clean up architectures for precompiled binaries #2137

Merged
merged 1 commit into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/plugins/core/bun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ fn os() -> &'static str {
}

fn arch() -> &'static str {
if cfg!(target_arch = "x86_64") || cfg!(target_arch = "amd64") {
if cfg!(target_arch = "x86_64") {
if cfg!(target_feature = "avx2") {
"x64"
} else {
"x64-baseline"
}
} else if cfg!(target_arch = "aarch64") || cfg!(target_arch = "arm64") {
} else if cfg!(target_arch = "aarch64") {
"aarch64"
} else {
&ARCH
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/core/deno.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ fn os() -> &'static str {
}

fn arch() -> &'static str {
if cfg!(target_arch = "x86_64") || cfg!(target_arch = "amd64") {
if cfg!(target_arch = "x86_64") {
"x86_64"
} else if cfg!(target_arch = "aarch64") || cfg!(target_arch = "arm64") {
} else if cfg!(target_arch = "aarch64") {
"aarch64"
} else {
&ARCH
Expand Down
9 changes: 3 additions & 6 deletions src/plugins/core/go.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,11 @@ fn platform() -> &'static str {
}

fn arch() -> &'static str {
if cfg!(target_arch = "x86_64") || cfg!(target_arch = "amd64") {
if cfg!(target_arch = "x86_64") {
"amd64"
} else if cfg!(target_arch = "i686") || cfg!(target_arch = "i386") || cfg!(target_arch = "386")
{
"386"
} else if cfg!(target_arch = "armv6l") || cfg!(target_arch = "armv7l") {
} else if cfg!(target_arch = "arm") {
"armv6l"
} else if cfg!(target_arch = "aarch64") || cfg!(target_arch = "arm64") {
} else if cfg!(target_arch = "aarch64") {
"arm64"
} else {
&ARCH
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/core/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ fn os() -> &'static str {
}

fn arch() -> &'static str {
if cfg!(target_arch = "x86_64") || cfg!(target_arch = "amd64") {
if cfg!(target_arch = "x86_64") {
"x86_64"
} else if cfg!(target_arch = "armv6l") || cfg!(target_arch = "armv7l") {
} else if cfg!(target_arch = "arm") {
"arm32-vfp-hflt"
} else if cfg!(target_arch = "aarch64") || cfg!(target_arch = "arm64") {
} else if cfg!(target_arch = "aarch64") {
"aarch64"
} else {
&ARCH
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/core/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ fn python_arch(settings: &Settings) -> &str {
if let Some(arch) = &settings.python_precompiled_arch {
return arch.as_str();
}
if cfg!(all(os = "linux", target_arch = "x86_64")) {
if cfg!(all(target_os = "linux", target_arch = "x86_64")) {
if cfg!(target_feature = "avx512f") {
"x86_64_v4"
} else if cfg!(target_feature = "avx2") {
Expand Down
9 changes: 3 additions & 6 deletions src/plugins/core/zig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,11 @@ fn os() -> &'static str {
}

fn arch() -> &'static str {
if cfg!(target_arch = "x86_64") || cfg!(target_arch = "amd64") {
if cfg!(target_arch = "x86_64") {
"x86_64"
} else if cfg!(target_arch = "i686") || cfg!(target_arch = "i386") || cfg!(target_arch = "386")
{
"i386"
} else if cfg!(target_arch = "aarch64") || cfg!(target_arch = "arm64") {
} else if cfg!(target_arch = "aarch64") {
"aarch64"
} else if cfg!(target_arch = "armv7a") {
} else if cfg!(target_arch = "arm") {
"armv7a"
} else if cfg!(target_arch = "riscv64") {
"riscv64"
Expand Down
Loading