1# The coverage linker flag is specific for clang. 2if (CONFIG_COVERAGE_NATIVE_GCOV) 3 set_property(TARGET linker PROPERTY coverage --coverage) 4elseif(CONFIG_COVERAGE_NATIVE_SOURCE) 5 set_property(TARGET linker PROPERTY coverage -fprofile-instr-generate -fcoverage-mapping) 6endif() 7 8# Extra warnings options for twister run 9set_property(TARGET linker PROPERTY ld_extra_warning_options ${LINKERFLAGPREFIX},--fatal-warnings) 10 11# GNU ld and LLVM lld complains when used with llvm/clang: 12# error: section: init_array is not contiguous with other relro sections 13# 14# So do not create RELRO program header. 15set_property(TARGET linker APPEND PROPERTY cpp_base ${LINKERFLAGPREFIX},-z,norelro) 16