Commit 7dc6057
committed
[CMake] Workaround stale object files causing rebuilds
Consider the case of A -> B. The previous workaround will add a
`forced-B-dep.swift` to A that is touched if B rebuilds. So if B is
rebuilt, A is also rebuilt. But A itself has no real changes, and so
none of its object files are built and none of the mtimes are updated.
Thus, A is then rebuilt again on the next run because its input
(`forced-B-dep.swift`) is newer than the corresponding object file. To
prevent this, update the mtime for the library and object files after the
build (which is actually a link step that both compiles and links).1 parent bcaad6d commit 7dc6057
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
33 | 44 | | |
34 | 45 | | |
35 | 46 | | |
| |||
0 commit comments