[libc-commits] [libc] [libc] Enabling code coverage via Linux syscalls (PR #213271)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Tue Aug 18 10:56:31 PDT 2026
================
@@ -43,8 +43,155 @@ TestOptions parseOptions(int argc, char **argv) {
} // anonymous namespace
-// The C++ standard forbids declaring the main function with a linkage specifier
-// outisde of 'freestanding' mode, only define the linkage for hermetic tests.
+#include "src/__support/macros/properties/os.h"
+#if defined(LIBC_TARGET_OS_IS_LINUX)
----------------
michaelrj-google wrote:
the section inside this `#ifdef` seems like it would make more sense as a separate file, possibly a header, that is included if this target is linux and coverage is enabled.
https://github.com/llvm/llvm-project/pull/213271
More information about the libc-commits
mailing list