This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

precompiled headers



Hi,

Can I use precompiled headers in  CCSv3.3 to speed up compilation time?

  • Unfortunately, no.  There are build options for precompiled headers.  In common practice, however, they don't usually save build time.

    -George

     

  • 4.5 years later: is this still valid as of CGT 7.3.8?

    We tried the "--pch" option, but it has no impact on build time whatsoever. 

    It seems that the precompiled headers are not used at all, compiler says

    Warning: memory usage conflict with precompiled header file "precomp.pch"

    Thanks,

    /alex

  • Alexander Ost said:
    4.5 years later: is this still valid as of CGT 7.3.8?

    Unfortunately, yes.  Our roadmap calls for us to remove support for precompiled headers.

    Thanks and regards,

    -George

  • Thanks.

    Background of my question is this:

    We're at a point where build times with CGT become exceedingly large, even on a powerful (Linux) server.

    Is there any support for distributed builds, e.g. with distcc? I see that distcc is mainly designed for the gcc family of compilers, but could it be extended to support CGT as well?

    Regards

    /alex

  • Alex - if you are using CCSv5 and greater, and have a multi-core PC, have you tried enabling parallel build support? It can speed up the build time for large projects.

    http://processors.wiki.ti.com/index.php/Projects_and_Build_Handbook_for_CCS#Parallel_builds

    Thanks

    ki

  • Yes, we're using all 24 cores of our build servers (with CGT 7.3.8 on Linux); still, this is too slow.

    We do have more servers, so my questions is how those can be used to accelerate the build in a distributed setup.

    "distcc" looks like a straightforward and highly scalable solution for that, but is tailored towards gcc.

    Thanks,

    /alex

  • Our build was taking an extraordinarily long time.  I was able to improve the build time by doing a few things:

    • splitting the project into libraries
    • reducing the number of includes

    The code base had several distinct (although highly coupled) groups of features that I was able to partition a little bit.  Then I went through and started using forward declarations and removing a few key extra includes, which helped improve the compile speed of each file.  It also seemed to improve the link time from about 2 minutes to 30 seconds (although still much too long in my mind.)

    Now for normal development we only have to wait for a fraction of the code to compile.  Our Jenkins server still does a clean build of everything, but with some more setup we could have it build each of the libraries separately, and then pull in the latest version when we build the  main application.  That hasn't reached priority level yet, though.

  • Alexander Ost said:
    Is there any support for distributed builds, e.g. with distcc?

    The compiler contains nothing to either aid or hinder distributed builds.  I don't know anything about distcc.  I suspect you are correct that it presumes the compiler interface is very similar to gcc.  That is not the case with the TI compiler.

    Thanks and regards,

    -George