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:
@@ -1,6 +1,8 @@
|
||||
pub mod clang;
|
||||
pub mod gcc;
|
||||
pub mod gas;
|
||||
pub mod msvc;
|
||||
pub mod nasm;
|
||||
|
||||
pub struct BuildContext<'a> {
|
||||
pub profile: &'a str,
|
||||
@@ -10,6 +12,7 @@ pub struct BuildContext<'a> {
|
||||
pub standard: &'a str,
|
||||
pub target_dir: Option<&'a str>,
|
||||
pub kind: &'a str,
|
||||
pub platform: Option<&'a str>,
|
||||
pub include_dirs: &'a [String],
|
||||
pub lib_dirs: &'a [String],
|
||||
pub libs: &'a [String],
|
||||
@@ -22,6 +25,12 @@ pub fn build(ctx: &BuildContext) -> Result<f64, String> {
|
||||
if compiler.contains("clang-cl") {
|
||||
return msvc::build(ctx);
|
||||
}
|
||||
if compiler == "as" || compiler.contains("gas") {
|
||||
return gas::build(ctx);
|
||||
}
|
||||
if compiler.contains("nasm") {
|
||||
return nasm::build(ctx);
|
||||
}
|
||||
if compiler.contains("gcc") || compiler.contains("g++") {
|
||||
return gcc::build(ctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user