[fontc] Only crater needs unique build file names #1062
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running in the context of crater, gftools builder may be invoked multiple times in parallel, which can cause the generated ninja.build files to overwrite each other.
To fix this, I implemented a scheme where we generate a unique name for the generated build file, so that multiple could exist and be in use for the same project, at the same time.
These files can pile up, though; I had initially thought they were cleaned up by default, but that doesn't seem to be the case.
This patch makes it so we only use this new naming scheme if we're running for crater, and uses the old names otherwise.
It also makes it so we always set the cleanup flag if we're running for crater.