mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 14:38:30 +00:00
- Reworked `dcr.toml` handling: added read, validation, and edit through `core::config` - `new` and `init` use the new config creation logic - `build` and `run` now require `dcr.toml` and read `compiler` and `name` from it
24 lines
516 B
Rust
24 lines
516 B
Rust
pub const PROFILE: &str = "debug";
|
|
pub const FILE_MAIN_C: &str = r#"#include <stdio.h>
|
|
|
|
int main(void) {
|
|
printf("Hello World!\n");
|
|
return 0;
|
|
}
|
|
"#;
|
|
|
|
pub fn flags(profile: &str) -> Option<&'static [&'static str]> {
|
|
match profile {
|
|
"release" => Some(&["-O3", "-DNDEBUG", "-march=native"]),
|
|
"debug" => Some(&[
|
|
"-O0",
|
|
"-g",
|
|
"-Wall",
|
|
"-Wextra",
|
|
"-fno-omit-frame-pointer",
|
|
"-DDEBUG",
|
|
]),
|
|
_ => None,
|
|
}
|
|
}
|