configure, meson: move C++ compiler detection to meson.build

The test is slightly weaker than before, because it does not
call an extern "C" function from a C source file.  However,
in practice what we seek to detect is ABI compatibility of the
various sanitizer flags, and for that it is enough to compile
anything with CC and link it with CXX.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2021-11-08 12:31:52 +01:00
parent 6d3226357f
commit b485458e00
3 changed files with 27 additions and 68 deletions

1
scripts/main.c Normal file
View file

@ -0,0 +1 @@
int main(void) {}