mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Driver] Write out a record of which files were compiled in a build.
This is important because we might get part-way through the full compilation, overwriting swiftdeps files as we go, and then encounter an error. We don't want to lose information about any decls that have been removed since the previous compile, so we propagate forward the information we already have by saving it to a "build record" file. More simply, this is necessary to track when a file is removed from a target. The next commit will handle reading in this file at the start of a build. Swift SVN r23968
This commit is contained in:
@@ -80,6 +80,11 @@ class Compilation {
|
||||
/// These apply whether the compilation succeeds or fails.
|
||||
std::vector<std::string> TempFilePaths;
|
||||
|
||||
/// Write information about this compilation to this file.
|
||||
///
|
||||
/// This is used for incremental builds.
|
||||
std::string CompilationRecordPath;
|
||||
|
||||
/// The number of commands which this compilation should attempt to run in
|
||||
/// parallel.
|
||||
unsigned NumberOfParallelCommands;
|
||||
@@ -130,6 +135,11 @@ public:
|
||||
EnableIncrementalBuild = false;
|
||||
}
|
||||
|
||||
void setCompilationRecordPath(StringRef path) {
|
||||
assert(CompilationRecordPath.empty() && "already set");
|
||||
CompilationRecordPath = path;
|
||||
}
|
||||
|
||||
/// Asks the Compilation to perform the Jobs which it knows about.
|
||||
/// \returns result code for the Compilation's Jobs; 0 indicates success and
|
||||
/// -2 indicates that one of the Compilation's Jobs crashed during execution
|
||||
|
||||
Reference in New Issue
Block a user