[Rust] add support for optionally compiling libc functions (#763)
* add SNMALLOC_RUST_LIBC_API option
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
#define SNMALLOC_NAME_MANGLE(a) sn_##a
|
||||
#include "snmalloc/snmalloc.h"
|
||||
|
||||
// The libc API provided by malloc.cc will always be mangled per above.
|
||||
#ifdef SNMALLOC_RUST_LIBC_API
|
||||
# include "malloc.cc"
|
||||
#else
|
||||
# include "snmalloc/snmalloc.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user