简体   繁体   中英

how can i get compilation, assembling, preprocessor and linking time separately for g++

We are working on reducing build time for our code which have multiple libraries and cpp files . I want to check which step is taking more time out of compilation, assembling, preprocessor and linking. Is there any way i can get separate time for total project?

Please suggest. Any kind of help/pointer/suggestions will be appreciated. I am building using make on my debian system.

Have you tried gcc 's

'-time[=FILE]' Report the CPU time taken by each subprocess in the compilation sequence. For C source files, this is the compiler proper and assembler (plus the linker if linking is done).

Without the specification of an output file, the output looks like this:

  # cc1 0.12 0.01 # as 0.00 0.01 … 

? (This is from the manual .)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM