clang: support gcov ARM LLVM clang supports code coverage detection
Summary
- Create a libbuiltin folder under libs for building toolchain related libraries such as libgcc and compiler rt
- The code coverage tool for LLVM clang requires the use of the profile library in the compiler rt under LLVM, which needs to be built-in into the kernel code
- Porting the compiler-rt.profile library for LLVM
- Implement InstrProfilingPlatformNX.c on the NX platform
Impact
After enabling builtin, there will be an additional. a file that needs to be linked, and all libraries in libbuiltin will be compiled into one. a file to minimize future changes.
Testing
No
[Experimental Bot, please feedback here]
This PR does not meet the NuttX requirements. Here's why:
- Insufficient Summary: The summary provides a high-level overview but lacks crucial details:
- Why is this change necessary? Clearly state the problem the PR solves. Is code coverage broken for LLVM/Clang? Is this a new feature to enable better tooling?
- How does the change work? Be more specific than "porting the library." Explain how the library integrates, what modifications were made for NuttX, etc.
- Impact Section is Unrealistic: It's highly unlikely a change of this nature has no impact. Address each point specifically:
- Build Impact: Adding a new library and integrating it into the kernel will change the build process. How?
- Hardware Impact: Which architectures are affected by the LLVM compiler runtime?
- Documentation: Does this require documentation updates?
- Compatibility: Will this affect applications built against older NuttX versions?
- Testing is Insufficient: "No" is not an acceptable answer. You must provide:
- Build Host Details: List the OS, CPU architecture, compiler version used for testing.
- Target Details: Specify the architectures and boards used for validation.
- Testing Logs: Include relevant logs demonstrating the issue before the change and the improvement after the change.
In short, the PR needs significantly more detail and evidence of testing to be considered.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
I will update this patch until https://github.com/apache/nuttx/pull/14472 is merged
please rebas the patch to.fix.the.conflict.