When building with clang, the unittests were giving us an error: ``` error: undefined symbol: llvm_gcda_start_file ``` This seems to be from linking in `gcov` regardless of the toolchain. It appears that clang doesn't need any special library for coverage. With this change the following now produce identical coverage reports: ``` $ ZEPHYR_TOOLCHAIN_VARIANT=zephyr ./scripts/twister -p unit_testing \ --coverage -i -T tests/unit/intmath/ $ ZEPHYR_TOOLCHAIN_VARIANT=host ./scripts/twister -p unit_testing \ --coverage -i -T tests/unit/intmath/ $ ZEPHYR_TOOLCHAIN_VARIANT=llvm ./scripts/twister -p unit_testing \ --coverage -i --coverage-tool lcov \ --gcov-tool $(pwd)/scripts/utils/llvm-gcov.sh \ -T tests/unit/intmath/ ``` Signed-off-by: Yuval Peress <peress@google.com> |
||
|---|---|---|
| .. | ||
| app | ||
| bintools | ||
| compiler | ||
| emu | ||
| flash | ||
| ide | ||
| linker | ||
| linker_script | ||
| makefile_exports | ||
| modules | ||
| reports | ||
| toolchain | ||
| usage | ||
| util | ||
| cfb.cmake | ||
| extra_flags.cmake | ||
| gcc-m-cpu.cmake | ||
| gcc-m-fpu.cmake | ||
| gen_version_h.cmake | ||
| hex.cmake | ||
| kobj.cmake | ||
| mcuboot.cmake | ||
| package_helper.cmake | ||
| pristine.cmake | ||
| target_toolchain_flags.cmake | ||
| verify-toolchain.cmake | ||