mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
libcxx: add additional include directory
It appears that libcxx files now want to additionally include based from the src/ directory.
This commit is contained in:
parent
48136c11d1
commit
fcf77e06ea
@ -117,6 +117,7 @@ pub fn buildLibCXX(comp: *Compilation) !void {
|
||||
|
||||
const cxxabi_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxxabi", "include" });
|
||||
const cxx_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "include" });
|
||||
const cxx_src_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "src" });
|
||||
var c_source_files = try std.ArrayList(Compilation.CSourceFile).initCapacity(arena, libcxx_files.len);
|
||||
|
||||
for (libcxx_files) |cxx_src| {
|
||||
@ -173,6 +174,9 @@ pub fn buildLibCXX(comp: *Compilation) !void {
|
||||
try cflags.append("-I");
|
||||
try cflags.append(cxxabi_include_path);
|
||||
|
||||
try cflags.append("-I");
|
||||
try cflags.append(cxx_src_include_path);
|
||||
|
||||
if (target_util.supports_fpic(target)) {
|
||||
try cflags.append("-fPIC");
|
||||
}
|
||||
@ -269,6 +273,7 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
|
||||
|
||||
const cxxabi_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxxabi", "include" });
|
||||
const cxx_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "include" });
|
||||
const cxx_src_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "src" });
|
||||
var c_source_files = try std.ArrayList(Compilation.CSourceFile).initCapacity(arena, libcxxabi_files.len);
|
||||
|
||||
for (libcxxabi_files) |cxxabi_src| {
|
||||
@ -311,6 +316,9 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
|
||||
try cflags.append("-I");
|
||||
try cflags.append(cxx_include_path);
|
||||
|
||||
try cflags.append("-I");
|
||||
try cflags.append(cxx_src_include_path);
|
||||
|
||||
if (target_util.supports_fpic(target)) {
|
||||
try cflags.append("-fPIC");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user