3 ms·
-Wl,-O1 Did you know that you also have an optimization flag for the linker ? Now you know! Ages ago the linker on SUN used to compile templates. What is GCC d
by bjerun 13y ago
-Wl,-O1 Did you know that you also have an optimization flag for the linker ? Now you know!
Ages ago the linker on SUN used to compile templates. What is GCC doing/using this flag for?
- deleted 13y ago[deleted]
- zimpenfish 13y ago"Optimising the linked output" seems a bit vague but that's about as clear as the man page. If level is a numeric values greater than zero ld optimizes the output. This might take significantly longer and therefore probably should only be enabled for the final binary. At the moment this option only affects ELF shared library generation.
- pja 13y agoSee this LWN article: http://lwn.net/Articles/192624/ http://lwn.net/Articles/192624/
- bjerun 13y agoSo it is not really optimizing the code - more like optimizing the symbol table?
- pja 13y agoYes, looks like it. The default symbol lookup can be really slow in some situations, especially in large C++ projects with can contain many symbols that share a long common prefix thanks to C++ name mangling.