[sw] Implement test_coverage library

This change:
- Introduces the `test_coverage` library that provides LLVM profiling
  runtime support and a function for sending the LLVM profile buffer
  over UART, and
- Introduces a new meson option named `coverage` to define the relevant
  dependencies conditionally.

Signed-off-by: Alphan Ulusoy <alphan@google.com>
diff --git a/sw/device/lib/testing/test_coverage.h b/sw/device/lib/testing/test_coverage.h
new file mode 100644
index 0000000..4a0da29
--- /dev/null
+++ b/sw/device/lib/testing/test_coverage.h
@@ -0,0 +1,12 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+/**
+ * Sends the LLVM profile buffer along with its length and CRC32.
+ *
+ * This function must be called at the end of a test. Note that this profile
+ * data is raw and must be indexed before it can be used to generate coverage
+ * reports.
+ */
+void test_coverage_send_buffer(void);