By hardcoding
os=Msys
gcc=arm-none-eabi-gcc
exefile=arm-none-eabi-gcc
inside incdir.sh
time tools/incdir.sh -s arm-none-eabi-gcc/home/Schock/nuttx/nuttx/include
reduced from 180ms to 40ms.

Overall, this reduced build time from 30min to an acceptable 6min.
So incdir.sh is taking too much time in MSYS2

Isn't there a possibility to cache the results of the system checks inside 
incdir.sh?

The cost of getting 'os' is fork + new shell + uname
The cost of gcc is fork + new shell + grep
The cost of exfile if for + new shell + basename

Yes, so that does have to fork a lot of additional shell instances.  Perhaps you could use environment variables to cache results.  I think that Bash can access environment variables without forking.


Reply via email to