Mac: set -obj_path_lto when building with LTO

This temporarily saves intermediate object files (other than cache hits
which are already persisted in the cache directory) so that `dsymutil`
can read the debug info out of them.

This change also adds an argument to linker_driver.py to clean this
directory up after `dsymutil` has run. I'm not sure this is the best
way to do it, so very open to other suggestions.

Bug: 1324104
Change-Id: I001e19b9824ff8bf969c5b713a3e0dbed52e5df5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3650843
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1004779}
NOKEYCHECK=True
GitOrigin-RevId: fb34ab468f55c8c383b31b341544627cb97efb25
1 file changed