Menu

switch from visual studio to mingw in 2.20+ ?

4 days ago
4 days ago
  • Daniel Marjamäki

    I have discovered that cppcheck compiled with mingw is drastically faster than cppcheck compiled with visual studio.

    I see that mingw builds are ~3 times faster on several machines.

    You can compare yourself using the artifacts from release-windows and release-windows-mingw actions.

    therefore I believe we should move from visual studio to mingw for the windows release build in the future. However firewave has warned that we are not ready for such a switch yet.

     
  • Daniel Marjamäki

    For me, a basic selfcheck takes ~10 times longer time in windows than in linux. Switching to mingw makes it better but it's still much slower. Maybe something more can be done?
    Command:

    cd path/to/cppcheck
    cppcheck -D__GNUC__ -D__CPPCHECK__ lib
    
     

    Last edit: Daniel Marjamäki 4 days ago
  • CHR

    CHR - 4 days ago

    Most of the selfcheck time seems to be spent on cmdlineparser.cpp, where we burn a lot of cycles unproductively. See https://trac.cppcheck.net/ticket/10765 and https://trac.cppcheck.net/ticket/11262
    If we could fix the underlying issues, that would probably give a much bigger speedup than changing the compiler.

     

    Last edit: CHR 4 days ago
  • Daniel Marjamäki

    I would like that such tickets are fixed also. If you know a suitable person that could fix those for a fixed price let me know. I have no time to look at it.

    Tweaking the build scripts does not rule out that C++ code is tweaked and vice versa.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.