MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / manifest_builds_import_closure_program

Function manifest_builds_import_closure_program

src/build.rs:498–537  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

496 .map(str::to_owned),
497 );
498 }
499 }
500 if !changed {
501 break;
502 }
503 }
504 units
505 .into_iter()
506 .zip(kept)
507 .filter_map(|(unit, keep)| keep.then_some(unit))
508 .collect()
509 }
510
511 fn compile_stdlib(
512 manifest: &BuildManifest,
513 ) -> Result<Vec<(String, AssembledOutput)>, BuildError> {
514 let mode = match manifest.stdlib {
515 StdlibPolicy::None => return Ok(Vec::new()),
516 StdlibPolicy::ForTarget => manifest.target,
517 StdlibPolicy::Explicit(mode) => mode,
518 };
519 CompilationPipeline::compile_stdlib_objects(mode).map_err(BuildError::Compile)
520 }
521
522 // The source path feeds the pc-to-source line table so the debugger maps back to it.
523 fn assemble_asm_root(
524 pipeline: &mut CompilationPipeline,
525 source: &LoadedSource,
526 ) -> Result<BuiltUnit, BuildError> {
527 let file = source
528 .source_path
529 .as_ref()
530 .map(|path| path.to_string_lossy().replace('\\', "/"));
531 let tokens = asm_to_binary::parse_asm_source(file.as_deref(), &source.source);
532 pipeline.set_artifact_stem(Some(source.name.clone()));
533 let assembled = pipeline
534 .assemble_named(&source.name, &tokens)
535 .map_err(|err| BuildError::Assemble(err.message))?;
536 Ok(BuiltUnit {
537 name: source.name.clone(),
538 assembled,
539 })
540 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected