mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 13:18:29 +00:00
- `sharedlib` build kind (shared library output) - ASM projects (`build.language = "asm"`) - NASM and GAS backends - `build.platform` architecture hint for `-march` / `/arch` - Basic CLI integration tests
21 lines
751 B
Rust
21 lines
751 B
Rust
pub fn bin_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
|
match target_dir {
|
|
Some(dir) => format!("{}/{}", dir.trim_end_matches('/'), name),
|
|
None => format!("./target/{profile}/{name}"),
|
|
}
|
|
}
|
|
|
|
pub fn lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
|
match target_dir {
|
|
Some(dir) => format!("{}/lib{}.a", dir.trim_end_matches('/'), name),
|
|
None => format!("./target/{profile}/lib{name}.a"),
|
|
}
|
|
}
|
|
|
|
pub fn shared_lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
|
match target_dir {
|
|
Some(dir) => format!("{}/lib{}.dylib", dir.trim_end_matches('/'), name),
|
|
None => format!("./target/{profile}/lib{name}.dylib"),
|
|
}
|
|
}
|