This "solves" the ODR violations by making the linker firewall a feature. llvm
libraries used by liblldb are considered to be private implementation details and
we do not provide them to the users. If some of them want to use llvm for their
private purposes, they should include their own copy. LLDB_EXPORT_ALL_SYMBOLS=OFF
is the official way of building liblldb, and the =ON version is a hack to make
backtrace(3) output more useful on linux. It still should not affect the way
dependant executables are linked, as none of them should be using lldb_private
symbols in the first place.
We need to be careful to not use llvm classes anywhere along the API boundary, or
bad things will happen. With our current SB API policy this should not be a
problem, but we may need to revisit this decision if that changes.
This is my less preferred solution, as it increases code size, and has potential
to introduce latent bugs.