linker_flags.cmake 679 B

1234567891011121314
  1. # The coverage linker flag is specific for gcc.
  2. # Using a config check is ok for now, but in future it would be desired if
  3. # linker flags themselves are not depending on actual configurations.
  4. # All flags should be described, and the caller should now the flag name to use.
  5. if (NOT CONFIG_COVERAGE_GCOV)
  6. set_property(TARGET linker PROPERTY coverage -lgcov)
  7. endif()
  8. # ld/gcc linker flags for sanitizing.
  9. check_set_linker_property(TARGET linker APPEND PROPERTY sanitize_address -lasan)
  10. check_set_linker_property(TARGET linker APPEND PROPERTY sanitize_address -fsanitize=address)
  11. check_set_linker_property(TARGET linker APPEND PROPERTY sanitize_undefined -fsanitize=undefined)