You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the development of CodeChecker we hit an issue with using intercept-build: we are unable to log with intercept-build if a direct compiler invocation is passed as a build command.
Using --use-c++ "/home/username/LLVM/build/bin/clang-5.0" does not help in this case, the compile JSON remains empty.
The problem lies in that a directclang invocation creates an invocation which contains a -cc1 argument, which explicitly makes the executed command to be ignored. If I edit the file to "unignore" -cc1, the compile JSON is created, but it contains, seemingly, a lot of useless data:
In the development of CodeChecker we hit an issue with using
intercept-build
: we are unable to log withintercept-build
if a direct compiler invocation is passed as a build command.Take, for example, the following lines:
The result is an empty
compile_commands.json
Trying to set
--override-compiler
and--use-cc
/--use-c++
to the compiler executables themselves doesn't help either.g++
g++
is/usr/bin/g++
which is a sym-link to/usr/bin/g++-5
In case of g++, setting
--use-c++ /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus
helps. This way, it looks like that proper compile database is created:However, this is not automatic, and very specific to the users' environment. 🙁
clang
The problem is even more affecting when someone tries to use
clang++
as their compiler. Bothclang
andclang++
are sym-links toclang-5.0
:Using
--use-c++ "/home/username/LLVM/build/bin/clang-5.0"
does not help in this case, the compile JSON remains empty.The problem lies in that a direct
clang
invocation creates an invocation which contains a-cc1
argument, which explicitly makes the executed command to be ignored. If I edit the file to "unignore"-cc1
, the compile JSON is created, but it contains, seemingly, a lot of useless data:The text was updated successfully, but these errors were encountered: