HomeFreeBSD

cross-build make.py: Handle lld brew packages on macOS

Description

cross-build make.py: Handle lld brew packages on macOS

Homebrew uses separate packages for llvm and lld starting with llvm19.
To handle this case automatically, pass the binary_name to
default_cross_toolchain() and only use the automatic path for a given
binary if the binary is found in the path (not just if the directory
exists). Add a second clause for ld.lld that looks for a lld package
if lld wasn't found in the llvm directory.

Note that manually specifying the path cannot use a single
--cross-bindir option. Instead, XLD must be manually set in addition
to --cross-bindir when requesting a specific version.

Reviewed by: arichardson
Differential Revision: https://reviews.freebsd.org/D51653

Details

Provenance
jhbAuthored on Aug 6 2025, 8:13 PM
Reviewer
arichardson
Differential Revision
D51653: cross-build make.py: Handle lld brew packages on macOS
Parents
rG66b5296f1b29: ctld: Add support for NVMe over Fabrics
Branches
Unknown
Tags
Unknown