[K/N] Add workaround for NS_FORMAT_ARGUMENT(A)

See KT-48807 for explanation
This commit is contained in:
Sergey Bogolepov
2022-08-25 12:10:30 +03:00
parent 5c1641430c
commit 5f847ac40d
2 changed files with 4 additions and 5 deletions
@@ -65,7 +65,10 @@ sealed class ClangArgs(
"USE_PE_COFF_SYMBOLS=1".takeIf { target.binaryFormat() == BinaryFormat.PE_COFF },
"UNICODE".takeIf { target.family == Family.MINGW },
"USE_WINAPI_UNWIND=1".takeIf { target.supportsWinAPIUnwind() },
"USE_GCC_UNWIND=1".takeIf { target.supportsGccUnwind() }
"USE_GCC_UNWIND=1".takeIf { target.supportsGccUnwind() },
// Clang 11 does not support this attribute. We don't need to handle it properly,
// so just undefine it.
"NS_FORMAT_ARGUMENT(A)=".takeIf { target.family.isAppleFamily },
)
val customOptions = target.customArgsForKonanSources()
return (konanOptions + otherOptions + customOptions).map { "-D$it" }