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

Function manifest_builds_single_hosted_program

src/build.rs:473–495  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

471 let mut kept: Vec<bool> = units.iter().map(is_root).collect();
472 let mut needed: std::collections::HashSet<String> = units
473 .iter()
474 .zip(&kept)
475 .filter(|(_, keep)| **keep)
476 .flat_map(|(unit, _)| unit.assembled.undefined_symbol_names())
477 .map(str::to_owned)
478 .collect();
479 loop {
480 let mut changed = false;
481 for (index, unit) in units.iter().enumerate() {
482 if kept[index] {
483 continue;
484 }
485 if unit
486 .assembled
487 .global_symbol_names()
488 .any(|symbol| needed.contains(symbol))
489 {
490 kept[index] = true;
491 changed = true;
492 needed.extend(
493 unit.assembled
494 .undefined_symbol_names()
495 .into_iter()
496 .map(str::to_owned),
497 );
498 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected