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