rizsotto / scan-build

Clang's scan-build re-implementation in python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

intercept is outputting empty database

apex-omontgomery opened this issue · comments

Trying to take a make project and create a compilation database.

when I go into the project and use:
intercept-build -vvvv make

I check the output file

compile_commands.json

[]

I thought possibly something to do with

the full output of the -vvvv

.....
 'WINDIR': 'C:\\WINDOWS'}
Creating app library archive:         libapp.a    <--makefile output
Processing complete for module:       common <--- makefile output
intercept-build: DEBUG: build finished with exit code: 0

I think there should be more logging but my intuition tells me that it's not actually intercepting the command.

Thanks for the report. I need more context in order to help you... Are you trying to run this on MS Windows? (I don't have much experience on this platform.) Is your makefile respect CC and CXX variables? On Windows scan-build uses compiler wrappers (scripts which do report about the invocation and calls the real compiler). This works only if the makefile pick up the compiler from environment variable.

Yes, trying to run on windows 10.
I'll have to verify it's respecting the CC and CXX variables. My thought is that the build isn't.

I think currently it's doing
CC = path/to/g++
Should I be using the ?= assignment?

You can test your build if it's taking the compiler from env or not. (On linux this would be the line CC=notexists make, which shall fail. While CC=path/to/g++ make shall succeed.)

Please reopen, if it's still relevant.