-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an explicit error that SKIE does not support bitcode embedding.
- Loading branch information
1 parent
1100126
commit 4cc10ac
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...ugin/src/kgp_common/kotlin/co/touchlab/skie/phases/other/VerifyNoBitcodeEmbeddingPhase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package co.touchlab.skie.phases.other | ||
|
||
import co.touchlab.skie.phases.ClassExportPhase | ||
import org.jetbrains.kotlin.backend.konan.BitcodeEmbedding | ||
import org.jetbrains.kotlin.backend.konan.KonanConfigKeys | ||
|
||
object VerifyNoBitcodeEmbeddingPhase : ClassExportPhase { | ||
|
||
context(ClassExportPhase.Context) | ||
override fun execute() { | ||
val bitcodeEmbeddingMode = compilerConfiguration[KonanConfigKeys.BITCODE_EMBEDDING_MODE] | ||
|
||
if (bitcodeEmbeddingMode == BitcodeEmbedding.Mode.FULL) { | ||
error( | ||
"Bitcode embedding is not supported by SKIE. " + | ||
"To disable bitcode embedding you likely need to remove `embedBitcode(BitcodeEmbeddingMode.BITCODE)` from the Gradle build script.", | ||
) | ||
} | ||
} | ||
} |