summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuallenauge <Hamsi2k@freenet.de>2020-10-20 21:19:01 +0200
committerMichael Bestas <mkbestas@lineageos.org>2020-12-08 17:39:59 +0200
commite3c150e4710b368ae3317496d22b40c012b3e432 (patch)
treeca84b2328e7a8c93a160cca9db785025b06d643e
parent7b86399763ec36b005a22f8df2dda9bb04dfaf8b (diff)
Add ability to build scudo-free 32-bit libc variant.
Scudo seems to have issues with camera blobs, which also the case with google devices. https://android-review.googlesource.com/q/topic:%22disable-camera24-memory-mitigations%22+(status:open%20OR%20status:merged) These changes are applied upstream and needed much more commits in various components which makes it difficult to backport. Therefore add option to disable scudo only for 32 bit components, like camera modules. Change-Id: Ie4e62477b0801413827007c511e547b12ea2f46d
-rw-r--r--libc/Android.bp21
1 files changed, 20 insertions, 1 deletions
diff --git a/libc/Android.bp b/libc/Android.bp
index e30a632d8..ce714054a 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -102,6 +102,18 @@ libc_scudo_product_variables = {
},
}
+libc32_scudo_product_variables = {
+ malloc_not_svelte_libc32: {
+ 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:
@@ -116,7 +128,14 @@ cc_defaults {
"libc_jemalloc_wrapper",
],
header_libs: ["gwp_asan_headers"],
- product_variables: libc_scudo_product_variables,
+ multilib: {
+ lib64: {
+ product_variables: libc_scudo_product_variables,
+ },
+ lib32: {
+ product_variables: libc32_scudo_product_variables,
+ }
+ },
}
// Functions not implemented by jemalloc directly, or that need to