How are we able to add linker flag options in waf?
I am attempting to integrate gcovr with waf and am running into issues. Here is the error I encounter
src/alsdk/binary/byteorder.test.cpp.2.o: In function `global constructors keyed to 65535_0_byteorder.test.cpp':
byteorder.test.cpp:(.text+0x8b2): undefined reference to `__gcov_init'
src/alsdk/binary/byteorder.test.cpp.2.o:(.data.rel+0x48): undefined reference to `__gcov_merge_add'
src/alsdk/binary/byteorder.cpp.1.o: In function `global constructors keyed to 65535_0_byteorder.cpp':
byteorder.cpp:(.text+0xe7): undefined reference to `__gcov_init'
src/alsdk/binary/byteorder.cpp.1.o:(.data.rel+0x48): undefined reference to `__gcov_merge_add'
collect2: ld returned 1 exit status
In waf I want to configure the compiler to run with these flags
-fprofile-arcs -ftest-coverage -fPIC -O0 example1.cpp -o example1
I attempt to do this within the configure method in the wscript
self.env.append_value('CXXFLAGS', ['-std=c++98', '-fprofile-arcs', '-ftest-coverage', '-fPIC'])
However, I receive the error shown above. I would also like to include linker flags in waf
LFLAGS: -lgcov --coverage
1. How can I include these linker flags in waf?
2. How to integrate gcov with waf