aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2021-12-21 18:28:45 -0800
committerColin Cross <ccross@android.com>2021-12-21 18:28:45 -0800
commit6412c821280e850ea070e6da2f9378c4c277abda (patch)
tree6ef349f10f4497a5801a2cb1d6e15fb406db3335
parentff4e3653d8491bdaccbdb7a208d39597621f9c93 (diff)
downloadjemalloc_new-6412c821280e850ea070e6da2f9378c4c277abda.tar.gz
The integration tests fail to build with musl because the je_* declarations use __attribute__(nothrow), which doesn't match the declarations in musl. When the je_* declarations are renamed to remove the je_ suffix, they collide with the musl declarations and fail with: external/jemalloc_new/include/jemalloc/jemalloc.h:197:28: error: exception specification in declaration does not match previous declaration void JEMALLOC_NOTHROW *je_malloc(size_t size) ^ external/jemalloc_new/include/jemalloc/jemalloc_rename.h:38:21: note: expanded from macro 'je_malloc' ^ external/musl/include/stdlib.h:42:7: note: previous declaration is here void *malloc (size_t); ^ Set JEMALLOC_NO_RENAME for the integration tests so they use the je_* names. This will also avoid the tests accidentally calling the libc methods. Bug: 190084016 Test: m USE_HOST_MUSL=true jemalloc_integrationtests_basic Test: out/host/linux-x86/nativetest/jemalloc5_integrationtests/basic Change-Id: Iddc7e0f9ecb688487484ed413ad8c81ce548cc5f
-rw-r--r--Android.bp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 15f7d63c..b52c09ef 100644
--- a/Android.bp
+++ b/Android.bp
@@ -359,6 +359,7 @@ cc_library_static {
cflags: [
"-U_FORTIFY_SOURCE",
"-DJEMALLOC_INTEGRATION_TEST",
+ "-DJEMALLOC_NO_RENAME",
],
local_include_dirs: [
@@ -395,6 +396,7 @@ cc_test {
cflags: common_cflags + [
"-DJEMALLOC_INTEGRATION_TEST",
+ "-DJEMALLOC_NO_RENAME",
],
local_include_dirs: common_c_local_includes + [