[cmake-developers] cmake build does too much work

Ben Boeckel ben.boeckel at kitware.com
Thu Dec 12 12:48:57 EST 2013


On Thu, Dec 12, 2013 at 11:46:24 -0500, Matthew Woehlke wrote:
> Actually... back up for a moment. Since we're talking about dynamic
> libraries here (none of this applies to static I think; in that case
> you must always relink), how would a non-ABI change in liba.so cause
> the result of linking to be different? I didn't think dynamic linking
> involved *copying* symbols from liba into libb?

True. Thinking about it more, I do agree with Bill that pretty much any
intentional ABI change is going to have something in a header change in
common code; you could certainly *try* and break this pretty easily by
removing implementations of functions or template specializations,
creating symbol collisions, and probably more. However, these sound like
errors that would occur anyways with fairly explicit errors at runtime
(maybe not duplicate symbols). What I'm worried about are problems where
a link would have resolved it, but it's some weird, subtle, error at
runtime.

Also, how would this interact with link-time optimization? I don't seem
much on how (if at all) LTO works with shared linking, but there do seem
to be bugs[1][2].

--Ben

[1]http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200
[2]http://stackoverflow.com/questions/19593919/lto-and-virtual-destructor-weirdness-c



More information about the cmake-developers mailing list