-
Notifications
You must be signed in to change notification settings - Fork 257
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
LOCAL_CFLAGS do not disable warnings in Clang #307
Comments
Is this actually unique to r14? |
I believe it is Clang-specific, we never tried to switch from gcc before.
…On Thu, Mar 2, 2017 at 19:25 Dan Albert ***@***.***> wrote:
Is this actually unique to r14?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#307 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAs8s-eOBwyMcK-_7pBG-Xf2yT8AnnYnks5rhvtrgaJpZM4MRByU>
.
|
Merged into master and I've cherry-picked to r15. It probably won't be in r15 beta 1, but if I need to respin that yet again it will be. |
FYI, I sent an email to one of the owners of the gumbo lib to see if we can get those warnings fixed rather than just suppressed. |
Cool, I did not see reaction from gumbo on my request, and the pull request that fixes this specific warning is pending since Oct 2015. But gumbo is definitely not the only/last library on GitHub that compiles with warnings in Clang, or will compile with warnings in the next version of Clang. That's why a fix for Clang or NDK is required. I believe that it is very important to encourage use of |
Turns out we are respinning beta 1, so I've cherry-picked this. Should be available some time next week. |
fix now available in r15beta1... |
`APP_CFLAGS` is the best place to put things like `-Wall -Werror`, but with Clang the order of warning flags matters. If the Application.mk settings come after the module level settings, modules can't override global settings. Test: ./run_tests.py --filter LOCAL_CFLAGS-beats-APP_CFLAGS Bug: android/ndk#307 Change-Id: I3b7f1488fb2795a3fbbac53226e67b21a85b5b95 (cherry picked from commit 601456b)
`APP_CFLAGS` is the best place to put things like `-Wall -Werror`, but with Clang the order of warning flags matters. If the Application.mk settings come after the module level settings, modules can't override global settings. Test: ./run_tests.py --filter LOCAL_CFLAGS-beats-APP_CFLAGS Bug: android/ndk#307 Change-Id: I3b7f1488fb2795a3fbbac53226e67b21a85b5b95
Description
Switching to Clang from GCC in r14, we have a problem with compilation of some 3rd party libraries, e.g. gumbo-query. See google/gumbo-parser#377 for details.
The problem specific to NDK is that when we switch to Clang, we cannot silence the warnings by tuning LOCAL_CFLAGS for the specific library the way we used to, with GCC. The reason is that when I turn on the warnings with
APP_CFLAGS+=-Wall
, this goes after theLOCAL_CFLAGS
, and with Clang, -Wall overrides -Wno-unused-variable.Environment Details
The text was updated successfully, but these errors were encountered: