Closed permotion88 closed 5 years ago
You are using it correctly. It would be desirable but zapcc can't recover the compiler from an error state.
@yrnkrn Is there any workaround that building after error can be faster and not everything will be built from the beginning?
The build system (make/ninja/msbuild) decides when to call the compiler. Build systems do not re-compile a source file unless there is a reason, the source file or one of the includes changed. zapcc clears the compilation cache after an error, but this will not trigger re-compilation of any files that had not changed. It just means zapcc behaves like ordinary compiler for the first file.
It's clear. But I have quite a specific problem, i.e. one main.cpp file that includes many clang header files:
Only the main.cpp file is edited and when errors occur there the next time everything is built from the beginning (It lasts even longer than built with clang)
`
`
Do you think that the use of zapcc in this case is a bad solution, or maybe you have an idea how I could improve the speed of recompilation after an error.
With one file it's a tradeoff: without errors re-compilation will be very fast but with errors it will be somewhat slower than clang. Try not to make errors... or try to use precompiled headers, maybe they will work good for this case.
I understand, thanks for the advice and quick answers!
Does zapccs process should always end if the compiled code contains errors?
I tested it on a simple Hello World program, and when it contains some error, zapccs finishes ...
When programming very often the code is wrong, it means that everything will be compiled from the beginning? This may not be good for larger projects ...
Or do I use something the wrong way?