[Interop][watchos_arm64] Fix platform libs generation
Pass -O2 flag to Clang to avoid inline asm in wrappers.
This commit is contained in:
committed by
Sergey Bogolepov
parent
cb226dfff1
commit
178ba2944b
+6
@@ -381,6 +381,12 @@ internal fun buildNativeLibrary(
|
||||
val compilerOpts: List<String> = mutableListOf<String>().apply {
|
||||
addAll(def.config.compilerOpts)
|
||||
addAll(tool.defaultCompilerOpts)
|
||||
// We compile with -O2 because Clang may insert inline asm in bitcode at -O0.
|
||||
// It is undesirable in case of watchos_arm64 since we target armv7k
|
||||
// for this target instead of arm64_32 because it is not supported in LLVM 8.
|
||||
//
|
||||
// Note that PCH and the *.c file should be compiled with the same optimization level.
|
||||
add("-O2")
|
||||
addAll(additionalCompilerOpts)
|
||||
addAll(getCompilerFlagsForVfsOverlay(arguments.headerFilterPrefix.toTypedArray(), def))
|
||||
addAll(when (language) {
|
||||
|
||||
Reference in New Issue
Block a user