authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-02 20:41:47-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-02 20:41:47-07:00
logfcf77e06eab5e8b63a9778500c3f08a9ba8631f4
tree2a807b31a542c8da36aab2fc98f68565d09b38d3
parent48136c11d184c25261fd35111962515931df7edc

libcxx: add additional include directory

It appears that libcxx files now want to additionally include based from the src/ directory.

1 files changed, 8 insertions(+), 0 deletions(-)

src/libcxx.zig+8
......@@ -117,6 +117,7 @@ pub fn buildLibCXX(comp: *Compilation) !void {
117117
118118 const cxxabi_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxxabi", "include" });
119119 const cxx_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "include" });
120 const cxx_src_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "src" });
120121 var c_source_files = try std.ArrayList(Compilation.CSourceFile).initCapacity(arena, libcxx_files.len);
121122
122123 for (libcxx_files) |cxx_src| {
......@@ -173,6 +174,9 @@ pub fn buildLibCXX(comp: *Compilation) !void {
173174 try cflags.append("-I");
174175 try cflags.append(cxxabi_include_path);
175176
177 try cflags.append("-I");
178 try cflags.append(cxx_src_include_path);
179
176180 if (target_util.supports_fpic(target)) {
177181 try cflags.append("-fPIC");
178182 }
......@@ -269,6 +273,7 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
269273
270274 const cxxabi_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxxabi", "include" });
271275 const cxx_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "include" });
276 const cxx_src_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "src" });
272277 var c_source_files = try std.ArrayList(Compilation.CSourceFile).initCapacity(arena, libcxxabi_files.len);
273278
274279 for (libcxxabi_files) |cxxabi_src| {
......@@ -311,6 +316,9 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
311316 try cflags.append("-I");
312317 try cflags.append(cxx_include_path);
313318
319 try cflags.append("-I");
320 try cflags.append(cxx_src_include_path);
321
314322 if (target_util.supports_fpic(target)) {
315323 try cflags.append("-fPIC");
316324 }