mirror of
https://github.com/openharmony/third_party_mimalloc.git
synced 2026-07-18 18:14:44 -04:00
Add static library target to BUILD.gn
Signed-off-by: Timur Valeev <valeev.timur@huawei.com>
This commit is contained in:
@@ -2,14 +2,6 @@ import("//build/ohos.gni")
|
||||
|
||||
config("libmimalloc_config") {
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
|
||||
ohos_shared_library("libmimalloc_share") {
|
||||
public_configs = [ ":libmimalloc_config" ]
|
||||
|
||||
sources = [
|
||||
"src/static.c"
|
||||
]
|
||||
|
||||
cflags = [
|
||||
"-std=c11",
|
||||
@@ -29,12 +21,21 @@ ohos_shared_library("libmimalloc_share") {
|
||||
"-fomit-frame-pointer",
|
||||
"-frounding-math",
|
||||
"-pipe",
|
||||
"-fPIC",
|
||||
"-DMI_DEBUG=0",
|
||||
"-DMI_STAT=2",
|
||||
"-Wno-unsupported-floating-point-opt",
|
||||
"-Wno-bitwise-op-parentheses"
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
ohos_shared_library("libmimalloc_share") {
|
||||
configs = [ ":libmimalloc_config" ]
|
||||
|
||||
sources = [
|
||||
"src/static.c"
|
||||
]
|
||||
|
||||
cflags = [ "-fPIC" ]
|
||||
|
||||
defines = [
|
||||
"MI_MALLOC_OVERRIDE",
|
||||
@@ -46,3 +47,16 @@ ohos_shared_library("libmimalloc_share") {
|
||||
|
||||
install_enable = true
|
||||
}
|
||||
|
||||
ohos_static_library("libmimalloc_static") {
|
||||
configs = [ ":libmimalloc_config" ]
|
||||
|
||||
sources = [
|
||||
"src/static.c"
|
||||
]
|
||||
|
||||
defines = [
|
||||
"MI_TLS_PTHREAD",
|
||||
"mimalloc_EXPORTS"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user