[gnome-builder] foundry: log build flags for easier debugging



commit 63bde4f3b83cc1f0c759a582e168bbd34fc38450
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 7 11:57:40 2021 -0700

    foundry: log build flags for easier debugging

 src/libide/foundry/ide-build-system.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/src/libide/foundry/ide-build-system.c b/src/libide/foundry/ide-build-system.c
index 0d5c747ba..639fdfa75 100644
--- a/src/libide/foundry/ide-build-system.c
+++ b/src/libide/foundry/ide-build-system.c
@@ -449,6 +449,20 @@ ide_build_system_get_build_flags_finish (IdeBuildSystem  *self,
   if (ret != NULL)
     ide_build_system_post_process_build_flags (self, ret);
 
+#ifdef IDE_ENABLE_TRACE
+  if (ret != NULL)
+    {
+      g_autoptr(GString) str = g_string_new (NULL);
+      for (guint i = 0; ret[i]; i++)
+        {
+          g_autofree char *escaped = g_shell_quote (ret[i]);
+          g_string_append (str, escaped);
+          g_string_append_c (str, ' ');
+        }
+      IDE_TRACE_MSG ("build_flags = %s", str->str);
+    }
+#endif
+
   IDE_RETURN (ret);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]