Closed stanislaw closed 4 years ago
I think I have found something that almost works:
intercept-build --use-cc /opt/llvm-3.9.0/bin/clang intercept-cc -g -O0 main.c
cat compile_commands.json
[
{
"arguments": [
"cc",
"-c",
"-g",
"-O0",
"main.c"
],
"directory": "/sandbox/scan-build-sandbox",
"file": "main.c"
}
]Stanislaw@home:scan-build-sandbox (master)*$
I can confirm that the file gets compiled with Clang 3.9. But I am wondering why the compilation database still shows cc
as the first argument. I have tried all possible combinations and available arguments and the cc
is always there.
Any advice?
Hey @stanislaw , the direct compiler call is not a supported use case unfortunately.
Your workarounds could be:
CC=/opt/llvm-3.9.0/bin/clang sh -c "$CC -g -O0 main.c"
I apologize if the following issue that I am reporting is caused by my misunderstanding of how I should use the
intercept-build
tool.I am on macOS 10.14.6 (18G1012).
Input
main.c
file:Command:
Output:
Info about
scan-build
: