Add explicit search path for linker on macOS.

Linking on macOS is invoked via clang++. If clang++ cannot find ld on the
default search path, clang++ will invoke xcrun to search for ld. This CL
explicitly passes the path to ld if we're using hermetic xcode. This way clang++
will not invoke xcrun.

Bug: 971452
Change-Id: I5bcaa577d9ccc6d3ceca6e2524482e299b371e92
Reviewed-by: Nico Weber <>
Commit-Queue: Erik Chen <>
Cr-Original-Commit-Position: refs/heads/master@{#667154}
Cr-Mirrored-Commit: ea5d6db4f364752de2a5d71e44ced11784475a55
1 file changed