src: remove some -D defines from compiler args

The compiler args are so verbose that CI jobs hit the limit on the
log file size GitLab is willing to capture.

Mitigate this a little bit by removing

  -DIN_LIBVIRT
  -Dabs_top_builddir="..dir.."
  -Dabs_top_srcdir="..dir.."

The last two are already present in the meson-config.h file so
were redundant, and the first is easily added to internal.h.

NB, remote_protocol.x needed special treatment since it is an
exception which (intentionally) does NOT include internal.h
before libvirt/libvirt.h

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2026-01-16 18:10:20 +00:00
parent a643671150
commit 50640d35ae
3 changed files with 4 additions and 5 deletions
+2
View File
@@ -29,6 +29,8 @@
#include <stdlib.h>
#include "glibcompat.h"
#define IN_LIBVIRT
#if defined __clang_analyzer__ || defined __COVERITY__
# define STATIC_ANALYSIS 1
#endif
+1 -5
View File
@@ -1,11 +1,7 @@
src_inc_dir = include_directories('.')
src_dep = declare_dependency(
compile_args: [
'-DIN_LIBVIRT',
'-Dabs_top_builddir="@0@"'.format(meson.project_build_root()),
'-Dabs_top_srcdir="@0@"'.format(meson.project_source_root()),
] + coverage_flags + win32_flags,
compile_args: coverage_flags + win32_flags,
dependencies: [
glib_dep,
libxml_dep,
+1
View File
@@ -34,6 +34,7 @@
* 'REMOTE_'. This makes names quite long.
*/
%#define IN_LIBVIRT
%#include <libvirt/libvirt.h>
%#include "internal.h"
%#include "virxdrdefs.h"