Makes it easy to change Command Line Tools (like by
using DEVELOPER_DIR) without changing/getting influenced
by PATH etc.
I just searched COMMAND in the code. LMK if there are other
invocations on macOS that should be done via xcrun.
Differential D10842
macOS/CMake: invoke tools via xcrun Authored by Ankit Meel (ankitm) on Mar 28 2021, 1:47 PM.
Details
Makes it easy to change Command Line Tools (like by I just searched COMMAND in the code. LMK if there are other
Diff Detail
Event TimelineComment Actions Is this solving a specific problem you encountered? If we need to e.g. use xcrun xcode-select or xcrun xcodebuild to solve some specific problem, that seems reasonable. But it's not obvious to me that in general adding this to as many commands as possible is helpful.
Comment Actions
In platform_apple.cmake, instead of [checking for Xcode, and if it fails resorting to /Library CLTs], xcrun could directly choose the appropriate CLTs as per the environment variables. It also does all the heavy lifting of finding the SDK in the CLTs.
Indeed it's not. It'd also add some time penalty.. see the speed of xcrun date vs `date. Comment Actions But which problem is this solving? Did you actually find situation where xcodebuild and xcrun xcodebuild do something different? | ||||||||||||||||||||||||||