libcxx: pass -faligned-allocation flag when needed

libc++ now requires this flag
This commit is contained in:
Andrew Kelley 2021-10-01 18:06:17 -07:00
parent acb0a87158
commit f317acb2cd

View File

@ -148,6 +148,12 @@ pub fn buildLibCXX(comp: *Compilation) !void {
try cflags.append("-fno-exceptions");
}
if (target.os.tag == .zos) {
try cflags.append("-fno-aligned-allocation");
} else {
try cflags.append("-faligned-allocation");
}
try cflags.append("-I");
try cflags.append(cxx_include_path);