[cmake-developers] [CMake 0015968]: Ninja generator is non-deterministic
Mantis Bug Tracker
mantis at public.kitware.com
Wed Feb 10 12:13:57 EST 2016
The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=15968
======================================================================
Reported By: Chris
Assigned To:
======================================================================
Project: CMake
Issue ID: 15968
Category: CMake
Reproducibility: always
Severity: major
Priority: high
Status: new
======================================================================
Date Submitted: 2016-02-10 12:13 EST
Last Modified: 2016-02-10 12:13 EST
======================================================================
Summary: Ninja generator is non-deterministic
Description:
CMake's Ninja generator is non-deterministic on our project (LLVM). This is
trivially reproducible by configuring llvm into a clean directory multiple times
and comparing the results.
This is a very real problem for our project because the nondeterminism in the
generated ninja build seems to be the cause of non-determinism in our build
outputs. One of the important methods of compiler testing is what we call a
3-stage build. The process is basically:
(1) build clang
(2) use clang from step 1 to build clang again
(3) use clang from step 2 to build clang again
(4) ensure clang from step 2 and clang from step 3 are binary identical
Today this works using the CMake Unix Makefile generator, but not using the
Ninja generator. This issue reproduces on CMake 3.4.x and CMake 3.5.0 rc1. I
assume it probably goes back quite a long ways too.
Steps to Reproduce:
mkdir scratch
cd scratch
cmake -G Ninja <path to llvm>
cp build.ninja ..
rm -rf
cmake -G Ninja <path to llvm>
diff build.ninja ../build.ninja
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-02-10 12:13 Chris New Issue
======================================================================
More information about the cmake-developers
mailing list