[gnome-builder/gnome-builder-43] libide/foundry: -isystem expects a directory after it



commit 05c292948205968dc4e370500327c3902a8afe79
Author: Christian Hergert <chergert redhat com>
Date:   Thu Sep 29 22:33:08 2022 -0700

    libide/foundry: -isystem expects a directory after it
    
    Otherwise we just end up with a bunch of -isystem arguments in the build
    flags which is doing nobody any good.

 src/libide/foundry/ide-compile-commands.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/foundry/ide-compile-commands.c b/src/libide/foundry/ide-compile-commands.c
index c8c4194f3..47de00ddf 100644
--- a/src/libide/foundry/ide-compile-commands.c
+++ b/src/libide/foundry/ide-compile-commands.c
@@ -512,12 +512,13 @@ ide_compile_commands_filter_c (IdeCompileCommands   *self,
         default:
           if (g_str_has_prefix (param, "-std=") ||
               g_str_has_prefix (param, "--std=") ||
-              ide_str_equal0 (param, "-pthread") ||
-              g_str_has_prefix (param, "-isystem"))
+              ide_str_equal0 (param, "-pthread"))
             {
               g_ptr_array_add (ar, g_strdup (param));
             }
-          else if (next != NULL && ide_str_equal0 (param, "-include"))
+          else if (next != NULL &&
+                   (ide_str_equal0 (param, "-include") ||
+                    ide_str_equal0 (param, "-isystem")))
             {
               g_ptr_array_add (ar, g_strdup (param));
               g_ptr_array_add (ar, ide_compile_commands_resolve (self, info, next));


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