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. linker_driver.py 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 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}

Bug: 1324104
Change-Id: Ib3383d22a5c7421d735ba1b4826fc87785978fc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3660903
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1007421}
NOKEYCHECK=True
GitOrigin-RevId: 03e84d6bb3283efb4c7837a8e82b412d0f5cc6ba
diff --git a/compiler/BUILD.gn b/compiler/BUILD.gn
index c90821e..1637e25 100644
--- a/compiler/BUILD.gn
+++ b/compiler/BUILD.gn
@@ -680,9 +680,11 @@
       # of "all" which means number of hardware threads) is faster.
       ldflags += [ "-Wl,--thinlto-jobs=all" ]
       if (is_apple) {
-        ldflags +=
-            [ "-Wl,-cache_path_lto," +
-              rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
+        ldflags += [
+          "-Wl,-cache_path_lto," +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+          "-Wcrl,object_path_lto",
+        ]
       } else {
         ldflags +=
             [ "-Wl,--thinlto-cache-dir=" +