mirror of
				https://github.com/GrapheneOS/hardened_malloc.git
				synced 2025-11-03 01:06:33 +01:00 
			
		
		
		
	Delete Android.bp
This commit is contained in:
		
							parent
							
								
									4d6456cf58
								
							
						
					
					
						commit
						f50e3983ca
					
				
					 1 changed files with 0 additions and 83 deletions
				
			
		
							
								
								
									
										83
									
								
								Android.bp
									
										
									
									
									
								
							
							
						
						
									
										83
									
								
								Android.bp
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,83 +0,0 @@
 | 
			
		|||
common_cflags = [
 | 
			
		||||
    "-O3",
 | 
			
		||||
    //"-flto",
 | 
			
		||||
    "-fPIC",
 | 
			
		||||
    "-fvisibility=hidden",
 | 
			
		||||
    //"-fno-plt",
 | 
			
		||||
    "-pipe",
 | 
			
		||||
    "-Wall",
 | 
			
		||||
    "-Wextra",
 | 
			
		||||
    "-Wcast-align",
 | 
			
		||||
    "-Wcast-qual",
 | 
			
		||||
    "-Wwrite-strings",
 | 
			
		||||
    "-Wno-constant-logical-operand",
 | 
			
		||||
    "-Werror",
 | 
			
		||||
    "-DH_MALLOC_PREFIX",
 | 
			
		||||
    "-DZERO_ON_FREE=true",
 | 
			
		||||
    "-DWRITE_AFTER_FREE_CHECK=true",
 | 
			
		||||
    "-DSLOT_RANDOMIZE=true",
 | 
			
		||||
    "-DSLAB_CANARY=true",
 | 
			
		||||
    "-DSLAB_QUARANTINE_RANDOM_LENGTH=1",
 | 
			
		||||
    "-DSLAB_QUARANTINE_QUEUE_LENGTH=1",
 | 
			
		||||
    "-DCONFIG_EXTENDED_SIZE_CLASSES=true",
 | 
			
		||||
    "-DCONFIG_LARGE_SIZE_CLASSES=true",
 | 
			
		||||
    "-DGUARD_SLABS_INTERVAL=1",
 | 
			
		||||
    "-DGUARD_SIZE_DIVISOR=2",
 | 
			
		||||
    "-DREGION_QUARANTINE_RANDOM_LENGTH=256",
 | 
			
		||||
    "-DREGION_QUARANTINE_QUEUE_LENGTH=1024",
 | 
			
		||||
    "-DREGION_QUARANTINE_SKIP_THRESHOLD=33554432", // 32MiB
 | 
			
		||||
    "-DFREE_SLABS_QUARANTINE_RANDOM_LENGTH=32",
 | 
			
		||||
    "-DN_ARENA=1",
 | 
			
		||||
    "-DCONFIG_STATS=true",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
cc_defaults {
 | 
			
		||||
    name: "hardened_malloc_defaults",
 | 
			
		||||
    defaults: ["linux_bionic_supported"],
 | 
			
		||||
    cflags: common_cflags,
 | 
			
		||||
    arch: {
 | 
			
		||||
        arm64: {
 | 
			
		||||
            cflags: ["-DCONFIG_CLASS_REGION_SIZE=2147483648"] // 2GiB
 | 
			
		||||
        },
 | 
			
		||||
        x86_64: {
 | 
			
		||||
            cflags: ["-DCONFIG_CLASS_REGION_SIZE=34359738368"] // 32GiB
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    conlyflags: ["-std=c11", "-Wmissing-prototypes"],
 | 
			
		||||
    stl: "none",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
lib_src_files = [
 | 
			
		||||
    "chacha.c",
 | 
			
		||||
    "h_malloc.c",
 | 
			
		||||
    "memory.c",
 | 
			
		||||
    "pages.c",
 | 
			
		||||
    "random.c",
 | 
			
		||||
    "util.c",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
cc_library {
 | 
			
		||||
    name: "libhardened_malloc",
 | 
			
		||||
    ramdisk_available: true,
 | 
			
		||||
    recovery_available: true,
 | 
			
		||||
    defaults: ["hardened_malloc_defaults"],
 | 
			
		||||
    srcs: lib_src_files,
 | 
			
		||||
    export_include_dirs: ["include"],
 | 
			
		||||
    static_libs: ["libasync_safe"],
 | 
			
		||||
    target: {
 | 
			
		||||
        android: {
 | 
			
		||||
            shared: {
 | 
			
		||||
                enabled: false,
 | 
			
		||||
            },
 | 
			
		||||
            system_shared_libs: [],
 | 
			
		||||
        },
 | 
			
		||||
        linux_bionic: {
 | 
			
		||||
            system_shared_libs: [],
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    product_variables: {
 | 
			
		||||
        debuggable: {
 | 
			
		||||
            cflags: ["-DLABEL_MEMORY"],
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue