I wasn’t expecting a response from you. So, I didn’t put effort in writing a detailed email. I am running macOS Mojave (10.14.6)
Attached build script and test program.
The test program isn’t really of any use. Your script doesn’t succeed in building clang
ninja: error: loading 'build.ninja': No such file or directory
Unable to build llvm
so there isn’t a build of clang available for you to use.
Let me know if you need any more information
Here is the output log:
– Sphinx disabled.
– Linker detection: ld64
– Found OSX_SYSROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
ERRORCould not detect OS X Sysroot. Either install Xcode or the Apple Command Line Tools
That error indicates something is wrong with your compiler toolchain (i.e. what you are using to build llvm/clang/etc…)
– Got ld supported ARCHES: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
– Toolchain supported arches: armv6;armv7;armv7s;arm64;arm64e;arm64_32;i386;x86_64;x86_64h;armv6m;armv7k;armv7m;armv7em
– Finding valid architectures for osx…
CMake Error at projects/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake:68 (message):
Failed to determine SDK version for “macosx” SDK
Call Stack (most recent call first):
This probably means the call to the following command failed
xcodebuild -version -sdk macosx Path
That command should work even with just the “Apple Command Line Tools”. If it doesn’t, then that’s a problem. However, based on the other error message it sounds like something is wrong with compiler toolchain.
– Configuring incomplete, errors occurred!
See also “/Users/aditya/Code/llvm10_x86_64_build_lnx/build_10_x86_64_llvm/CMakeFiles/CMakeOutput.log”.
See also “/Users/aditya/Code/llvm10_x86_64_build_lnx/build_10_x86_64_llvm/CMakeFiles/CMakeError.log”.
ninja: error: loading ‘build.ninja’: No such file or directory
Unable to build llvm
get_llvm_v2.sh is pulling LLVM sources from the wrong location. LLVM moved to a monorepo layout last week and your script is pulling from the unofficial mirror of LLVM on GitHub.
test.cpp (80 Bytes)
get_llvm_v2.sh (4.55 KB)