3 ms·
Recent tests with link time optimization give me the impression that code which is not actually called is not included (or even resolved). If you can convince t
by roeles 3y ago
Recent tests with link time optimization give me the impression that code which is not actually called is not included (or even resolved). If you can convince the compiler that the destructor is never called, it might not include it.
- ooterness 3y agoYes, that's correct. Assuming "-ffunction-sections" is set during compilation, and "--gc-sections" is set during linking, it'll drop any unreachable code. Sadly, small oversights (e.g., exception handling for undefined virtual methods) can cause disproportionate bloat.