[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
+4
-4
@@ -1,18 +1,18 @@
|
||||
import kotlin.native.internal.ExportForCppRuntime
|
||||
import kotlin.native.internal.ExportedBridge
|
||||
|
||||
@ExportForCppRuntime("namespace1_main_foobar")
|
||||
@ExportedBridge("namespace1_main_foobar")
|
||||
public fun namespace1_main_foobar(): Int {
|
||||
val result = namespace1.main.foobar()
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportForCppRuntime("namespace1_foo")
|
||||
@ExportedBridge("namespace1_foo")
|
||||
public fun namespace1_foo(): Int {
|
||||
val result = namespace1.foo()
|
||||
return result
|
||||
}
|
||||
|
||||
@ExportForCppRuntime("namespace2_bar")
|
||||
@ExportedBridge("namespace2_bar")
|
||||
public fun namespace2_bar(): Int {
|
||||
val result = namespace2.bar()
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user