<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - many files rebuilt after adding empty commit to llvm repo (cmake + ninja)"
   href="https://bugs.llvm.org/show_bug.cgi?id=34308">34308</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>many files rebuilt after adding empty commit to llvm repo (cmake + ninja)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>cmake
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>matthias.krueger@famsik.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This looks like the worse brother of #33717 .

My setup consists of llvm, clang, clang-tools-extra, compiler-rt, polly, lld,
lldb and openmp repos.
Using cmake and ninja to build only the targets clang LLVMgold llvm-ar
llvm-ranlib lld and afterwards check-llvm check-clang check-lld.

I noticed that ninja would always rebuild ~1900 files even if only a single cpp
file changed after the last pull.

Upon investigating, it turned out that an empty commit (git commit
--allow-empty) in the llvm repo is enough to make ninja rebuilt hundreds of
files. :/

However doing consecutive build without file changes/commits works fine and
ninja continues where it was last stopped.

My full bootstrap script can be found here:
<a href="https://github.com/matthiaskrgr/llvm_bootstrap/blob/master/build_git.sh">https://github.com/matthiaskrgr/llvm_bootstrap/blob/master/build_git.sh</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>