Delete .a file before writing static library.

The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.

This is similar to what Chromium currently does in gcc_toolchain.gni.

Bug: skia:10363
Change-Id: I133deb6da570ca38a539b4f0bb486b61d6a664bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295217
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2020-06-09 23:03:57 -04:00 committed by Skia Commit-Bot
parent 1db8e7990a
commit 3b035e0417

View File

@ -266,7 +266,7 @@ template("gcc_like_toolchain") {
} else {
rspfile = "{{output}}.rsp"
rspfile_content = "{{inputs}}"
command = "$ar rcs {{output}} @$rspfile"
command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile"
}
outputs =