I am just beginning to learn about link-time optimization, so I am not sure if this is a stupid question.
I am writing a library largely for use within our organization. There are a large number of classes, with both public and private functions, and a very small subset of the public functions are exported in the form of a Python module using Boost. All other functions, both public and private, are used within the library only. I tried using -flto -fuse-linker-plugin, and found a non-trivial improvement in performance. I am wondering if it is possible to convey to the optimizer that any function, except those exported to Python, maybe optimized, since the library will be used solely through the python module.
I'd appreciate any advice/suggestions.