[llvm-dev] Building LLVM on Mac

Boris Boesler via llvm-dev llvm-dev at lists.llvm.org
Tue May 4 02:06:40 PDT 2021


Hi.

> I am trying to build the framework on MacBook but getting errors while compilation; e.g., some are 
> 
> /Users/abidmalik/Programming/MLIR_target/llvm-project/libcxx/include/wchar.h:137:77: error: use of undeclared identifier 'wcschr'
> wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);}
>                                                                             ^
> /Users/abidmalik/Programming/MLIR_target/llvm-project/libcxx/include/wchar.h:144:87: error: use of undeclared identifier 'wcspbrk'
> wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);}

I'm building Clang/LLVM on a daily basis on Mac and I get these types of errors when I upgrade/update Xcode. Then I remove the build directory and build everything from scratch.


>  -DCMAKE_C_FLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" -DCMAKE_CXX_FLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk

I do not use option -isysroot. Do these directories exist? I think you do not have to set it.

Boris



More information about the llvm-dev mailing list