Skip to content
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

compile asan, but the content of compile_commands.json is empty #563

Open
zhaohongjian520 opened this issue Mar 8, 2024 · 4 comments
Open

Comments

@zhaohongjian520
Copy link

when I compile source code of gcc, I found that content of compile_commands.json not contain asan. then I try to compile asan separately, and the result is the same.

@rizsotto
Copy link
Owner

Hey @zhaohongjian520 , thanks for the report. What is asan? And how can I reproduce the separate build of it? (Would not want to compile the whole Gcc.)

@WafiWadud
Copy link

asan also known as libasan is a santizer https://github.com/google/sanitizers/wiki/AddressSanitizer

@WafiWadud
Copy link

@nalajcie
Copy link

nalajcie commented May 1, 2024

Maybe check the compilation logs, compiling/cross-compiling gcc is a complex process, usually in stage 1 only the bare gcc is being build, which is then used to build libc, and then within stage 2 the full gcc (with libgcc and other necessary libs) is being built. Sometimes the stage1 compiler binary is being renamed to xgcc which bear doesn't recognize as compilator, try using --use-cc option to bear directly (I'm using Bear v2.4.4 but for v3 probably similar option exists).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants