Skip to content

Commit 4f61620

Browse files
committed
Only use -Wno-nullability-completeness on iOS
1 parent c9c8957 commit 4f61620

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.zig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,12 @@ fn buildMbedtls(b: *Build, m: *Build.Module) !void {
522522
mbedtls.addIncludePath(b.path(root ++ "include"));
523523
mbedtls.addIncludePath(b.path(root ++ "library"));
524524

525-
mbedtls.addCSourceFiles(.{ .flags = &.{"-Wno-nullability-completeness"}, .files = &.{
525+
const flags: []const []const u8 = if (m.resolved_target.?.result.os.tag == .ios)
526+
&.{"-Wno-nullability-completeness"}
527+
else
528+
&.{};
529+
530+
mbedtls.addCSourceFiles(.{ .flags = flags, .files = &.{
526531
root ++ "library/aes.c",
527532
root ++ "library/aesni.c",
528533
root ++ "library/aesce.c",

0 commit comments

Comments
 (0)