Files
kotlin-fork/backend.native/tests/main.c
T
2016-12-01 19:20:12 +04:00

26 lines
464 B
C

#ifdef __linux__
# define _GNU_SOURCE
#endif
#include <dlfcn.h>
#include <stdlib.h>
#include <stdio.h>
extern int run_test();
void * resolve_symbol(char *name) {
/* here we can add here some magic to resolve symbols in kotlin native*/
void* symbol = dlsym(RTLD_DEFAULT, name);
if (!symbol) {
printf("Could not find kotlin symbol '%s': %s\n", name, dlerror());
exit(1);
}
return symbol;
}
int
main() {
exit(run_test());
}