Commit 4870e002f2

Krzysztof Wolicki <der.teufel.mail@gmail.com>
2024-06-25 12:45:37
Compilation: pass libc include directories when compiling assembly_with_cpp
1 parent 8f7b50e
Changed files (1)
src/Compilation.zig
@@ -5363,6 +5363,11 @@ pub fn addCCArgs(
                 const c_headers_dir = try std.fs.path.join(arena, &[_][]const u8{ comp.zig_lib_directory.path.?, "include" });
                 try argv.append("-isystem");
                 try argv.append(c_headers_dir);
+
+                for (comp.libc_include_dir_list) |include_dir| {
+                    try argv.append("-isystem");
+                    try argv.append(include_dir);
+                }
             }
 
             // The Clang assembler does not accept the list of CPU features like the