Reland "Mac: set -obj_path_lto when building with LTO"

This is a reland of commit fb34ab468f55c8c383b31b341544627cb97efb25

Potential fix in patchset 3. Now, each linker invocation gets its own
temp directory. is responsible for creating the temp
directory and passing it to the linker.

Original change's description:
> 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 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:
> Reviewed-by: Nico Weber <>
> Commit-Queue: Leonard Grey <>
> Cr-Commit-Position: refs/heads/main@{#1004779}

Bug: 1324104
Change-Id: Ib3383d22a5c7421d735ba1b4826fc87785978fc5
Reviewed-by: Nico Weber <>
Reviewed-by: Robert Sesek <>
Commit-Queue: Leonard Grey <>
Cr-Commit-Position: refs/heads/main@{#1007421}
GitOrigin-RevId: 03e84d6bb3283efb4c7837a8e82b412d0f5cc6ba
1 file changed