From f317acb2cdaaba46c8eaa4b06be6651e3a9fd34e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 1 Oct 2021 18:06:17 -0700 Subject: [PATCH] libcxx: pass -faligned-allocation flag when needed libc++ now requires this flag --- src/libcxx.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcxx.zig b/src/libcxx.zig index 3b4f4d3d32..2cff5d738a 100644 --- 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);