update preprocess host API

This commit is contained in:
Luke Boswell 2024-06-13 19:10:32 +10:00
parent f8c6786502
commit ee84b61360
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
5 changed files with 79 additions and 45 deletions

View file

@ -365,27 +365,24 @@ fn stub_lib_is_up_to_date(target: Target, stub_lib_path: &Path, custom_names: &[
pub fn preprocess_host(
target: Target,
platform_main_roc: &Path,
preprocessed_path: &Path,
shared_lib: &Path,
stub_dll_symbols: &[String],
host_path: &Path,
platform_path: &Path,
dylib_path: &Path,
verbose: bool,
time: bool,
) {
let metadata_path = platform_main_roc.with_file_name(metadata_file_name(target));
let host_exe_path = if target.operating_system() == OperatingSystem::Windows {
platform_main_roc.with_file_name("dynhost.exe")
} else {
platform_main_roc.with_file_name("dynhost")
};
let preprocessed_path = platform_path.with_file_name(format!("{}.rh", target));
let metadata_path = platform_path.with_file_name(metadata_file_name(target));
preprocess(
target,
&host_exe_path,
host_path,
&metadata_path,
preprocessed_path,
shared_lib,
stub_dll_symbols,
false,
false,
preprocessed_path.as_path(),
dylib_path,
&[],
verbose,
time,
)
}

View file

@ -1088,7 +1088,7 @@ fn gen_macho_le(
}
}
offset += dbg!(cmd_size);
offset += cmd_size;
}
// cmd_loc should be where the last offset ended