How to prevent inclusion of unnecessary libraries?
The Arduino IDE build script will actually copy all core source code file to the tmp directory, compile and generate an archive file. The sketch is compiled and linked with this library. Only the referenced (used) functions and data are linked in the binary. 

The size (both program and data) of this blink is somewhat larger than the "standard" blink example but this is due to the publisher-subscriber run-time. 

Cheers!

PS: If you google you can find commands to listing what is actually in the generated binary. Here is a starting point.