-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
NDK_ANALYZE=1 is broken #362
Comments
I've made patches fixing NDK_ANALYZE: Every clang toolchain's setup.mk should be patched like this:
And ndk-build script should be patched like this:
Also report dir is changed here from /tmp to <CURRENT_BUILD_DIR>/clang-analyzer-report and splitted by ABI. |
Thanks for the report (and thanks even more for the patches!). I'm still catching up on the past couple weeks, but I'll take a look at this some time before r15 goes to stable. |
I've noticed than NDK_CCACHE feature works fine (and saves a lot of my time). It seems that NDK_ANALYZE implementation can be reworked to be very similar and less complicated... Just an idea... |
Finally had a chance to look at this. Did some cleanup while I was at it: https://android-review.googlesource.com/405992 Remove Clang toolchain path from setup.mk. Now our test will actually catch issues here, and the analyzer will work with both Clang and GCC. I don't think I'll be cherry-picking these into r15. We're very late in the release cycle and this isn't a regression. This actually works as well as it ever has, it's just that it never got updated to allow compilation using Clang. |
Merged into r16. |
Not sure why this was ever hard wired to GCC. We can support both easily enough. Test: ndk-build NDK_ANALYZE=1 V=1 Test: ndk-build NDK_ANALYZE=1 V=1 NDK_TOOLCHAIN_VERSION=4.9 Bug: android/ndk#362 Change-Id: I378b95f76225ac09d0e0abe89d4d6022e74c8bd7
Allow analyzer output to be sent somewhere other than /tmp with NDK_ANALYZER_OUT. Now that we can predict the output, improve the test (since it clearly wasn't catching anything). Also, remove the test config saying the test was clang specific. It actually works with both Clang and GCC. Test: ./run_tests.py --filter NDK_ANALYZE Bug: android/ndk#362 Change-Id: I7226e6fba1190573280e8b0c21b8550fb5636005
do you have any android cmake projects using NDK_ANALYZE=1 demos? Now our company has migarate our project from ndk-build to cmake ,but I can't find any samples or docs about how to use analyzer in cmake , can you help me ? thanks!!!! |
Responded on #1072 |
Description
NDK_ANALYZE feature is completely broken in ndk r14
It uses clang static code analyzer tool and scan-build utility.
But all invocation scripts are out of date.
...
Environment Details
The text was updated successfully, but these errors were encountered: