aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2024-04-23 17:15:39 -0700
committerChristopher Ferris <cferris@google.com>2024-05-01 15:33:45 -0700
commitb54250572d3335c54fd290fe39c11826aee7652a (patch)
tree398df7d8190552ff00db32b2088bcd2288f6f659
parent4d9af810fd175712f57ebc790654647b759ba82e (diff)
downloadbionic-b54250572d3335c54fd290fe39c11826aee7652a.tar.gz
Change malloc_not_svelte to malloc_low_memory.
The malloc_not_svelte product variable has been removed and is replaced by malloc_low_memory. This switches the sense of the Test: Verified scudo config is used by default. Test: Verified Android GO config uses the jemalloc low memory config. Test: Verified that the default config on oriole produces the exact same Test: libc.so with and without this change. Change-Id: I48085fa6c2dcf5c61f847ef1f15c38653d1f7214
-rw-r--r--libc/Android.bp41
1 files changed, 21 insertions, 20 deletions
diff --git a/libc/Android.bp b/libc/Android.bp
index 84fa498d3..d73420a5a 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -55,7 +55,9 @@ libc_common_flags = [
cc_defaults {
name: "libc_defaults",
defaults: ["linux_bionic_supported"],
- cflags: libc_common_flags,
+ cflags: libc_common_flags + [
+ "-DUSE_SCUDO",
+ ],
asflags: libc_common_flags,
conlyflags: ["-std=gnu99"],
cppflags: [],
@@ -98,8 +100,8 @@ cc_defaults {
malloc_pattern_fill_contents: {
cflags: ["-DSCUDO_PATTERN_FILL_CONTENTS"],
},
- malloc_not_svelte: {
- cflags: ["-DUSE_SCUDO"],
+ malloc_low_memory: {
+ cflags: ["-UUSE_SCUDO"],
},
},
@@ -112,32 +114,31 @@ cc_defaults {
tidy_disabled_srcs: ["upstream-*/**/*.c"],
}
-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
// easier to change.
-// To disable scudo for the non-svelte config remove the line:
-// product_variables: libc_scudo_product_variables,
-// in the cc_defaults below.
// ========================================================
cc_defaults {
name: "libc_native_allocator_defaults",
whole_static_libs: [
- "libjemalloc5",
- "libc_jemalloc_wrapper",
+ "libscudo",
+ ],
+ cflags: [
+ "-DUSE_SCUDO",
],
header_libs: ["gwp_asan_headers"],
- product_variables: libc_scudo_product_variables,
+ product_variables: {
+ malloc_low_memory: {
+ cflags: ["-UUSE_SCUDO"],
+ whole_static_libs: [
+ "libjemalloc5",
+ "libc_jemalloc_wrapper",
+ ],
+ exclude_static_libs: [
+ "libscudo",
+ ],
+ },
+ },
}
// Functions not implemented by jemalloc directly, or that need to