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



commit 3e456ab5225e491e67907993c25ddbe873589f04
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]