Merge "Update to remove direct include of jemalloc_new."
This commit is contained in:
commit
0e0b473a4c
1 changed files with 18 additions and 37 deletions
|
@ -86,25 +86,27 @@ cc_defaults {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libc_scudo_product_variables = {
|
||||||
|
malloc_not_svelte: {
|
||||||
|
cflags: ["-DUSE_SCUDO"],
|
||||||
|
whole_static_libs: ["libscudo"],
|
||||||
|
exclude_static_libs: [
|
||||||
|
"libjemalloc5",
|
||||||
|
"libc_jemalloc_wrapper",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
// Defaults for native allocator libs/includes to make it
|
// Defaults for native allocator libs/includes to make it
|
||||||
// easier to change.
|
// easier to change.
|
||||||
// To enable scudo, change the below to libc_scudo_defaults
|
// Enable scudo for non-svelte config by adding the line:
|
||||||
// and comment out the defaults line in libc_scudo shared
|
// product_variables: libc_scudo_product_variables,
|
||||||
// library.
|
// to the cc_defaults below. And remove the defaults line
|
||||||
|
// in the libc_scudo library.
|
||||||
// ========================================================
|
// ========================================================
|
||||||
cc_defaults {
|
cc_defaults {
|
||||||
name: "libc_native_allocator_defaults",
|
name: "libc_native_allocator_defaults",
|
||||||
|
|
||||||
defaults: ["libc_jemalloc5_defaults"],
|
|
||||||
}
|
|
||||||
|
|
||||||
cc_defaults {
|
|
||||||
name: "libc_jemalloc5_defaults",
|
|
||||||
|
|
||||||
include_dirs: [
|
|
||||||
"external/jemalloc_new/include",
|
|
||||||
],
|
|
||||||
|
|
||||||
whole_static_libs: [
|
whole_static_libs: [
|
||||||
"libjemalloc5",
|
"libjemalloc5",
|
||||||
"libc_jemalloc_wrapper",
|
"libc_jemalloc_wrapper",
|
||||||
|
@ -119,30 +121,9 @@ cc_library_static {
|
||||||
srcs: ["bionic/jemalloc_wrapper.cpp"],
|
srcs: ["bionic/jemalloc_wrapper.cpp"],
|
||||||
cflags: ["-fvisibility=hidden"],
|
cflags: ["-fvisibility=hidden"],
|
||||||
|
|
||||||
include_dirs: [
|
// Used to pull in the jemalloc include directory so that if the
|
||||||
"external/jemalloc_new/include",
|
// library is removed, the include directory is also removed.
|
||||||
],
|
static_libs: ["libjemalloc5"],
|
||||||
}
|
|
||||||
|
|
||||||
cc_defaults {
|
|
||||||
name: "libc_scudo_defaults",
|
|
||||||
|
|
||||||
cflags: [
|
|
||||||
"-DUSE_SCUDO_SVELTE",
|
|
||||||
],
|
|
||||||
|
|
||||||
product_variables: {
|
|
||||||
malloc_not_svelte: {
|
|
||||||
cflags: [
|
|
||||||
"-UUSE_SCUDO_SVELTE",
|
|
||||||
"-DUSE_SCUDO",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
whole_static_libs: [
|
|
||||||
"libscudo",
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================================
|
// ========================================================
|
||||||
|
|
Loading…
Reference in a new issue