> 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
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
The right way to do this is to set -DCMAKE_OSX_SYSROOT - not to pass
isysroot directly.
-- Tobias
> > -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.
The right way to do this is to set -DCMAKE_OSX_SYSROOT - not to pass
isysroot directly.
-- Tobias
在 2021年5月4日,22:12,Abid Malik via llvm-dev <llvm...@lists.llvm.org> 写道: