On Darwin, the build script tries to
1. use llvm-objcopy/llvm-strip from $PATH,
2. if not found by 1., use standard objcopy/strip from $PATH
The brew install instructions recommends to set $PATH to brew's binary
dir, so 2. will find something (assuming binutils is installed from
brew). If $PATH additionally points to brew's LLVM binary dir (which is
different from brew's binary dir), 1. will find the llvm versions of the
tools.
This commit removes additional logic which repeats above steps in a more
implicit way by calling brew internally and figuring out the paths once
more if 1. and 2. cannot find them in the $PATH. This removes
duplication and simplifies the script. Maybe it even helps with
reproducibility.
- instead of repeating Homebrew's installation steps (which may become
outdated), just point to their homepage
- Specify CC and CXX env variables instead of internal CMake variables,
CMake figure out paths to ar, ranlib and objcopy automatically
- use -S and -B parameters available in recent CMake versions to build
directly from the source directory
Remove extra '$' in the bach command list to ease copy-pasteing
Adjust comments for alternatives in commands
Add note about ARM (Apple Silicon) support