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.
This is a fix for daedaleanai/dbt#91
Old object files can linger in an existing archive even if they're removed from the cc.Library rule, causing inconsistent or faulty builds if a lingering .o file contains symbols that are used by current files.
The solution in this CL is to simply delete any existing archive before running the ar file. There is no option to ar to always create a new archive.
I've changed the modifiers to ar: before it was "ar rv" and now it's "ar rcs".
The "v" modifier produces verbose output, and the absence of "c" causes a warning to be produced if the archive doesn't already exist. I think with the new modifiers there's no need to pipe stdout and stderr to /dev/null.
The added "s" modifier adds an index to the archive. I think this isn't necessary with gnu ar, but maybe it's helpful for other toolchains (and very unlikely to be unhelpful).