<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">It is with great sadness that I must tell everyone CMake’s Ninja generator is non-deterministic (<a href="https://public.kitware.com/Bug/view.php?id=15968" class="">https://public.kitware.com/Bug/view.php?id=15968</a>).<div class=""><br class=""></div><div class="">I’m not sure if this impacts all versions of CMake, but it certainly impacts all the recent releases. You might ask why this matters? Sadly the non-determinism *does* impact determinism in the final builds. I haven’t fully dug into the extent of the differences, but I was seeing non-reproducibility in LTO builds. Whatever Ninja is doing differently causes LTO to make different optimization decisions. I have verified that this does not impact CMake’s makefile generator.</div><div class=""><br class=""></div><div class="">The important takeaway from this is that if you are building for a purpose where non-determinism can impact your results, don’t use Ninja. For most engineering tasks building and testing locally Ninja, as always, works great. For incremental bots testing correctness, no problem.</div><div class=""><br class=""></div><div class="">Any bots testing performance need to move to a deterministic generator (i.e. Unix Makefiles). Anyone building or testing a release of LLVM or clang for packaging purposes should also use a deterministic generator.</div><div class=""><br class=""></div><div class="">Sorry to be the bearer of bad news…</div><div class=""><br class=""></div><div class="">-Chris</div></body></html>