| 54 | write_artifacts: false, |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | pub fn kernel(name: impl Into<String>, source: impl Into<String>) -> Self { |
| 59 | let name = name.into(); |
| 60 | Self { |
| 61 | root: BuildSource::inline(name.clone(), source), |
| 62 | name, |
| 63 | target: TargetMode::Kernel, |
| 64 | entry: None, |
| 65 | stdlib: StdlibPolicy::Explicit(TargetMode::Kernel), |
| 66 | import_closure: ImportClosurePolicy::Enabled { |
| 67 | mangle_symbols: false, |
| 68 | }, |
| 69 | source_prelude: None, |
| 70 | string_prefix: Some("__kern_str_".to_owned()), |
| 71 | link_layout: None, |
| 72 | module_resolver: None, |
| 73 | artifact_root: None, |
| 74 | extra_objects: Vec::new(), |
| 75 | abi_exports: Vec::new(), |
| 76 | run_semantic_analysis: true, |
| 77 | write_artifacts: false, |
| 78 | } |
| 79 | } |