LLVM: Dynamic Library Support
dynamic library status:
* Supported: Linux 64bit, Mac OSX 64bit * Unsupported: Linux 32bit, Mac OSX 32bit, Windows 32bit
The LLVM backend doesn't support dynamic libraries at the moment.
LLC supports a flag called '-relocation-mode' that can be used to support this, it takes the following options:
default - let the target choose. static - static code. pic - PIC code. dynamic-no-pic - Dynamic references but static code
This roughly corresponds to GHC -fPIC, and -dynamic flags.
Linux: Simply adding the correct flag to LLC seems to work fine. Mac OSX, Windows: Adding the correct flag doesn't work at all, all programs segfault.