4 ms·
Even specifying `eh_unwind_resume` as a lang item gives me a linking error in debug builds.
by jefftime 9y ago
Even specifying `eh_unwind_resume` as a lang item gives me a linking error in debug builds.
- steveklabnik 9y agoDid you define them exactly the same way? Every aspect has to be identical; extern, no mangle, function name, arguments, lang item. If this happens to be open source, I can take a look at it.
- jefftime 9y agoI just whipped this up yesterday to test if I was still having the same issues. Debug fails to build with a linking error "undefined reference to `_Unwind_Resume`". Release build works fine. I'm using rustc 1.25.0-nightly on Ubuntu 17.10 https://gist.github.com/jefftime/d7e96461138b5aa6895550b63caac66c https://gist.github.com/jefftime/d7e96461138b5aa6895550b63ca...
- steveklabnik 9y agoThe lang item symbol names need to be prefixed with rust_ like this: https://gist.github.com/steveklabnik/5abd59a8fe7e5abda3db58bd8c208fbb https://gist.github.com/steveklabnik/5abd59a8fe7e5abda3db58b...
- jefftime 9y agoThis didn't fix the compilation errors for me. I can set my own no_mangle pub extern `_Unwind_Resume` function (without declaring it a lang_item) and fix the undefined reference that way, but I'm pretty sure that's not how one's supposed to solve this
- steveklabnik 9y agoHm, it compiled for me. Well, it didn't know about the C functions that were being linked in, but it didn't complain about the lang items. You should file a bug, maybe.