I am currently working on a C++ library where each individual compilation unit is taking tens of seconds to compile using gcc, likely due to extensive use of header-only libraries. Is there some method or tool to tell exactly what steps of the compilation process and/or which specific includes are causing the bunk of the compilation time?
Asked
Active
Viewed 77 times
0
-
If the header-only libraries are some external libraries, you could use [Precomplied Header](https://en.wikipedia.org/wiki/Precompiled_header) technic to reduce compilation time. – Ghasem Ramezani Aug 26 '21 at 14:38
-
Dupe: https://stackoverflow.com/questions/13559818/profiling-the-c-compilation-process – rustyx Aug 26 '21 at 14:40