zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit f317acb2cdaaba46c8eaa4b06be6651e3a9fd34e (tree)
parent acb0a87158a4f7850605f162ae3112f084fa22ff
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Fri,  1 Oct 2021 18:06:17 -0700

libcxx: pass -faligned-allocation flag when needed

libc++ now requires this flag

Diffstat:
Msrc/libcxx.zig | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/libcxx.zig b/src/libcxx.zig @@ -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);