File tree 1 file changed +15
-0
lines changed
native/utils/src/org/jetbrains/kotlin/konan/target 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,21 @@ sealed class ClangArgs(
136
136
// See KT-43502.
137
137
add(listOf (" -fPIC" ))
138
138
}
139
+ // See https://github.com/apple/llvm-project/commit/dfa99c49306262eac46becbf1f7f5ba33ecc2fe3
140
+ // TL;DR: This commit adds an OS-agnostic __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ macro and now
141
+ // some of the Xcode headers use it instead of platform-specific ones. Workaround this problem
142
+ // by manually setting this macro.
143
+ // YouTrack ticket: KT-59167
144
+ val environmentOsVersionMinRequired = when (target.family) {
145
+ Family .OSX -> " __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__"
146
+ Family .IOS -> " __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__"
147
+ Family .TVOS -> " __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__"
148
+ Family .WATCHOS -> " __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__"
149
+ else -> null
150
+ }
151
+ if (environmentOsVersionMinRequired != null ) {
152
+ add(listOf (" -D__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__=$environmentOsVersionMinRequired " ))
153
+ }
139
154
}.flatten()
140
155
141
156
private val specificClangArgs: List <String > = when (target) {
You can’t perform that action at this time.
0 commit comments