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

[analyze] Fix ccache compiler detection #3204

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

csordasmarton
Copy link
Contributor

@csordasmarton csordasmarton commented Feb 22, 2021

Closes #3117 and closes #2730

When we try to find compiler binaries from the PATH we will resolve the
symlinks by using os.path.realpath function. If the compiler
(g++/gcc/clang) is a symlink to ccache it will think that the compiler
is ccache. When we try to get for example the version of the detected
analyze it will return the version for the ccache binary and not for
the original compiler.
For this reason if the detected compiler binary is ccache we will use
the original compiler path instead of resolving the symlink.

When we try to find compiler binaries from the `PATH` we will resolve the
symlinks by using `os.path.realpath` function. If the compiler
(`g++/gcc/clang`) is a symlink to `ccache` it will think that the compiler
is ccache. When we try to get for example the version of the detected
analyze it will return the version for the ccache binary and not for
the original compiler.
For this reason if the detected compiler binary is `ccache` we will use
the original compiler path instead of resolving the symlink.
@csordasmarton csordasmarton added bugfix 🔨 analyzer 📈 Related to the analyze commands (analysis driver) labels Feb 22, 2021
@csordasmarton csordasmarton merged commit 0aad2ed into Ericsson:master Mar 2, 2021
@csordasmarton csordasmarton deleted the handle_ccache branch March 10, 2021 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) bugfix 🔨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeChecker fails after setup ccache CodeChecker does not work with stock ubuntu 18.04 clang 6 (ccache)
2 participants