1# The coverage linker flag is specific for gcc. 2 3# Using a config check is ok for now, but in future it would be desired if 4# linker flags themselves are not depending on actual configurations. 5# All flags should be described, and the caller should know the flag name to use. 6if (NOT CONFIG_COVERAGE_GCOV) 7 set_property(TARGET linker PROPERTY coverage -lgcov) 8endif() 9 10check_set_linker_property(TARGET linker APPEND PROPERTY gprof -pg) 11 12# GCC 11 by default emits DWARF version 5 which cannot be parsed by 13# pyelftools. Can be removed once pyelftools supports v5. 14add_link_options(-gdwarf-4) 15 16# Extra warnings options for twister run 17set_property(TARGET linker PROPERTY warnings_as_errors -Wl,--fatal-warnings) 18