add macho dummy lib generation with ld

This commit is contained in:
Brendan Hansknecht 2022-10-22 23:23:09 -07:00
parent d6bdd2aec7
commit dead264798
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
3 changed files with 101 additions and 1 deletions

View file

@ -139,6 +139,11 @@ pub fn generate_dummy_lib(input_path: &Path, triple: &Triple) -> std::io::Result
.collect();
if let EntryPoint::Executable { platform_path, .. } = &loaded.entry_point {
let platform_path = input_path
.to_path_buf()
.parent()
.unwrap()
.join(platform_path);
let dummy_lib = if let target_lexicon::OperatingSystem::Windows = triple.operating_system {
platform_path.with_file_name("libapp.obj")
} else {