-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[libc] build with -Werror #73966
[libc] build with -Werror #73966
Conversation
@llvm/pr-subscribers-libc Author: Nick Desaulniers (nickdesaulniers) ChangesA recent commit introduced warnings observable when building unit tests. If the Link: https://github.com/llvm/llvm-project/pull/72763/files#r1410932348 Full diff: https://github.com/llvm/llvm-project/pull/73966.diff 1 Files Affected:
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index d5df27a2dcb4341..da14d4767bff2c6 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -35,6 +35,7 @@ function(_get_common_compile_options output_var flags)
list(APPEND compile_options "-fno-rtti")
list(APPEND compile_options "-Wall")
list(APPEND compile_options "-Wextra")
+ list(APPEND compile_options "-Werror")
list(APPEND compile_options "-Wconversion")
list(APPEND compile_options "-Wno-sign-conversion")
list(APPEND compile_options "-Wimplicit-fallthrough")
|
30b1cc7
to
d7d3189
Compare
Not permitting any warnings is a pretty big change, likely we'll have some failing builds until they're cleaned up. |
Is there a way to rekick presubmit tests? I thought if I forced pushed it would, but now it doesn't seem to be happening. Either I misremember or that's not wired up for llvmlibc like the rest of llvm.
Besides what coverage we have in presubmits, do you know where else I should look for breakages? Are the build bots all considered post submit (and not pre submit). Sorry, I'm new here. |
Unsure, I think there's some |
If you don't want to turn it on globally, but have some specific ones in mind, you can probably use |
I think it will be good for the long term health of the project that we can compile llvmlibc out of the box without warnings. That doesn't preclude the use of -Wno-* to disable warnings that aren't helpful/applicable, but we really should be striving to ensure warnings aren't creeping in. |
How about we add a cmake control flag for this so that other users can control it however fit them, and keep it on by default on our build scripts and bots? |
I don't know how to re-kick them but I ran into the same failure yesterday. I rebased + forced push and it buildkite kicked in |
A recent commit introduced warnings observable when building unit tests. If the unit tests don't fail when warnings are introduced into the build, then we might fail to notice them in the stream of output from check-libc. Link: https://github.com/llvm/llvm-project/pull/72763/files#r1410932348
d7d3189
to
eb6bac4
Compare
done PTAL |
I wonder if we should mention that |
Done in a224d0b, PTAL |
Now that the build bots are explicitly red, I'm happy to revert this as we get things fixed up. |
The GPU build is fine FYI. |
This reverts commit 6886a52. Most of the errors observed in postsubmit have been addressed. We can fix-forward the remaining ones. Link: https://lab.llvm.org/buildbot/#/changes/117129
This reverts commit 6886a52. Most of the errors observed in postsubmit have been addressed. We can fix-forward the remaining ones. Link: https://lab.llvm.org/buildbot/#/changes/117129
-Werror is now a global default as of commit c52b467 ("Reapply "[libc] build with -Werror (llvm#73966)" (llvm#74506)")
This reverts commit 6886a52. Most of the errors observed in postsubmit have been addressed. We can fix-forward the remaining ones. Link: https://lab.llvm.org/buildbot/#/changes/117129
A recent commit introduced warnings observable when building unit tests. If the
unit tests don't fail when warnings are introduced into the build, then we
might fail to notice them in the stream of output from check-libc.
Link: https://github.com/llvm/llvm-project/pull/72763/files#r1410932348