Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc] Fix warning on 'extern "C" int main' in test suite
Summary: According to the C++ standard, The main function shall not be declared with a linkage-specification. after some changes in llvm#101853 this started emitting warnings when building / testing the C library. This source file is shared with the overlay tests as well as the full build tests. The full build tests are compiled with `-ffreestanding`, as are all the startup / integration files. The standard says freestanding environment are all implementation defined, so this is valid in those cases. This patch simply prevents adding the linkage when we are compiling unit tests, which are hosted. This is a continuation on llvm#102825.
- Loading branch information