From 4870e002f213d7002ac1941c6a204aff79137d54 Mon Sep 17 00:00:00 2001 From: Krzysztof Wolicki Date: Tue, 25 Jun 2024 12:45:37 +0200 Subject: Compilation: pass libc include directories when compiling assembly_with_cpp --- src/Compilation.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index b30f65ad11..343b22d2b1 100644 --- a/src/Compilation.zig +++ b/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 -- cgit v1.2.3