hawkw / mycelium

🍄 an alleged 'operating system'
https://mycelium.elizas.website
MIT License
548 stars 20 forks source link

change custom link section to support apple mach-o format #484

Open spookyvision opened 3 months ago

hawkw commented 3 months ago

So, perhaps we could simplify this to just:

#[cfg_attr(target_os = "none", link_section = "MyceliumTests")]

to avoid emitting the attribute at all when not building a Mycelium kernel image?

I don't actually know whether this will work or not, FWIW. If the macOS linker is involved even when linking cross-compiled builds for x86_64-unknown-none, we might have to placate it like this anyway? Up to you if you want to investigate whether we can get away with just not having the attribute.