mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 13:38:30 +00:00
Added:
- `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
This commit is contained in:
@@ -32,6 +32,7 @@ pub fn build(args: &[String]) -> i32 {
|
|||||||
let build_standard = get_config_str(&config, "build.standard");
|
let build_standard = get_config_str(&config, "build.standard");
|
||||||
let build_target = get_config_str(&config, "build.target");
|
let build_target = get_config_str(&config, "build.target");
|
||||||
let build_kind = get_config_str(&config, "build.kind");
|
let build_kind = get_config_str(&config, "build.kind");
|
||||||
|
let build_platform = get_config_str(&config, "build.platform");
|
||||||
let build_cflags = match get_config_list(&config, "build.cflags") {
|
let build_cflags = match get_config_list(&config, "build.cflags") {
|
||||||
Ok(v) => v,
|
Ok(v) => v,
|
||||||
Err(msg) => {
|
Err(msg) => {
|
||||||
@@ -78,6 +79,7 @@ pub fn build(args: &[String]) -> i32 {
|
|||||||
standard: &build_standard,
|
standard: &build_standard,
|
||||||
target_dir: normalize_target(&build_target),
|
target_dir: normalize_target(&build_target),
|
||||||
kind: normalize_kind(&build_kind),
|
kind: normalize_kind(&build_kind),
|
||||||
|
platform: normalize_platform(&build_platform),
|
||||||
include_dirs: &resolved.include_dirs,
|
include_dirs: &resolved.include_dirs,
|
||||||
lib_dirs: &resolved.lib_dirs,
|
lib_dirs: &resolved.lib_dirs,
|
||||||
libs: &resolved.libs,
|
libs: &resolved.libs,
|
||||||
@@ -184,3 +186,12 @@ fn normalize_kind(kind: &str) -> &str {
|
|||||||
let trimmed = kind.trim();
|
let trimmed = kind.trim();
|
||||||
if trimmed.is_empty() { "bin" } else { trimmed }
|
if trimmed.is_empty() { "bin" } else { trimmed }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn normalize_platform(platform: &str) -> Option<&str> {
|
||||||
|
let trimmed = platform.trim();
|
||||||
|
if trimmed.is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(trimmed)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
pub mod clang;
|
pub mod clang;
|
||||||
pub mod gas;
|
pub mod gas;
|
||||||
pub mod gcc;
|
pub mod gcc;
|
||||||
pub mod gas;
|
|
||||||
pub mod msvc;
|
pub mod msvc;
|
||||||
pub mod nasm;
|
pub mod nasm;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user