clang build script: Explicitly set LLVM_DEFAULT_TARGET_TRIPLE

For Linux and Windows, this explicitly sets LLVM_DEFAULT_TARGET_TRIPLE
to what it currently is implicitly, so no change there at all.

The prebuilt intel clang on macOS currently has the default triple
x86_64-apple-darwin19.6.0. This changes it to just x86_64-apple-darwin
Per the version number at the
end is currently ignored, so this should be a noop.

For prebuilt arm clang on macOS, this changes the default triple from
x86_64-apple-darwin19.6.0 to arm64-apple-darwin : The clang/arm binary
now produces arm binaries by default. This doesn't affect the Chromium
build which sets an explicit triple (or at least passes an explicit
`-arch` flag), but it makes it easier to use the clang/arm binary to
locally build small test programs. And it makes the goma machinery need
slightly less code to support goma on mac/arm.

Bug: 1103322
Change-Id: If350d8b2a3f5ca48bd34752839973f1be61b7cec
Commit-Queue: Lei Zhang <>
Reviewed-by: Hans Wennborg <>
Cr-Commit-Position: refs/heads/master@{#872629}
GitOrigin-RevId: 2960c2b9c0e4d25c2c0f056abfa25f265013191f
2 files changed