add static library (#189)

* add static library

* leave static library on by default

* fix 1mib layout

* code reviews
This commit is contained in:
SchrodingerZhu
2020-05-19 13:46:40 +08:00
committed by GitHub
parent 6dae830ea0
commit 497f9d9386
2 changed files with 17 additions and 2 deletions

View File

@@ -9,8 +9,12 @@ using namespace snmalloc;
#ifndef SNMALLOC_EXPORT
# define SNMALLOC_EXPORT
#endif
#ifndef SNMALLOC_NAME_MANGLE
#ifdef SNMALLOC_STATIC_LIBRARY_PREFIX
# define __SN_CONCAT(a, b) a##b
# define __SN_EVALUATE(a, b) __SN_CONCAT(a, b)
# define SNMALLOC_NAME_MANGLE(a) \
__SN_EVALUATE(SNMALLOC_STATIC_LIBRARY_PREFIX, a)
#elif !defined(SNMALLOC_NAME_MANGLE)
# define SNMALLOC_NAME_MANGLE(a) a
#endif