If I'm not mistaken, the compiler etc. installed as part of XCode use llvm. But I can't find an llvm-config binary to generate proper flags for command-line compilation to an llvm target. Where is such a thing on macOS?
I know I can install a new llvm via MacPorts or Homebrew, but I don't want to duplicate what's already there; I just want a way to get at the system configuration.
The llvm-config executable is located in bin\Release or bin\Debug , reflecting the build version.
It includes headers and libraries needed to build your own LLVM module. Your LLVM will be installed in /usr/local/opt/llvm .
In the CMakeLists. txt file, look for the line that sets the LLVM_VERSION_MAJOR variable. The MAJOR, MINOR and PATCH versions will give you the exact version of LLVM on which the Apple build is based.
All of Apple's operating systems, iOS, macOS, tvOS and watchOS, are built with LLVM technologies.
llvm-config is used to build programs that would link against LLVM. Xcode does not distribute the LLVM libraries, and does not support linking against clang itself, so llvm-config is of no use in this context. What is your use case?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With