rust-cross / cargo-zigbuild

Compile Cargo project with zig as linker
MIT License
1.43k stars 51 forks source link

extend musl weak symbols mapping #180

Closed reubenmiller closed 11 months ago

reubenmiller commented 11 months ago

Extending the musl weak symbol mappings to resolve https://github.com/rust-cross/cargo-zigbuild/issues/179.

The symbol list was generated via scrapping the header files from the musl source code at (http://git.musl-libc.org/cgit/musl/)

fyi: I'm fairly new at the compiler stuff, so if this PR went to far than I'm happy to adjust as directed.

reubenmiller commented 11 months ago

Thanks!

I don't think we need to add constants because usually they're just a #define in C, you can't refer to it in Rust so it's not needed here.

Thanks for the assist. I leaned towards adding add #defines since it was generally easier to remove than add.

messense commented 11 months ago

It'd be great if you can confirm that this actually fixes #179 for your project, thanks!

reubenmiller commented 11 months ago

It'd be great if you can confirm that this actually fixes #179 for your project, thanks!

Just added a comment that our project builds on this PR. https://github.com/rust-cross/cargo-zigbuild/issues/179#issuecomment-1713192771