backend.native: support external functions

also implement changing external function symbol name with the annotation
This commit is contained in:
Svyatoslav Scherbina
2016-10-19 12:03:41 +03:00
parent 61e1d91c03
commit a1593c86f1
4 changed files with 45 additions and 1 deletions
@@ -0,0 +1,11 @@
package kotlin_native
/**
* Forces the compiler to use specified symbol name for the target `external` function.
*
* TODO: changing symbol name breaks the binary compatibility,
* so it should probably be allowed on `internal` and `private` functions only.
*/
@Target(AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.BINARY)
annotation class SymbolName(val name: String)