]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
src: remove some -D defines from compiler args
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 16 Jan 2026 13:25:47 +0000 (13:25 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 16 Jan 2026 18:10:20 +0000 (18:10 +0000)
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>
src/internal.h
src/meson.build
src/remote/remote_protocol.x

index 8200480394208ac476c60819017490272780629c..df311551a450bd9483be6df369a9b873fc43e193 100644 (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
index 47c978cc1f67b55c71fbc81bfed4b7f3cb63bbf8..16875622f46aeb5c990766f779f1c7207fa30853 100644 (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,
index 3c9320321031b3d7392df053041ab391435d26db..38a83c64eadb8bc00f0d310a2657c85d56551234 100644 (file)
@@ -34,6 +34,7 @@
  * 'REMOTE_'.  This makes names quite long.
  */
 
+%#define IN_LIBVIRT
 %#include <libvirt/libvirt.h>
 %#include "internal.h"
 %#include "virxdrdefs.h"