-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLVM build failed for WebAssembly target #92279
Comments
@llvm/issue-subscribers-clang-codegen Author: Bhavya Bhatt (spino17)
I used the following command to build the LLVM for `WebAssembly` target on my mac:
`cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm -DLLVM_TARGETS_TO_BUILD="WebAssembly"`
The `make` command after running the above `cmake` failed by having the following error:
```
[ 76%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/Sparc.cpp.o
/Users/bhavyabhatt/Desktop/bhavya/projects/wasm-llvm/llvm-project/clang/lib/CodeGen/Targets/Sparc.cpp:269:7: error: no matching function for call to 'max'
std::max(CB.DL.getTypeSizeInBits(StrTy).getKnownMinValue(), 1UL), 64));
^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__algorithm/max.h:40:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('llvm::details::FixedOrScalableQuantity<llvm::TypeSize, unsigned long long>::ScalarTy' (aka 'unsigned long long') vs. 'unsigned long')
max(const _Tp& __a, const _Tp& __b)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__algorithm/max.h:51:1: note: candidate template ignored: could not match 'initializer_list<_Tp>' against 'llvm::details::FixedOrScalableQuantity<llvm::TypeSize, unsigned long long>::ScalarTy' (aka 'unsigned long long')
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__algorithm/max.h:61:1: note: candidate function template not viable: requires single argument '__t', but 2 arguments were provided
max(initializer_list<_Tp> __t)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__algorithm/max.h:31:1: note: candidate function template not viable: requires 3 arguments, but 2 were provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
1 error generated.
make[2]: *** [tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/Sparc.cpp.o] Error 1
make[1]: *** [tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/all] Error 2
make: *** [all] Error 2
```
The output of command
|
Thanks a lot @aheejin for mentioning those. Just to make sure that I would change the line mentioned in |
Yeah it looks that commit has fixed the issue. |
Yeah, checked out just now! Thanks a lot for the help @aheejin . I believe working with stable source is much more safer given I just want to build clang library for AST. |
I used the following command to build the LLVM for
WebAssembly
target on my mac:cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm -DLLVM_TARGETS_TO_BUILD="WebAssembly"
The
make
command after running the abovecmake
failed by having the following error:The output of command
clang --version
isThe text was updated successfully, but these errors were encountered: