aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-10-01 18:06:17 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-10-01 18:06:17 -0700
commitf317acb2cdaaba46c8eaa4b06be6651e3a9fd34e (patch)
tree1e63574421d31f924c4713b4fb4619c8f16d0f8e /src
parentacb0a87158a4f7850605f162ae3112f084fa22ff (diff)
downloadzig-f317acb2cdaaba46c8eaa4b06be6651e3a9fd34e.tar.gz
zig-f317acb2cdaaba46c8eaa4b06be6651e3a9fd34e.zip
libcxx: pass -faligned-allocation flag when needed
libc++ now requires this flag
Diffstat (limited to 'src')
-rw-r--r--src/libcxx.zig6
1 files changed, 6 insertions, 0 deletions
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);