Merge pull request #3410 from rtfeldman/merge-macho-progress

port all macho linker work to trunk and make it mergable
This commit is contained in:
Richard Feldman 2022-07-16 16:04:42 -04:00 committed by GitHub
commit 6389dba5b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 1921 additions and 627 deletions

View file

@ -287,13 +287,7 @@ pub fn build_file<'a>(
let link_start = SystemTime::now();
let problems = match (linking_strategy, link_type) {
(LinkingStrategy::Surgical, _) => {
roc_linker::link_preprocessed_host(target, &host_input_path, app_o_file, &binary_path)
.map_err(|err| {
todo!(
"gracefully handle failing to surgically link with error: {:?}",
err
);
})?;
roc_linker::link_preprocessed_host(target, &host_input_path, app_o_file, &binary_path);
problems
}
(LinkingStrategy::Additive, _) | (LinkingStrategy::Legacy, LinkType::None) => {
@ -399,8 +393,7 @@ fn spawn_rebuild_thread(
exported_symbols,
exported_closure_types,
target_valgrind,
)
.unwrap();
);
}
LinkingStrategy::Legacy => {
rebuild_host(

View file

@ -488,7 +488,7 @@ pub fn build(
let linking_strategy = if wasm_dev_backend {
LinkingStrategy::Additive
} else if !roc_linker::supported(&link_type, &triple)
} else if !roc_linker::supported(link_type, &triple)
|| matches.value_of(FLAG_LINKER) == Some("legacy")
{
LinkingStrategy::Legacy