Hi Soren
Thanks for the quick response. This is the problem I am having. I am
probably missing out putting my coverage option some place.
Although most of the files are being executed with the-fprofile-arcs -
ftest-coverage option. Some of the files are not: each g++ option
should be executed with these options: -fprofile-arcs -ftest-coverage
I can't find them in the output given by Scons starting from the
following lines....
g++ -o shell obj/sample/shell/release/shell.o -L. -lv8 -lpthread
obj/sample/shell/release/shell.o: In function `global constructors
keyed to 0_main':
shell.cc:(.text+0x2c06): undefined reference to `__gcov_init'
obj/sample/shell/release/shell.o:(.data+0x204): undefined reference to
`__gcov_merge_add'
./libv8.a(api.o): In function `global constructors keyed to
0__ZN2v88internal2V823FatalProcessOutOfMemoryEPKc':
api.cc:(.text+0x293ab): undefined reference to `__gcov_init'
This is resulting in a build error.
Could you help me out? I have my flags set in all the 3 u mentioned
earlier. which flags are used for these shells and libv8.a?
Thanks
Nipun
On Dec 15, 2:39 am, Søren Gjesse <
sgje...@chromium.org> wrote:
> Hi,
>
> All the flags for the different configurations are in the SConstruct file.
> There are different sections of flags, and the ones you are interested in
> are probably LIBRARY_FLAGS, CCTEST_EXTRA_FLAGS and SAMPLE_FLAGS. What is
> in LIBRARY_FLAGS is used to build the V8 library. CCTEST_EXTRA_FLAGS are
> used to build and link the cctest executable used to run all the tests
> written in C++. SAMPLE_FLAGS are used to build and link the shell sample
> used to run all the tests written in JavaScript.
> You should think of adding a new flag to the SCons build to control
> this (e.g scons coverage=on). Look for the SIMPLE_OPTIONS definition in the
> SConstruct file, and see how the flags are used to control the compiler and
> linker options.
>
> When looking at coverage you should think of including the Mozilla tests.
> Seehttp://
code.google.com/p/v8/wiki/Testingfor how to run them.
>
> Please share your findings when done.
>
> Regards,
> Søren
>