Help needed: append the build-wrapper-linux-x86-64 –out-dir

Dear expertise:

I am a software engineer from GE, our team is integration the Sonar on our existing code.

During the integration we encounter a problem with the .json and .log file under --out-dir directory.

Base on our build design, we expect to add the build-wrapper-linux-x86-64 before gcc, such as:

build-wrapper-linux-x86-64 --out-dir ./ gcc -o a.o a.cpp
build-wrapper-linux-x86-64 --out-dir ./ gcc -o b.o b.cpp
build-wrapper-linux-x86-64 --out-dir ./ gcc -o c.o c.cpp
……
build-wrapper-linux-x86-64 --out-dir ./ gcc -o n.o n.cpp

But it seems we always only get the SA result for n.cpp.
Here goes my question, is there any parameter or configuration to tell the wrapper append other than replace the .json and .log file under the out-dir? In this situation we can get all SA result for all cpp files.

Thanks for your attention in advance, expect to get your expertise suggestion.

Hi @FangcaoCui,

Thanks for posting and welcome to the Community forum! :smiley:

I’ve moved your post across to our “Get help” category which is the go-to place for help and questions; let me also give you an answer here.

The Build Wrapper is designed to wrap your entire build, not each individual step. So I assume you have some kind of script (or makefile or other mechanism) that is driving this build; the Build Wrapper should wrap that, rather than each gcc invocation. You can see a couple of examples in our documentation.

I hope this helps; let me know if you have any questions after reading the documentation.

Regards,

Cameron.

1 Like