mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 11:38:30 +00:00
Add full FreeBSD, OpenBSD, NetBSD, and DragonflyBSD target support
This commit is contained in:
@@ -160,15 +160,26 @@ fn run_project(
|
||||
let mut target = flags.target.clone();
|
||||
if target.is_none() {
|
||||
let default_target = if cfg!(target_os = "linux") {
|
||||
"x86_64-unknown-linux-gnu"
|
||||
format!("{}-unknown-linux-gnu", std::env::consts::ARCH)
|
||||
} else if cfg!(target_os = "macos") {
|
||||
"x86_64-apple-darwin"
|
||||
"x86_64-apple-darwin".to_string()
|
||||
} else if cfg!(target_os = "windows") {
|
||||
"x86_64-pc-windows-msvc"
|
||||
"x86_64-pc-windows-msvc".to_string()
|
||||
} else if cfg!(any(
|
||||
target_os = "freebsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "dragonfly"
|
||||
)) {
|
||||
format!(
|
||||
"{}-unknown-{}",
|
||||
std::env::consts::ARCH,
|
||||
std::env::consts::OS
|
||||
)
|
||||
} else {
|
||||
"unknown"
|
||||
"unknown".to_string()
|
||||
};
|
||||
target = Some(default_target.to_string());
|
||||
target = Some(default_target);
|
||||
}
|
||||
|
||||
let build_kind = config
|
||||
|
||||
Reference in New Issue
Block a user