Is the compiler flag `-Xembed-bitcode` actually su...
# kotlin-native
b
Is the compiler flag
-Xembed-bitcode
actually supported as stated in the FAQs? With the Kotlin Gradle plugin v1.3.10 I still get a warning, suggesting that the bitcode is not embedded. This was asked earlier: https://kotlinlang.slack.com/archives/C3SGXARS6/p1540494962000100
o
Please provide us more details, this flag is supported, but will not work for bitcode-only targets, like watchOS
b
I suspect the warning is related to my setup: I have two MPP Gradle modules (“core” + “project”); the project module depends on the core module; when building the project module, the core module will be also build — but supposably not as ObjC framework as instructed in the Gradle config. The warning is then yielded from the core module. I’m still trying to understand this … I suspect dependent modules don’t get build as frameworks but as KLib which doesn’t support embedding bitcode (regardless that both my modules are configured exactly the same)?
Now I verified (using
otool
) that the resulting “project” module has indeed bitcode embedded. What I’m still unsure about, is the bitcode from the “core” module also included?
s
What I’m still unsure about, is the bitcode from the “core” module also included?
Yes.
-Xembed-bitcode
option is supposed to be used for compilation of final native binary, such as executable or framework.
b
So Bitcode of dependend modules (Klibs) will also be embedded into the compiled executable/framework?
s
Yes, exactly.
b
Thank you very much! 🙂
s
You are welcome 🙂