The one thing that may be in common across many software development languages and compilers is that a debug version of any library will be different to a release version.
A release version is typically built with size and performance in mind, and a release version is likely to be optimised, symbols might be stripped, and additional code, memory guards, debug helpers, et cetera, maybe removed from the source (e.g., in the C family, via means of pre-processor defines).
Note however, that this doesn't always imply that a chunk of release code will be smaller than its debug counterpart. For example, in the search for performance, speaking of the C family again, loops might be unrolled - resulting in code which is faster but larger.