-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
builtin: link user32 for boehm GC on Windows #20767
Conversation
Before this commit, V didn't link with user32 on Windows for compilers other than tcc, so the MessageBoxA call in gcboehm was an unresolved symbol. This fixes vlang#20724.
Hm, the issue says that you are working in a 64bit windows environment 🤔, weird. |
The above used this to compile the GC code in thirdparty\libgc\gc.c: clang -std=c99 -D_DEFAULT_SOURCE -fwrapv -D GC_NOT_DLL=1 -D GC_WIN32_THREADS=1 \
-D GC_BUILTIN_ATOMIC=1 -D GC_THREADS=1 -I "D:\programs\v\thirdparty\libgc\include" \
-o "C:\Users\delia\.vmodules\cache\15\15b737768ed213bcb57ac57f6af5d433.module.builtin.o" \
-c "D:\programs\v\thirdparty\libgc\gc.c" which also passed for me without warnings. |
What is your clang version @zeozeozeo ? |
clang version 18.1.0rc |
Can you please try this separately, in the root folder of the project:
|
this works and outputs the x.o file with 32 warnings (https://pastebin.com/8s6qQCr6) |
I use the clang bundled with LLVM: https://github.com/llvm/llvm-project/releases |
Yes, I can confirm, it fails with clang from the official release:
|
With the change in this PR, it works with the LLVM's clang too. Excellent work. |
Before this commit, V didn't link with user32 on Windows for compilers other than tcc, so the MessageBoxA call in gcboehm was an unresolved symbol.
This fixes #20724.