Lesma
Lesma copied to clipboard
LLVM extern (C) function declarations have a buggy behavior when it comes to exporting them
LLVM by default without optimizations seems to delete dead function declarations. If I try and mark a function as extern, there's no related flag in LLVM to mark the declaration. A good example is the exit function from base.les. It gets optimized away if it's not used, and a dummy function and call have been made, but they seem buggy too, it's not exported properly.