ronnie
2022-10-23 68f5ca84d926736535296469a2d3fcbea06ca8a2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
There are configure scripts in this directory to generate the header files
used by the jemalloc library.
 
These scripts are named conf_<HOST_TYPE>.sh, where HOST_TYPE is one of
aarch64, arm, mips, x86, x86_64.
 
In order to build generate the header files for each supported HOST_TYPE,
follow these steps:
 
- source build/envsetup.sh
- lunch <TARGET>
- mmma -jXX bionic
- cd external/jemalloc
- autoconf
- <Modify the configure script>
- android/conf_<HOST_TYPE>.sh
 
Follow these instructions to modify the configure script before running
any of the conf_<HOST_TYPE>.sh scripts.
 
In the code that looks similar to this:
 
case "${host}" in
  *-*-darwin*)
 
Modify it to be:
 
case "${host}" in
  *android*)
    CFLAGS="$CFLAGS"
    CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
    abi="elf"
    force_tls="0"
    enable_tls="0"
    $as_echo "#define JEMALLOC_HAS_ALLOCA_H 1" >>confdefs.h
 
    $as_echo "#define JEMALLOC_PURGE_MADVISE_DONTNEED  " >>confdefs.h
 
    $as_echo "#define JEMALLOC_THREADED_INIT  " >>confdefs.h
    ;;
  *-*-darwin*)