[CMake] Fix -Wstrict-prototypes
authorSam James <sam@gentoo.org>
Tue, 8 Nov 2022 01:36:43 +0000 (01:36 +0000)
committerTom Stellard <tstellar@redhat.com>
Fri, 11 Nov 2022 00:53:39 +0000 (16:53 -0800)
commitc8e7a87b1ed6b00dc2c3543a80c892d5948f8849
tree5353b614f35a7c259ff0f5be39333450648d6f17
parent5c68a1cb123161b54b72ce90e7975d95a8eaf2a4
[CMake] Fix -Wstrict-prototypes

Fixes warnings (or errors, if someone injects -Werror in their build system,
which happens in fact with some folks vendoring LLVM too) with Clang 16:
```
+/var/tmp/portage.notmp/portage/sys-devel/llvm-15.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: warning: a function declaration without a prototype
is deprecated in all versions of C [-Wstrict-prototypes]
-/var/tmp/portage.notmp/portage/sys-devel/llvm-14.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: error: a function declaration without a prototype is
deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 int main() {return 0;}
         ^
          void
```

Differential Revision: https://reviews.llvm.org/D137503

(cherry picked from commit 32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d)
14 files changed:
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
compiler-rt/cmake/config-ix.cmake
compiler-rt/lib/builtins/CMakeLists.txt
libcxx/cmake/config-ix.cmake
libcxxabi/cmake/config-ix.cmake
libunwind/cmake/config-ix.cmake
lldb/tools/debugserver/source/CMakeLists.txt
llvm/cmake/config-ix.cmake
llvm/cmake/modules/FindFFI.cmake
llvm/cmake/modules/FindTerminfo.cmake
llvm/cmake/modules/FindZ3.cmake
llvm/cmake/modules/HandleLLVMOptions.cmake
openmp/runtime/cmake/config-ix.cmake
polly/lib/External/CMakeLists.txt