Summary: According to the C++ standard, The main function shall not be declared with a linkage-specification. after some changes in https://github.com/llvm/llvm-project/pull/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 https://github.com/llvm/llvm-project/pull/102825.
1.9 KiB
1.9 KiB