]> granicus.if.org Git - clang/commit
Retry building modules that were compiled by other instances and are out-of-date
authorBen Langmuir <blangmuir@apple.com>
Tue, 17 Jun 2014 22:35:27 +0000 (22:35 +0000)
committerBen Langmuir <blangmuir@apple.com>
Tue, 17 Jun 2014 22:35:27 +0000 (22:35 +0000)
commit9bef4617c65567453527b199f29b535e56677206
treecdab6aa9b1a9f3677d20460da9cb593ce58d7138
parent59fdf1727f5fd52f76c7aff09597c9bcfe359d78
Retry building modules that were compiled by other instances and are out-of-date

When another clang instance builds a module, it may still be considered
"out of date" for the current instance in a couple of cases*.  This
patch prevents us from giving spurious errors when compilers race to
build a module by allowing the module load to fail when the pcm was
built by a different compiler instance.

* Cases where a module can be out of date despite just having been
built:

1) There are different -I paths between invocations that result in
finding a different module map file for some dependent module. This is
not an error, and should never be diagnosed.

<rdar://problem/16843887>

2) There are file system races where the headers making up a module are
touched or moved. Although this can sometimes mean trouble, diagnosing
it only during a build-race is worse than useless and we cannot detect
this in general.  It is more robust to just rebuild.  This was causing
spurious issues in some setups where only the modtime of headers was
bumped during a build.

<rdar://problem/16157638>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211129 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/CompilerInstance.cpp