clang: error: unknown argument: '-fstack-usage'
See original GitHub issueDescribe the bug A clear and concise description of what the bug is. First of all, thank you for your attention,our product is firmware, it contains .c and .h files,and then, When i use the codecheck for static check scanning and analyzer, it was in trouble. some errors in my program, like this:
[INFO 2021-10-11 10:53] - [66/5082] clang-tidy analyzed screen_adapter.c successfully. … Analyzing screen_adapter.c with clangsa failed! clang: error: unknown argument: ‘-fstack-usage’ … [INFO 2021-10-11 10:57] - ----==== Summary ====---- [INFO 2021-10-11 10:57] - Successfully analyzed [INFO 2021-10-11 10:57] - clang-tidy: 2541 [INFO 2021-10-11 10:57] - Failed to analyze [INFO 2021-10-11 10:57] - clangsa: 2541 [INFO 2021-10-11 10:57] - Total analyzed compilation commands: 2541 [INFO 2021-10-11 10:57] - ----=================---- [INFO 2021-10-11 10:57] - Analysis finished.
CodeChecker version
You can get version info by running CodeChecker version
.
CodeChecker analyzer version:
Kind | Version
Base package version | 6.17.0
Package build date | 2021-10-09T15:44
Git commit ID (hash) | 70dc02187b90da06e62f4272075336347b4242b2
Git tag information | 6.17
CodeChecker web version:
Kind | Version
Base package version | 6.17.0
Package build date | 2021-10-09T15:44
Git commit ID (hash) | 70dc02187b90da06e62f4272075336347b4242b2
Git tag information | 6.17
Server supported API (Thrift) | 6.43
Client API (Thrift) | 6.43
To Reproduce Steps to reproduce the behaviour:
When i use the codecheck for static check scanning and analyzer,some errors in my program, like this: Analyzing screen_adapter.c with clangsa failed! clang: error: unknown argument: ‘-fstack-usage’
- Run command ‘…’
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behaviour What you expected to happen. there is no problem.
Desktop (please complete the following information)
- OS: [e.g. Linux]----------------------------------linux DockerContainer
- Browser: [e.g. Firefox, Chrome]
- Version: [e.g. 22]
Additional context Add any other context about the problem. No
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (11 by maintainers)
Top GitHub Comments
Did you rebuild the CodeChecker package (
make clean_package && make package
)?By the way what is your original compiler (gcc, g++, clang, …)? Can you please share us one translation unit from your compilation database?
You can add this unknown option (
-fstack-usage
) above this line: https://github.com/Ericsson/codechecker/blob/70dc02187b90da06e62f4272075336347b4242b2/analyzer/codechecker_analyzer/buildlog/log_parser.py#L108After it works fine and you can build/analyze you project successfully you can create a pull request from this change and we will merge it to our repository 😊