[gnome-builder] libide/foundry: post-process include/isystem paths



commit 9356dff3f8972f6b739b5f24098222f5b87d0ef8
Author: Christian Hergert <chergert redhat com>
Date:   Thu Sep 29 22:34:00 2022 -0700

    libide/foundry: post-process include/isystem paths
    
    These need to be translated across the container boundaries so that we
    can access them via our mount namespace.

 src/libide/foundry/ide-build-system.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/libide/foundry/ide-build-system.c b/src/libide/foundry/ide-build-system.c
index 141077fe9..55c0d2e16 100644
--- a/src/libide/foundry/ide-build-system.c
+++ b/src/libide/foundry/ide-build-system.c
@@ -369,6 +369,7 @@ ide_build_system_post_process_build_flags (IdeBuildSystem  *self,
 
   for (guint i = 0; flags[i] != NULL; i++)
     {
+      const char *next = flags[i+1];
       gchar *flag = flags[i];
       gchar *translated;
 
@@ -404,7 +405,15 @@ ide_build_system_post_process_build_flags (IdeBuildSystem  *self,
         case 'f': /* -fPIC */
         case 'W': /* -Werror... */
         case 'm': /* -m64 -mtune=native */
+
         default:
+          if (next != NULL &&
+              (ide_str_equal0 (flag, "-include") ||
+               ide_str_equal0 (flag, "-isystem")))
+            {
+              translated = ide_build_system_translate (self, pipeline, "", next);
+              ide_take_string (&flags[i+1], translated);
+            }
           break;
         }
     }


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