On 2/6/2013 2:27 PM, Chris Cleeland wrote:
Some old-fashioned printf-style debugging finds that the cwd at the point
where the 'build_command' subprocess gets called is whatever directory you
were in when you ran the script. I would expect that it would be run in
the source_folder.
However, looking at the args passed to subprocess.call(), I see that, in
fact, the cwd= arg is set to 'tree.object_folder'--and *has been* since the
beginning of the branch. I don't know how this worked for me previously.
Why is the cwd set to the object_folder rather than source_folder? To test
things out, I've changed subprocess.call() to have cwd=tree.source_folder
and I'll see how things go.
The reason this change was made was because it works better with most
programs. If you assume the canonical configure+make build system, then
the way to do an out-of-tree build is:
cd $build
$source/configure
make
Note that dxr also provides $source_folder and $build_folder variables
that you can use when running your build command. So builds for my tree
are the following:
[llvm]
source_folder=/src/llvm
object_folder=/src/dxr/llvm-build
build_command=$source_folder/configure --enable-targets=x86,arm; make
-j$jobs
[OpenSkyscraper]
source_folder=/src/OpenSkyscraper
object_folder=/src/dxr/os-build
build_command=cmake $source_folder/source; make -j$jobs
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis