@@ -62,6 +62,16 @@ aarch64-apple-darwin:
6262 - ' -arch'
6363 - ' arm64'
6464 - ' -mmacosx-version-min=11.0'
65+ # Suppress extremely verbose warnings we see with LLVM 10.
66+ - ' -Wno-nullability-completeness'
67+ - ' -Wno-expansion-to-defined'
68+ # LLVM 11 contains commit https://reviews.llvm.org/D83250,
69+ # which enables -Werror for undef-prefix=TARGET_OS_.
70+ # However, the macOS SDK has headers that reference deprecated
71+ # TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
72+ # to work with the macOS SDKs out of the box. We work around
73+ # this by undoing the -Werror=undef-prefix in that commit.
74+ - ' -Wno-undef-prefix'
6575 target_ldflags :
6676 - ' -arch'
6777 - ' arm64'
@@ -93,6 +103,16 @@ aarch64-apple-ios:
93103 - ' -arch'
94104 - ' arm64'
95105 - ' -mios-version-min=12.3'
106+ # Suppress extremely verbose warnings we see with LLVM 10.
107+ - ' -Wno-nullability-completeness'
108+ - ' -Wno-expansion-to-defined'
109+ # LLVM 11 contains commit https://reviews.llvm.org/D83250,
110+ # which enables -Werror for undef-prefix=TARGET_OS_.
111+ # However, the macOS SDK has headers that reference deprecated
112+ # TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
113+ # to work with the macOS SDKs out of the box. We work around
114+ # this by undoing the -Werror=undef-prefix in that commit.
115+ - ' -Wno-undef-prefix'
96116 target_ldflags :
97117 - ' -arch'
98118 - ' arm64'
@@ -148,6 +168,16 @@ arm64-apple-tvos:
148168 - ' -arch'
149169 - ' arm64'
150170 - ' -mappletvos-version-min=12.3'
171+ # Suppress extremely verbose warnings we see with LLVM 10.
172+ - ' -Wno-nullability-completeness'
173+ - ' -Wno-expansion-to-defined'
174+ # LLVM 11 contains commit https://reviews.llvm.org/D83250,
175+ # which enables -Werror for undef-prefix=TARGET_OS_.
176+ # However, the macOS SDK has headers that reference deprecated
177+ # TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
178+ # to work with the macOS SDKs out of the box. We work around
179+ # this by undoing the -Werror=undef-prefix in that commit.
180+ - ' -Wno-undef-prefix'
151181 target_ldflags :
152182 - ' -arch'
153183 - ' arm64'
@@ -360,6 +390,16 @@ thumb7k-apple-watchos:
360390 - ' -arch'
361391 - ' armv7k'
362392 - ' -mwatchos-version-min-7.0'
393+ # Suppress extremely verbose warnings we see with LLVM 10.
394+ - ' -Wno-nullability-completeness'
395+ - ' -Wno-expansion-to-defined'
396+ # LLVM 11 contains commit https://reviews.llvm.org/D83250,
397+ # which enables -Werror for undef-prefix=TARGET_OS_.
398+ # However, the macOS SDK has headers that reference deprecated
399+ # TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
400+ # to work with the macOS SDKs out of the box. We work around
401+ # this by undoing the -Werror=undef-prefix in that commit.
402+ - ' -Wno-undef-prefix'
363403 target_ldflags :
364404 - ' -arch'
365405 - ' armv7k'
@@ -389,6 +429,16 @@ x86_64-apple-darwin:
389429 - ' -arch'
390430 - ' x86_64'
391431 - ' -mmacosx-version-min=10.9'
432+ # Suppress extremely verbose warnings we see with LLVM 10.
433+ - ' -Wno-nullability-completeness'
434+ - ' -Wno-expansion-to-defined'
435+ # LLVM 11 contains commit https://reviews.llvm.org/D83250,
436+ # which enables -Werror for undef-prefix=TARGET_OS_.
437+ # However, the macOS SDK has headers that reference deprecated
438+ # TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
439+ # to work with the macOS SDKs out of the box. We work around
440+ # this by undoing the -Werror=undef-prefix in that commit.
441+ - ' -Wno-undef-prefix'
392442 target_ldflags :
393443 - ' -arch'
394444 - ' x86_64'
@@ -420,6 +470,16 @@ x86_64-apple-ios:
420470 - ' -arch'
421471 - ' x86_64'
422472 - ' -mios-simulator-version-min=12.3'
473+ # Suppress extremely verbose warnings we see with LLVM 10.
474+ - ' -Wno-nullability-completeness'
475+ - ' -Wno-expansion-to-defined'
476+ # LLVM 11 contains commit https://reviews.llvm.org/D83250,
477+ # which enables -Werror for undef-prefix=TARGET_OS_.
478+ # However, the macOS SDK has headers that reference deprecated
479+ # TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
480+ # to work with the macOS SDKs out of the box. We work around
481+ # this by undoing the -Werror=undef-prefix in that commit.
482+ - ' -Wno-undef-prefix'
423483 target_ldflags :
424484 - ' -arch'
425485 - ' x86_64'
@@ -445,6 +505,16 @@ x86_64-apple-tvos:
445505 - ' -arch'
446506 - ' x86_64'
447507 - ' -mappletvsimulator-version-min=12.3'
508+ # Suppress extremely verbose warnings we see with LLVM 10.
509+ - ' -Wno-nullability-completeness'
510+ - ' -Wno-expansion-to-defined'
511+ # LLVM 11 contains commit https://reviews.llvm.org/D83250,
512+ # which enables -Werror for undef-prefix=TARGET_OS_.
513+ # However, the macOS SDK has headers that reference deprecated
514+ # TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
515+ # to work with the macOS SDKs out of the box. We work around
516+ # this by undoing the -Werror=undef-prefix in that commit.
517+ - ' -Wno-undef-prefix'
448518 target_ldflags :
449519 - ' -arch'
450520 - ' x86_64'
@@ -468,6 +538,16 @@ x86_64-apple-watchos:
468538 - ' -arch'
469539 - ' x86_64'
470540 - ' -mwatchsimulator-version-min=7.0'
541+ # Suppress extremely verbose warnings we see with LLVM 10.
542+ - ' -Wno-nullability-completeness'
543+ - ' -Wno-expansion-to-defined'
544+ # LLVM 11 contains commit https://reviews.llvm.org/D83250,
545+ # which enables -Werror for undef-prefix=TARGET_OS_.
546+ # However, the macOS SDK has headers that reference deprecated
547+ # TARGET_OS defines, like TARGET_OS_EMBEDDED. So LLVM 11 refuses
548+ # to work with the macOS SDKs out of the box. We work around
549+ # this by undoing the -Werror=undef-prefix in that commit.
550+ - ' -Wno-undef-prefix'
471551 target_ldflags :
472552 - ' -arch'
473553 - ' x86_64'
0 commit comments