Skip to content
Merged
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
12 changes: 8 additions & 4 deletions src/plugins/core/swift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ fn platform_directory() -> String {
} else if let Ok(os_release) = &*os_release::OS_RELEASE {
let settings = Settings::get();
let arch = settings.arch();
if os_release.id == "ubuntu" && arch == "aarch64" {
let retval = format!("{}{}-{}", os_release.id, os_release.version_id, arch);
if os_release.id == "ubuntu" && arch == "arm64" {
let retval = format!("{}{}-aarch64", os_release.id, os_release.version_id);
retval.replace(".", "")
} else {
platform().replace(".", "")
Expand Down Expand Up @@ -254,8 +254,12 @@ fn extension() -> &'static str {

fn architecture(settings: &Settings) -> Option<&str> {
let arch = settings.arch();
if cfg!(target_os = "linux") && arch != "x64" {
return Some(arch);
if cfg!(target_os = "linux") {
return match arch {
"x64" => None,
"arm64" => Some("aarch64"),
_ => Some(arch),
};
Comment on lines -257 to +262
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I'm not familiar with other Linux environments, I'm not sure if this implementation is suitable for anything beyond arm64 Ubuntu

} else if cfg!(windows) && arch == "arm64" {
return Some("arm64");
}
Expand Down
Loading