These functions were the only inline C API functions. This makes it impossible to bind these useful functions from non-C languages via FFI as they rely on symbols for these functions existing.
Details
Diff Detail
Event Timeline
@nagisa, they are deliberately inline and deliberately unavailable for FFI use. After your change, every single executable statically linking to Target will link every individual backend, which makes them at least 200-500MB larger and increases link times by 10-60s (ballpark numbers).
Hmm… would having a libLLVMAllTargets.a or something along the lines solve this particular issue?
tools/opt/CMakeLists.txt | ||
---|---|---|
2 ↗ | (On Diff #65268) | When a tool is linked statically, it generates such a command line: clang ... lib/libTargetStuffs.a ... lib/libTarget.a ... These are order-dependent and if libTarget is linked after libTargetStuffs linking errors occur. |
I updated the thing to build another library libLLVMAllTargets (bikeshed on library name or placement welcome) and confirmed that the bin directory doesn’t get much larger with this change. I also confirmed by hand that libLLVM-4.0svn.so now contains said symbols.
Hopefully all the other comments also got addressed.
Empty line