mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
add macho dummy lib generation with ld
This commit is contained in:
parent
d6bdd2aec7
commit
dead264798
3 changed files with 101 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
use target_lexicon::Triple;
|
||||
|
||||
mod elf64;
|
||||
mod macho;
|
||||
mod pe;
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -14,7 +15,7 @@ pub(crate) use pe::APP_DLL;
|
|||
pub fn generate(target: &Triple, custom_names: &[String]) -> object::read::Result<Vec<u8>> {
|
||||
match target.binary_format {
|
||||
target_lexicon::BinaryFormat::Elf => elf64::create_dylib_elf64(custom_names),
|
||||
target_lexicon::BinaryFormat::Macho => todo!("macho dylib creation"),
|
||||
target_lexicon::BinaryFormat::Macho => macho::create_dylib_macho(custom_names, target),
|
||||
target_lexicon::BinaryFormat::Coff => Ok(pe::synthetic_dll(custom_names)),
|
||||
other => unimplemented!("dylib creation for {:?}", other),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue