Why am I forced to install xcode on my machine to build compiler-rt? Even after installing xcode and building clang+compiler-rt from source, clang++ couldn't build a simple test cpp code. What should I do to fix this? After deleting your code, it worked fine.
Thank you very much for ruining a week of my time. I wish you documented it somewhere
Re: MacOS compiler-rt build failed with master branch
On Sat, 26 Oct 2019 at 22:32, Aditya Atluri <[hidden email]> wrote: > > Hi Dan, > 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...)
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.
> > projects/compiler-rt/cmake/config-ix.cmake:401 (darwin_test_archs) > > projects/compiler-rt/CMakeLists.txt:234 (include) > > > > -- 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
Your script `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.