[Swift Export] Use ExportedBridge instead of ExportForCppRuntime
ExportedBridge annotation actually does what we need in Swift Export. Unlike ExportForCppRuntime, it prevents symbol from DCE.
This commit is contained in:
committed by
Space Team
parent
d83027720d
commit
01976990e8
@@ -1,18 +1,18 @@
|
||||
import kotlin.native.internal.ExportForCppRuntime
|
||||
import kotlin.native.internal.ExportedBridge
|
||||
|
||||
@ExportForCppRuntime("a")
|
||||
@ExportedBridge("a")
|
||||
public fun a(p0: Byte, p1: Short, p2: Int, p3: Long): Int {
|
||||
val result = pkg.a(p0, p1, p2, p3)
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportForCppRuntime("b")
|
||||
@ExportedBridge("b")
|
||||
public fun b(p0: UByte, p1: UShort, p2: UInt, p3: ULong): UInt {
|
||||
val result = pkg.b(p0, p1, p2, p3)
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportForCppRuntime("c")
|
||||
@ExportedBridge("c")
|
||||
public fun c(p0: Boolean): Boolean {
|
||||
val result = pkg.c(p0)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user