This is an attempt to fix the issue #30978 .
To briefly summarize, @Sjors found that while compiling dependencies on macOS 15.0 the following “No such file or directory” are generated while these tools are installed.
0$ cd depends
1$ make
2/bin/sh: command -v llvm-ranlib: No such file or directory
3/bin/sh: command -v llvm-strip: No such file or directory
4/bin/sh: command -v llvm-nm: No such file or directory
5/bin/sh: command -v llvm-objdump: No such file or directory
6/bin/sh: command -v dsymutil: No such file or directory
The proposed fix conditionally defines the necessary variables for these tools in the ./depends/Makefile
when building on macOS. The rationale is described in more detail in #30978 (comment) as the Solution number 3.
Update 1:
It turns out that Xcode’s make is not setting the flags that Gnu does as @hebasto described in #30978 (comment). So, to avoid any architectural changes in the depends
directory that may lead to more confusion, the current patch manually sets the required flag in order for the above errors to be resolved.
cc @hebasto