Fix wasm target
This commit is contained in:
committed by
Sergey Bogolepov
parent
ba2d427a12
commit
b8e31c2f6b
@@ -20,6 +20,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
namespace konan {
|
||||
|
||||
// Console operations.
|
||||
@@ -43,6 +45,32 @@ void* memmem(const void *big, size_t bigLen, const void *little, size_t littleLe
|
||||
int snprintf(char* buffer, size_t size, const char* format, ...);
|
||||
size_t strnlen(const char* buffer, size_t maxSize);
|
||||
|
||||
|
||||
|
||||
extern "C" {
|
||||
#ifdef KONAN_WASM
|
||||
|
||||
RUNTIME_USED
|
||||
double pow(double x, double y);
|
||||
|
||||
RUNTIME_USED
|
||||
void *memcpy(void *dst, const void *src, size_t n);
|
||||
|
||||
RUNTIME_USED
|
||||
void *memmove(void *dst, const void *src, size_t len);
|
||||
|
||||
RUNTIME_USED
|
||||
int memcmp(const void *s1, const void *s2, size_t n);
|
||||
|
||||
RUNTIME_USED
|
||||
void *memset(void *b, int c, size_t len);
|
||||
|
||||
RUNTIME_USED
|
||||
size_t strlen(const char *s);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
// Memory operations.
|
||||
void* calloc(size_t count, size_t size);
|
||||
void free(void* ptr);
|
||||
|
||||
Reference in New Issue
Block a user