Libraries - does the IDE do a conditional compile for libraries?

I suspect the syntax in my question is probably wrong, but what I was asking is does the compiler crunch everything thats in your code/libraries to assembler etc even if the function isnt used? Im sure i read somewhere that it doesnt for main code, but i wondered if that also applies to libraries or nested functions.

for example, if you have a library with 10 functions and in your code you only use 1,2,3, do 4-10 still get compiled and hence take up space on your destination board?

for example, if you have a library with 10 functions and in your code you only use 1,2,3, do 4-10 still get compiled

Yes.

and hence take up space on your destination board?

No.

The linker only links in (to the hex file that gets uploaded) those functions that are actually called.