frerich / clcache

A compiler cache for MSVC, much like ccache for gcc
Other
325 stars 83 forks source link

How to support build with two different path & arch compilers in parallel? #343

Closed shijunjing closed 5 years ago

shijunjing commented 5 years ago

Hello, I have a problem to enable the clcache in my Uefi firmware build. My firmware build need both 32bit compiler and 64bit compiler, because some modules need run in 32bits at the begin and others need run in 64bits later on, and my firmware build tool will combine all these modules into one finial image. Not like gcc and clang, the MSVC has different path for these two compilers as below: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Vc\bin\cl.exe C:\Program Files (x86)\Microsoft Visual Studio 14.0\Vc\bin\x86_amd64\cl.exe

If I replace the above two cl.exe with clcache_main.exe, how could I set the CLCACHE_CL to two real cl.exe compilers? Because my firmware build support multithread, so the modules build sequence is not predictable. How to correctly switch the CLCACHE_CL to real cl.exe?

My current thinking is to generate two different clcache_main.exe, which one is to map 32bit cl.exe and the other is to map 64bit cl.exe. However, how to easily let the clcache_main.exe know the correct compiler path?

YngveNPettersen commented 5 years ago

This is probably the same issue as discussed in https://github.com/frerich/clcache/issues/270