cc_atomslog_library
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
afdo
,
aidl
,
aidl_version
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
atoms_module
,
basename
,
bootstrap
,
bpf_target
,
buildstubs
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
clang_verify
,
cmake_snapshot_supported
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug_ramdisk
,
device_first_generated_headers
,
device_specific
,
dist
,
dists
,
double_loadable
,
dynamic_list
,
enabled
,
exclude_generated_sources
,
exclude_runtime_libs
,
exclude_shared_libs
,
exclude_static_libs
,
export_cflags
,
export_generated_headers
,
export_header_lib_headers
,
export_include_dirs
,
export_shared_lib_headers
,
export_static_lib_headers
,
export_system_include_dirs
,
exported_symbols_list
,
force_rust_staticlib
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
gen_type
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_cross_supported
,
host_ldlibs
,
host_required
,
ignore_max_page_size
,
include_build_directory
,
include_default_libs
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
install_in_root
,
install_in_xbin
,
install_path_skip_first_stage_ramdisk_dir
,
installable
,
instruction_set
,
interface
,
ldflags
,
lex
,
lfi_libs
,
lfi_supported
,
lfienabled
,
lfistoresonly
,
lfiuserlbox
,
lfivariation
,
licenses
,
linker_scripts
,
llndk
,
local_include_dirs
,
logtags
,
lto
,
lto_O0
,
min_sdk_version
,
multilib
,
namespace
,
native_bridge_supported
,
native_coverage
,
no_crt_pad_segment
,
no_full_install
,
no_libcrt
,
nocrt
,
odm_available
,
odm_dlkm_specific
,
openmp
,
optimize_for_size
,
orderfile
,
overrides
,
owner
,
pack_relocations
,
product_available
,
product_specific
,
product_variables.arc
,
product_variables.binder32bit
,
product_variables.build_from_text_stub
,
product_variables.debuggable
,
product_variables.eng
,
product_variables.malloc_low_memory
,
product_variables.malloc_pattern_fill_contents
,
product_variables.malloc_scudo_tsds_max
,
product_variables.malloc_zero_contents
,
product_variables.native_coverage
,
product_variables.override_rs_driver
,
product_variables.platform_sdk_version
,
product_variables.release_aidl_use_unfrozen
,
product_variables.safestack
,
product_variables.selinuxignoreneverallows
,
product_variables.shipping_api_level
,
product_variables.uml
,
product_variables.unbundled_build
,
proprietary
,
proto
,
proto_srcs
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
split_all_variants
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_dlkm_specific
,
system_ext_specific
,
system_shared_libs
,
target
,
target.android
,
target.apex
,
target.host
,
target.non_apex
,
target.platform
,
target.product
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target.vendor_ramdisk
,
target_required
,
team
,
test_harness_ramdisk
,
test_only
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_disabled_srcs
,
tidy_flags
,
tidy_timeout_srcs
,
unchecked_module
,
unexported_symbols_list
,
unique_host_soname
,
use_generic_config
,
use_version_lib
,
vendor
,
vendor_available
,
vendor_dlkm_specific
,
vendor_kernel_ramdisk
,
vendor_public_library
,
vendor_ramdisk
,
vendor_ramdisk_available
,
version_script
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
,
whole_program_vtables
,
whole_static_libs
,
xom
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
configurable list of string, list of source files used to compile the C/C++ module. May be .c, .cpp, or .S files.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
exclude_srcs
configurable list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
defaults
list of string
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
afdo
bool, Afdo allows developers self-service enroll for
automatic feedback-directed optimization using profile data.
⊕aidl
libs
list of string, List of aidl_library modules
include_dirs
list of string, list of directories that will be added to the aidl include paths.
local_include_dirs
list of string, list of directories relative to the Blueprints file that will
be added to the aidl include paths.
generate_traces
bool, whether to generate traces (for systrace) for this interface
flags
list of string, list of flags that will be passed to the AIDL compiler
aidl_version
int64, Version of AIDL lib to use for vendor logging. Default is 2.
allow_undefined_symbols
bool, allow the module to contain undefined symbols. By default,
modules cannot contain undefined symbols that are not satisified by their immediate
dependencies. Set this flag to true to remove --no-undefined from the linker flags.
This flag should only be necessary for compiling low-level libraries like libc.
apex_available
list of string, Availability of this module in APEXes. Only the listed APEXes can contain this module. If
the module has stubs then other APEXes and the platform may access it through them
(subject to visibility).
"//apex_available:anyapex" is a pseudo APEX name that matches to any APEX.
"//apex_available:platform" refers to non-APEX partitions like "system.img".
Prefix pattern (com.foo.*) can be used to match with any APEX name with the prefix(com.foo.).
Wildcard ? can be used to match exactly one path segment (e.g. com.?.foo matches com.bar.foo). This may be combined with prefix pattern for complex routing (e.g., com.?.foo.*).
Default is ["//apex_available:platform"].
arch
interface
asflags
list of string, list of module-specific flags that will be used for .S compiles
atoms_module
string, Atoms module annotation.
basename
string, Basename of the header and cpp files generated.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
bpf_target
bool, cc Build rules targeting BPF must set this to true. The correct fix is to
ban targeting bpf in cc rules instead use bpf_rules. (b/323415017)
⊕buildstubs
bool
c_std
string, C standard version to use. Can be a specific version (such as "gnu11"),
"experimental" (which will use draft versions like C1x when available),
or the empty string (which will use the default).
cflags
configurable list of string, list of module-specific flags that will be used for C and C++ compiles.
clang
bool, Deprecated. true is the default, false is invalid.
clang_asflags
list of string, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of string, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
clang_verify
bool, Add "-Xclang -verify" to the cflags and appends "touch $out" to
the clang command line.
cmake_snapshot_supported
bool, Allows this module to be included in CMake release snapshots to be built outside of Android
build system and source tree.
compile_multilib
configurable string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform).
conlyflags
list of string, list of module-specific flags that will be used for C compiles
cpp_std
string, C++ standard version to use. Can be a specific version (such as
"gnu++11"), "experimental" (which will use draft versions like C++1z when
available), or the empty string (which will use the default).
cppflags
configurable list of string, list of module-specific flags that will be used for C++ compiles
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
Dist
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
targets
list of string, Copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
append_artifact_with_product
bool, If true, then the artifact file will be appended with _<product name>. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be foo_coral.apk. If false, there is
no change to the artifact file name.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended with <product name>-. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be coral-foo.apk. If false, there is
no change to the artifact file name.
tag
string, A string tag to select the OutputFiles associated with the tag.
If no tag is specified then it will select the default dist paths provided
by the module type. If a tag of "" is specified then it will return the
default output files provided by the modules, i.e. the result of calling
OutputFiles("").
only_on_java_coverage_builds
bool, Only do the dist on java coverage builds (EMMA_INSTRUMENT=true).
Used for disting java coverage reports which are not built normally.
dists
list of Dist, a list of configurations to distribute output files from this module to the
distribution directory (default: $OUT/dist, configurable with $DIST_DIR)
double_loadable
bool, whether this module is capable of being loaded with other instance
(possibly an older version) of the same module in the same process.
Currently, a shared library that is a member of VNDK (vndk: {enabled: true})
can be double loaded in a vendor process if the library is also a
(direct and indirect) dependency of an LLNDK library. Such libraries must be
explicitly marked as `double_loadable: true` by the owner, or the dependency
from the LLNDK lib should be cut if the lib is not designed to be double loaded.
dynamic_list
string, local file name to pass to the linker as --dynamic-list. Not supported on darwin, and will fail to build
if provided to the darwin variant of a module.
enabled
configurable bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
exclude_generated_sources
list of string, list of generated sources that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with this module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build this module
exclude_static_libs
list of string, list of static libs that should not be used to build this module
export_cflags
configurable list of string, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
configurable list of string, list of directories relative to the Blueprints file that will
be added to the include path (using -I) for this module and any module that links
against this module. Directories listed in export_include_dirs do not need to be
listed in local_include_dirs.
export_system_include_dirs
list of string, list of directories that will be added to the system include path
using -isystem for this module and any module that links against this module.
exported_symbols_list
string, local file name to pass to the linker as -exported_symbols_list
force_rust_staticlib
bool, Force_rust_staticlib will force generation of the Rust staticlib with all Rust
dependencies and whole-archive it into the staticlib. This should only be set
for static libraries that are intended for use outside of Soong and should not
be set on static libraries used within Soong.
force_symbols_not_weak_list
string, local file name to pass to the linker as -force_symbols_not_weak_list
force_symbols_weak_list
string, local file name to pass to the linker as -force_symbols_weak_list
gen_type
string, Type of logging sources to generate. There are 2 choices:
"default": Generate logging methods that have a parameter for each atom field. [default]
"typesafe": Generate logging methods that use a struct for creating atom events.
generated_sources
list of string, list of generated sources to compile. These are the names of gensrcs or
genrule modules.
gnu_extensions
bool, if set to false, use -std=c++* instead of -std=gnu++*
group_static_libs
bool, deprecated and ignored because lld makes it unnecessary. See b/189475744.
Properties for ABI compatibility checker.
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
host_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_ldlibs
list of string, -l arguments to pass to linker for host-provided shared libraries
host_required
list of string, names of other modules to install on host if this module is installed
ignore_max_page_size
bool, ignore max page size. By default, max page size must be the
max page size set for the target.
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_default_libs
string, Options for including libstatssocket and libstatspull dependencies. There are 3 choices:
"full": include libstatssocket and libstatspull as shared_libs,
"headers_only": include libstatssocket_headers and libstatspull_headers as header_libs,
"none": Nothing is included by default.
The default option is "full" unless interface is set to "vendor"; then the default is "none".
If "interface" property is set to "vendor", this should be set to "none".
include_dirs
configurable list of string, list of directories relative to the root of the source tree that will
be added to the include path using -I.
If possible, don't use this. If adding paths from the current directory use
local_include_dirs, if adding paths from other modules use export_include_dirs in
that module.
init_rc
configurable list of string, init.rc files to be installed if this module is installed
inject_bssl_hash
bool, Inject boringssl hash into the shared library. This is only intended for use by external/boringssl.
install_in_root
bool, Install output directly in {partition}/, not in any subdir. This is only intended for use by
init_first_stage.
install_in_xbin
bool, Install output directly in {partition}/xbin
install_path_skip_first_stage_ramdisk_dir
bool, Whether the install path skips first_stage_ramdisk subdirectory.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
interface
string, The codegen API to use. Supported APIs are "platform" (default), "vendor", or "bootstrap".
ldflags
configurable list of string, list of module-specific flags that will be used for all link steps
lex
LexProperties
lfi_libs
list of string, List of lfi libs to statically link into this module. The lfi libs must be cc binaries
with lfi: { enabled: true }.
Lfi stands for Lightweight Fault Isolation and is a form of in-process sandboxing. The
lfi libs each are run in their own sandbox.
lfi_supported
bool, Whether this module can be built with for lightweight fault isolation (LFI), an
in-process sandboxing technique.
⊕lfienabled
bool
⊕lfistoresonly
bool
⊕lfiuserlbox
bool
⊕lfivariation
bool
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
linker_scripts
configurable list of string, local files to pass to the linker as --script. Not supported on darwin or windows, and will fail to build
if provided to the darwin or windows variant of a module.
⊕llndk
llndkLibraryProperties
If this is an LLNDK library, properties to describe the LLNDK stubs. Will be copied from
the module pointed to by llndk_stubs if it is set.
symbol_file
string, Relative path to the symbol map.
An example file can be seen here: TODO(danalbert): Make an example.
unversioned
bool, Whether the system library uses symbol versions.
override_export_include_dirs
list of string, list of directories relative to the Blueprints file that willbe added to the include path
(using -I) for any module that links against the LLNDK variant of this module, replacing
any that were listed outside the llndk clause.
private
bool, whether this module can be directly depended upon by libs that are installed
to /vendor and /product.
When set to true, this module can only be depended on by VNDK libraries, not
vendor nor product libraries. This effectively hides this module from
non-system modules. Default value is false.
moved_to_apex
bool, moved_to_apex marks this module has having been distributed through an apex module.
local_include_dirs
configurable list of string, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of string, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitalization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
thin
bool
lto_O0
bool, Use --lto-O0 flag.
min_sdk_version
configurable string, Minimum OS API level supported by this C or C++ module. This property becomes the value
of the __ANDROID_API__ macro. When the C or C++ module is included in an APEX or an APK,
this property is also used to ensure that the min_sdk_version of the containing module is
not older (i.e. less) than this module's min_sdk_version. When not set, this property
defaults to the value of sdk_version. When this is set to "apex_inherit", this tracks
min_sdk_version of the containing APEX. When the module
is not built for an APEX, "apex_inherit" defaults to sdk_version.
multilib
interface
namespace
string, C++ namespace where the generated symbols go.
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
native_coverage
bool
no_crt_pad_segment
bool, don't link in crt_pad_segment. This flag is currently only used internal to
soong for testing and for vndk prebuilt shared libraries.
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
odm_available
bool, This is the same as the "vendor_available" except that the install path
of the vendor variant is /odm or /vendor/odm.
By replacing "vendor_available: true" with "odm_available: true", the
module will install its vendor variant to the /odm partition or /vendor/odm.
As the modules with "odm_available: true" still create the vendor variants,
they can link to the other vendor modules as the vendor_available modules do.
Also, the vendor modules can link to odm_available modules.
It may not be used for VNDK modules.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
openmp
bool, Build and link with OpenMP
optimize_for_size
bool, Aggresively trade performance for smaller binary size.
This should only be used for on-device binaries that are rarely executed and not
performance critical.
⊕orderfile
instrumentation
bool
order_file_path
string
load_order_file
bool
cflags
list of string, Additional compiler flags to use when building this module
for orderfile profiling.
overrides
list of string, Names of modules to be overridden. Listed modules can only be other shared libraries
(in Make or Soong).
This does not completely prevent installation of the overridden libraries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other library will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
product_available
bool, whether this module should be allowed to be directly depended by other
modules with `product_specific: true` or `product_available: true`.
If set to true, an additional product variant will be built separately
that is limited to the set of libraries and headers that are exposed to
/product modules.
The product variant may be used with a different (newer) /system,
so it shouldn't have any unversioned runtime dependencies, or
make assumptions about the system that may not be true in the
future.
If set to false, this module becomes inaccessible from /product modules.
Different from the 'vendor_available' property, the modules with
vndk: {enabled: true} don't have to define 'product_available'. The VNDK
library without 'product_available' may not be depended on by any other
modules that has product variants including the product available VNDKs.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
and PRODUCT_PRODUCT_VNDK_VERSION isn't set.
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
⊕product_variables.arc
⊕cflags
⊕exclude_srcs
⊕include_dirs
⊕shared_libs
⊕static_libs
⊕srcs
⊕whole_static_libs
⊕product_variables.binder32bit
⊕product_variables.build_from_text_stub
⊕static_libs
⊕exclude_static_libs
⊕product_variables.debuggable
⊕cflags
⊕cppflags
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕strip.all
⊕strip.keep_symbols
⊕strip.keep_symbols_and_debug_frame
⊕static_libs
⊕exclude_static_libs
⊕whole_static_libs
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.eng
⊕cflags
⊕cppflags
⊕lto.never
⊕sanitize.address
⊕product_variables.malloc_low_memory
⊕cflags
⊕shared_libs
⊕whole_static_libs
⊕static_libs
⊕exclude_static_libs
⊕srcs
⊕product_variables.malloc_pattern_fill_contents
⊕product_variables.malloc_scudo_tsds_max
⊕product_variables.malloc_zero_contents
⊕product_variables.native_coverage
⊕product_variables.override_rs_driver
⊕product_variables.platform_sdk_version
⊕product_variables.release_aidl_use_unfrozen
⊕cflags
⊕required
⊕vintf_fragment_modules
⊕product_variables.safestack
⊕product_variables.selinuxignoreneverallows
⊕product_variables.shipping_api_level
⊕product_variables.uml
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
static
bool, Link statically against the protobuf runtime
proto_srcs
list of string, Path(s) to proto srcs for atoms. Only one file must define the Atom proto message.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk.
On device without a dedicated recovery partition, the module is only
available after switching root into
/first_stage_ramdisk. To expose the module before switching root, install
the recovery variant instead.
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
relative_install_path
string, install to a subdirectory of the default install path for the module
⊕renderscript
include_dirs
list of string, list of directories that will be added to the llvm-rs-cc include paths
flags
list of string, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
configurable list of string, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of string, list of modules that should be installed with this module. This is similar to 'required'
but '.vendor' suffix will be appended to the module names if the shared libraries have
vendor variants and this module uses VNDK.
⊕sanitize
SanitizeUserProps
never
bool, Prevent use of any sanitizers on this module
address
bool, ASan (Address sanitizer), incompatible with static binaries.
Always runs in a diagnostic mode.
Use of address sanitizer disables cfi sanitizer.
Hwaddress sanitizer takes precedence over this sanitizer.
thread
bool, TSan (Thread sanitizer), incompatible with static binaries and 32 bit architectures.
Always runs in a diagnostic mode.
Use of thread sanitizer disables cfi and scudo sanitizers.
Hwaddress sanitizer takes precedence over this sanitizer.
hwaddress
bool, HWASan (Hardware Address sanitizer).
Use of hwasan sanitizer disables cfi, address, thread, and scudo sanitizers.
all_undefined
bool, Undefined behavior sanitizer
undefined
bool, Subset of undefined behavior sanitizer
misc_undefined
list of string, List of specific undefined behavior sanitizers to enable
fuzzer
bool, Fuzzer, incompatible with static binaries.
safestack
bool, safe-stack sanitizer, incompatible with 32-bit architectures.
cfi
bool, cfi sanitizer, incompatible with asan, hwasan, fuzzer, or Darwin
integer_overflow
bool, signed/unsigned integer overflow sanitizer, incompatible with Darwin.
scudo
bool, scudo sanitizer, incompatible with asan, hwasan, tsan
This should not be used in Android 11+ : https://source.android.com/devices/tech/debug/scudo
deprecated
scs
bool, shadow-call-stack sanitizer, only available on arm64/riscv64.
memtag_heap
bool, Memory-tagging, only available on arm64
if diag.memtag unset or false, enables async memory tagging
memtag_stack
bool, Memory-tagging stack instrumentation, only available on arm64
Adds instrumentation to detect stack buffer overflows and use-after-scope using MTE.
memtag_globals
bool, Memory-tagging globals instrumentation, only available on arm64
Adds instrumentation to detect global buffer overflows using MTE.
writeonly
bool, A modifier for ASAN and HWASAN for write only instrumentation
⊕diag
Sanitizers to run in the diagnostic mode (as opposed to the release mode).
Replaces abort() on error with a human-readable error message.
Address and Thread sanitizers always run in diagnostic mode.
undefined
bool, Undefined behavior sanitizer, diagnostic mode
cfi
bool, cfi sanitizer, diagnostic mode, incompatible with asan, hwasan, fuzzer, or Darwin
integer_overflow
bool, signed/unsigned integer overflow sanitizer, diagnostic mode, incompatible with Darwin.
memtag_heap
bool, Memory-tagging, only available on arm64
requires sanitizer.memtag: true
if set, enables sync memory tagging
misc_undefined
list of string, List of specific undefined behavior sanitizers to enable in diagnostic mode
no_recover
list of string, List of sanitizers to pass to -fno-sanitize-recover
results in only the first detected error for these sanitizers being reported and program then
exits with a non-zero exit code.
⊕config
Sanitizers to run with flag configuration specified
cfi_assembly_support
bool, Enables CFI support flags for assembly-heavy libraries
recover
list of string, List of sanitizers to pass to -fsanitize-recover
allows execution to continue for these sanitizers to detect multiple errors rather than only
the first one
blocklist
string, value to pass to -fsanitize-ignorelist
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, The API level that this module is built against. The APIs of this API level will be
visible at build time, but use of any APIs newer than min_sdk_version will render the
module unloadable on older devices. In the future it will be possible to weakly-link new
APIs, making the behavior match Java: such modules will load on older devices, but
calling new APIs on devices that do not support them will result in a crash.
This property has the same behavior as sdk_version does for Java modules. For those
familiar with Android Gradle, the property behaves similarly to how compileSdkVersion
does for Java code.
In addition, setting this property causes two variants to be built, one for the platform
and one for apps.
⊕shared
StaticOrSharedProperties
srcs
configurable list of string
tidy_disabled_srcs
list of string
tidy_timeout_srcs
list of string
⊕sanitized
Sanitized
⊕none
⊕address
⊕hwaddress
cflags
configurable list of string
enabled
bool
whole_static_libs
configurable list of string
static_libs
configurable list of string
shared_libs
configurable list of string
system_shared_libs
list of string
apex_available
list of string
installable
bool
shared_libs
configurable list of string, list of modules that should be dynamically linked into this module.
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
split_all_variants
bool, If this property is set to true, all supported variants of the module will be created.
Primarily intended for use in unit tests.
⊕static
StaticOrSharedProperties
srcs
configurable list of string
tidy_disabled_srcs
list of string
tidy_timeout_srcs
list of string
⊕sanitized
Sanitized
⊕none
⊕address
⊕hwaddress
cflags
configurable list of string
enabled
bool
whole_static_libs
configurable list of string
static_libs
configurable list of string
shared_libs
configurable list of string
system_shared_libs
list of string
apex_available
list of string
installable
bool
static_libs
configurable list of string, list of modules that should be statically linked into this module.
static_ndk_lib
bool, Static_ndk_lib is true if the static variant of the library is intended for NDK use.
stem
string, set the name of the output
stl
string, Select the STL library to use. Possible values are "libc++",
"libc++_static", "libstdc++", or "none". Leave blank to select the
default.
⊕strip
none
bool, Device modules default to stripping enabled leaving mini debuginfo.
Host modules default to stripping disabled, but can be enabled by setting any other
strip boolean property.
all
bool, all forces stripping everything, including the mini debug info.
keep_symbols
bool, keep_symbols enables stripping but keeps all symbols.
keep_symbols_list
list of string, keep_symbols_list specifies a list of symbols to keep if keep_symbols is enabled.
If it is unset then all symbols are kept.
keep_symbols_and_debug_frame
bool, keep_symbols_and_debug_frame enables stripping but keeps all symbols and debug frames.
⊕stubs
StubsProperties
Generate stubs to make this library accessible to APEXes.
symbol_file
string, Relative path to the symbol map. The symbol map provides the list of
symbols that are exported for stubs variant of this library.
versions
list of string, List versions to generate stubs libs for. The version name "current" is always
implicitly added.
implementation_installable
bool, Whether to not require the implementation of the library to be installed if a
client of the stubs is installed. Defaults to true; set to false if the
implementation is made available by some other means, e.g. in a Microdroid
virtual machine.
suffix
string, set suffix of the name of the output
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
system_shared_libs
list of string, list of system libraries that will be dynamically linked to
shared library and executable modules. If unset, generally defaults to libc,
libm, and libdl. Set to [] to prevent linking against the defaults.
target
interface
⊕target.android
compile_multilib
configurable string
enabled
bool
⊕target.apex
exclude_shared_libs
list of string, list of shared libs that should not be used to build the apex variant of
the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build the apex
variant of the C/C++ module.
⊕target.host
compile_multilib
configurable string
⊕target.non_apex
exclude_shared_libs
list of string, list of shared libs that should not be used to build the non-apex
variant of the C/C++ module.
⊕target.platform
shared_libs
list of string, list of shared libs that should be use to build the platform variant
of a module that sets sdk_version. This should rarely be necessary,
in most cases the same libraries are available for the SDK and platform
variants.
exclude_shared_libs
list of string, list of shared libs that should not be used to build the platform variant
of the C/C++ module.
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
required
list of string, List of modules required by the core variant.
exclude_required
list of string, List of modules not required by the core variant.
cflags
list of string, List of additional cflags that should be used to build the platform
variant of the C/C++ module.
⊕target.product
suffix
string, set suffix of the name of the output
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
no_stubs
bool, Disable stubs for vendor/product variants
This is a workaround to keep `stubs` only for "core" variant (not product/vendor).
It would be nice if we could put `stubs` into a `target: { core: {} }`
block but it's not supported in soong yet. This could be removed/simplified once we have
a better syntax.
srcs
list of string, list of source files that should only be used in vendor or
product variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to build vendor
or product variant of the C/C++ module.
cflags
configurable list of string, List of additional cflags that should be used to build vendor
or product variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to build
vendor or product variant of the C/C++ module.
shared_libs
list of string, list of shared libs that only should be used to build vendor or
product variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build vendor or
product variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor or product variant of the C/C++ module.
version_script
string, version script for vendor or product variant
override_export_include_dirs
list of string, list of exported include directories, like
export_include_dirs, that will be applied to
vendor or product variant of this library.
This will overwrite any other declarations.
⊕target.ramdisk
static_libs
list of string, list of static libs that only should be used to build the ramdisk
variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
ramdisk variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to
build the ramdisk variants of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the ramdisk
variants of the C/C++ module.
⊕target.recovery
required
list of string, List of modules required by the recovery variant.
exclude_required
list of string, List of modules not required by the recovery variant.
srcs
list of string, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to
build the recovery variant of the C/C++ module.
shared_libs
list of string, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
recovery variant of the C/C++ module.
⊕target.vendor
override_export_include_dirs
list of string, list of exported include directories, like
export_include_dirs, that will be applied to
vendor or product variant of this library.
This will overwrite any other declarations.
suffix
string, set suffix of the name of the output
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
no_stubs
bool, Disable stubs for vendor/product variants
This is a workaround to keep `stubs` only for "core" variant (not product/vendor).
It would be nice if we could put `stubs` into a `target: { core: {} }`
block but it's not supported in soong yet. This could be removed/simplified once we have
a better syntax.
shared_libs
list of string, list of shared libs that only should be used to build vendor or
product variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build vendor or
product variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor or product variant of the C/C++ module.
version_script
string, version script for vendor or product variant
srcs
list of string, list of source files that should only be used in vendor or
product variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to build vendor
or product variant of the C/C++ module.
cflags
configurable list of string, List of additional cflags that should be used to build vendor
or product variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to build
vendor or product variant of the C/C++ module.
⊕target.vendor_ramdisk
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the vendor ramdisk variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the vendor ramdisk variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor ramdisk variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to
build the ramdisk variants of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the ramdisk
variants of the C/C++ module.
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_harness_ramdisk
bool, Whether this module is installed to test harness ramdisk
test_only
bool, Indicates that the module and its source code are only used in tests, not
production code. Used by coverage reports and potentially other tools.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of string, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of string, Checks that should be treated as errors.
tidy_disabled_srcs
list of string, list of source files that should not be compiled with clang-tidy.
tidy_flags
list of string, Extra flags to pass to clang-tidy
tidy_timeout_srcs
list of string, list of source files that should not be compiled by clang-tidy when TIDY_TIMEOUT is set.
unchecked_module
bool, If this property is set to true, this module will not be built on checkbuilds.
unexported_symbols_list
string, local file name to pass to the linker as -unexported_symbols_list
unique_host_soname
bool, rename host libraries to prevent overlap with system installed libraries
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
use_version_lib
bool, make android::build:GetBuildNumber() available containing the build ID.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vendor_available
bool, whether this module should be allowed to be directly depended by other
modules with `vendor: true`, `proprietary: true`, or `vendor_available:true`.
If set to true, two variants will be built separately, one like
normal, and the other limited to the set of libraries and headers
that are exposed to /vendor modules.
The vendor variant may be used with a different (newer) /system,
so it shouldn't have any unversioned runtime dependencies, or
make assumptions about the system that may not be true in the
future.
If set to false, this module becomes inaccessible from /vendor modules.
The modules with vndk: {enabled: true} must define 'vendor_available'
to 'true'.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
vendor_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_kernel_ramdisk
bool, Whether this module is installed to vendor kernel ramdisk
⊕vendor_public_library
vendorPublicLibraryProperties
If this is a vendor public library, properties to describe the vendor public library stubs.
symbol_file
string, Relative path to the symbol map.
unversioned
bool, Whether the system library uses symbol versions.
override_export_include_dirs
list of string, list of directories relative to the Blueprints file that willbe added to the include path
(using -I) for any module that links against the LLNDK variant of this module, replacing
any that were listed outside the llndk clause.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
vendor_ramdisk_available
bool, Make this module available when building for vendor ramdisk.
On device without a dedicated recovery partition, the module is only
available after switching root into
/first_stage_ramdisk. To expose the module before switching root, install
the recovery variant instead.
version_script
string, local file name to pass to the linker as --version-script. Not supported on darwin, and will fail to build
if provided to the darwin variant of a module.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable list of string, VINTF manifest fragments to be installed if this module is installed
visibility
list of string, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/main/README.md#visibility for
more details.
whole_program_vtables
bool, Use -fwhole-program-vtables cflag.
whole_static_libs
configurable list of string, list of modules whose object files should be linked into this module
in their entirety. For static library modules, all of the .o files from the intermediate
directory of the dependency will be linked into this modules .a file. For a shared library,
the dependency's .a file will be linked into this module using -Wl,--whole-archive.
xom
bool, Xom controls whether or not xom should be enabled for this module. Setting
this to false will disable xom for all dependents which link this module
statically.
yacc
YaccProperties
cc_atomslog_library_shared
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
afdo
,
aidl
,
aidl_version
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
atoms_module
,
basename
,
bootstrap
,
bpf_target
,
buildstubs
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
clang_verify
,
cmake_snapshot_supported
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug_ramdisk
,
device_first_generated_headers
,
device_specific
,
dist
,
dists
,
double_loadable
,
dynamic_list
,
enabled
,
exclude_generated_sources
,
exclude_runtime_libs
,
exclude_shared_libs
,
exclude_static_libs
,
export_cflags
,
export_generated_headers
,
export_header_lib_headers
,
export_include_dirs
,
export_shared_lib_headers
,
export_static_lib_headers
,
export_system_include_dirs
,
exported_symbols_list
,
force_rust_staticlib
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
gen_type
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_cross_supported
,
host_ldlibs
,
host_required
,
ignore_max_page_size
,
include_build_directory
,
include_default_libs
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
install_in_root
,
install_in_xbin
,
install_path_skip_first_stage_ramdisk_dir
,
installable
,
instruction_set
,
interface
,
ldflags
,
lex
,
lfi_libs
,
lfi_supported
,
lfienabled
,
lfistoresonly
,
lfiuserlbox
,
lfivariation
,
licenses
,
linker_scripts
,
llndk
,
local_include_dirs
,
logtags
,
lto
,
lto_O0
,
min_sdk_version
,
multilib
,
namespace
,
native_bridge_supported
,
native_coverage
,
no_crt_pad_segment
,
no_full_install
,
no_libcrt
,
nocrt
,
odm_available
,
odm_dlkm_specific
,
openmp
,
optimize_for_size
,
orderfile
,
overrides
,
owner
,
pack_relocations
,
product_available
,
product_specific
,
product_variables.arc
,
product_variables.binder32bit
,
product_variables.build_from_text_stub
,
product_variables.debuggable
,
product_variables.eng
,
product_variables.malloc_low_memory
,
product_variables.malloc_pattern_fill_contents
,
product_variables.malloc_scudo_tsds_max
,
product_variables.malloc_zero_contents
,
product_variables.native_coverage
,
product_variables.override_rs_driver
,
product_variables.platform_sdk_version
,
product_variables.release_aidl_use_unfrozen
,
product_variables.safestack
,
product_variables.selinuxignoreneverallows
,
product_variables.shipping_api_level
,
product_variables.uml
,
product_variables.unbundled_build
,
proprietary
,
proto
,
proto_srcs
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
split_all_variants
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_dlkm_specific
,
system_ext_specific
,
system_shared_libs
,
target
,
target.android
,
target.apex
,
target.host
,
target.non_apex
,
target.platform
,
target.product
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target.vendor_ramdisk
,
target_required
,
team
,
test_harness_ramdisk
,
test_only
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_disabled_srcs
,
tidy_flags
,
tidy_timeout_srcs
,
unchecked_module
,
unexported_symbols_list
,
unique_host_soname
,
use_generic_config
,
use_version_lib
,
vendor
,
vendor_available
,
vendor_dlkm_specific
,
vendor_kernel_ramdisk
,
vendor_public_library
,
vendor_ramdisk
,
vendor_ramdisk_available
,
version_script
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
,
whole_program_vtables
,
whole_static_libs
,
xom
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
configurable list of string, list of source files used to compile the C/C++ module. May be .c, .cpp, or .S files.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
exclude_srcs
configurable list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
defaults
list of string
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
afdo
bool, Afdo allows developers self-service enroll for
automatic feedback-directed optimization using profile data.
⊕aidl
libs
list of string, List of aidl_library modules
include_dirs
list of string, list of directories that will be added to the aidl include paths.
local_include_dirs
list of string, list of directories relative to the Blueprints file that will
be added to the aidl include paths.
generate_traces
bool, whether to generate traces (for systrace) for this interface
flags
list of string, list of flags that will be passed to the AIDL compiler
aidl_version
int64, Version of AIDL lib to use for vendor logging. Default is 2.
allow_undefined_symbols
bool, allow the module to contain undefined symbols. By default,
modules cannot contain undefined symbols that are not satisified by their immediate
dependencies. Set this flag to true to remove --no-undefined from the linker flags.
This flag should only be necessary for compiling low-level libraries like libc.
apex_available
list of string, Availability of this module in APEXes. Only the listed APEXes can contain this module. If
the module has stubs then other APEXes and the platform may access it through them
(subject to visibility).
"//apex_available:anyapex" is a pseudo APEX name that matches to any APEX.
"//apex_available:platform" refers to non-APEX partitions like "system.img".
Prefix pattern (com.foo.*) can be used to match with any APEX name with the prefix(com.foo.).
Wildcard ? can be used to match exactly one path segment (e.g. com.?.foo matches com.bar.foo). This may be combined with prefix pattern for complex routing (e.g., com.?.foo.*).
Default is ["//apex_available:platform"].
arch
interface
asflags
list of string, list of module-specific flags that will be used for .S compiles
atoms_module
string, Atoms module annotation.
basename
string, Basename of the header and cpp files generated.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
bpf_target
bool, cc Build rules targeting BPF must set this to true. The correct fix is to
ban targeting bpf in cc rules instead use bpf_rules. (b/323415017)
⊕buildstubs
bool
c_std
string, C standard version to use. Can be a specific version (such as "gnu11"),
"experimental" (which will use draft versions like C1x when available),
or the empty string (which will use the default).
cflags
configurable list of string, list of module-specific flags that will be used for C and C++ compiles.
clang
bool, Deprecated. true is the default, false is invalid.
clang_asflags
list of string, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of string, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
clang_verify
bool, Add "-Xclang -verify" to the cflags and appends "touch $out" to
the clang command line.
cmake_snapshot_supported
bool, Allows this module to be included in CMake release snapshots to be built outside of Android
build system and source tree.
compile_multilib
configurable string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform).
conlyflags
list of string, list of module-specific flags that will be used for C compiles
cpp_std
string, C++ standard version to use. Can be a specific version (such as
"gnu++11"), "experimental" (which will use draft versions like C++1z when
available), or the empty string (which will use the default).
cppflags
configurable list of string, list of module-specific flags that will be used for C++ compiles
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
Dist
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
targets
list of string, Copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
append_artifact_with_product
bool, If true, then the artifact file will be appended with _<product name>. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be foo_coral.apk. If false, there is
no change to the artifact file name.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended with <product name>-. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be coral-foo.apk. If false, there is
no change to the artifact file name.
tag
string, A string tag to select the OutputFiles associated with the tag.
If no tag is specified then it will select the default dist paths provided
by the module type. If a tag of "" is specified then it will return the
default output files provided by the modules, i.e. the result of calling
OutputFiles("").
only_on_java_coverage_builds
bool, Only do the dist on java coverage builds (EMMA_INSTRUMENT=true).
Used for disting java coverage reports which are not built normally.
dists
list of Dist, a list of configurations to distribute output files from this module to the
distribution directory (default: $OUT/dist, configurable with $DIST_DIR)
double_loadable
bool, whether this module is capable of being loaded with other instance
(possibly an older version) of the same module in the same process.
Currently, a shared library that is a member of VNDK (vndk: {enabled: true})
can be double loaded in a vendor process if the library is also a
(direct and indirect) dependency of an LLNDK library. Such libraries must be
explicitly marked as `double_loadable: true` by the owner, or the dependency
from the LLNDK lib should be cut if the lib is not designed to be double loaded.
dynamic_list
string, local file name to pass to the linker as --dynamic-list. Not supported on darwin, and will fail to build
if provided to the darwin variant of a module.
enabled
configurable bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
exclude_generated_sources
list of string, list of generated sources that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with this module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build this module
exclude_static_libs
list of string, list of static libs that should not be used to build this module
export_cflags
configurable list of string, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
configurable list of string, list of directories relative to the Blueprints file that will
be added to the include path (using -I) for this module and any module that links
against this module. Directories listed in export_include_dirs do not need to be
listed in local_include_dirs.
export_system_include_dirs
list of string, list of directories that will be added to the system include path
using -isystem for this module and any module that links against this module.
exported_symbols_list
string, local file name to pass to the linker as -exported_symbols_list
force_rust_staticlib
bool, Force_rust_staticlib will force generation of the Rust staticlib with all Rust
dependencies and whole-archive it into the staticlib. This should only be set
for static libraries that are intended for use outside of Soong and should not
be set on static libraries used within Soong.
force_symbols_not_weak_list
string, local file name to pass to the linker as -force_symbols_not_weak_list
force_symbols_weak_list
string, local file name to pass to the linker as -force_symbols_weak_list
gen_type
string, Type of logging sources to generate. There are 2 choices:
"default": Generate logging methods that have a parameter for each atom field. [default]
"typesafe": Generate logging methods that use a struct for creating atom events.
generated_sources
list of string, list of generated sources to compile. These are the names of gensrcs or
genrule modules.
gnu_extensions
bool, if set to false, use -std=c++* instead of -std=gnu++*
group_static_libs
bool, deprecated and ignored because lld makes it unnecessary. See b/189475744.
Properties for ABI compatibility checker.
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
host_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_ldlibs
list of string, -l arguments to pass to linker for host-provided shared libraries
host_required
list of string, names of other modules to install on host if this module is installed
ignore_max_page_size
bool, ignore max page size. By default, max page size must be the
max page size set for the target.
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_default_libs
string, Options for including libstatssocket and libstatspull dependencies. There are 3 choices:
"full": include libstatssocket and libstatspull as shared_libs,
"headers_only": include libstatssocket_headers and libstatspull_headers as header_libs,
"none": Nothing is included by default.
The default option is "full" unless interface is set to "vendor"; then the default is "none".
If "interface" property is set to "vendor", this should be set to "none".
include_dirs
configurable list of string, list of directories relative to the root of the source tree that will
be added to the include path using -I.
If possible, don't use this. If adding paths from the current directory use
local_include_dirs, if adding paths from other modules use export_include_dirs in
that module.
init_rc
configurable list of string, init.rc files to be installed if this module is installed
inject_bssl_hash
bool, Inject boringssl hash into the shared library. This is only intended for use by external/boringssl.
install_in_root
bool, Install output directly in {partition}/, not in any subdir. This is only intended for use by
init_first_stage.
install_in_xbin
bool, Install output directly in {partition}/xbin
install_path_skip_first_stage_ramdisk_dir
bool, Whether the install path skips first_stage_ramdisk subdirectory.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
interface
string, The codegen API to use. Supported APIs are "platform" (default), "vendor", or "bootstrap".
ldflags
configurable list of string, list of module-specific flags that will be used for all link steps
lex
LexProperties
lfi_libs
list of string, List of lfi libs to statically link into this module. The lfi libs must be cc binaries
with lfi: { enabled: true }.
Lfi stands for Lightweight Fault Isolation and is a form of in-process sandboxing. The
lfi libs each are run in their own sandbox.
lfi_supported
bool, Whether this module can be built with for lightweight fault isolation (LFI), an
in-process sandboxing technique.
⊕lfienabled
bool
⊕lfistoresonly
bool
⊕lfiuserlbox
bool
⊕lfivariation
bool
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
linker_scripts
configurable list of string, local files to pass to the linker as --script. Not supported on darwin or windows, and will fail to build
if provided to the darwin or windows variant of a module.
⊕llndk
llndkLibraryProperties
If this is an LLNDK library, properties to describe the LLNDK stubs. Will be copied from
the module pointed to by llndk_stubs if it is set.
symbol_file
string, Relative path to the symbol map.
An example file can be seen here: TODO(danalbert): Make an example.
unversioned
bool, Whether the system library uses symbol versions.
override_export_include_dirs
list of string, list of directories relative to the Blueprints file that willbe added to the include path
(using -I) for any module that links against the LLNDK variant of this module, replacing
any that were listed outside the llndk clause.
private
bool, whether this module can be directly depended upon by libs that are installed
to /vendor and /product.
When set to true, this module can only be depended on by VNDK libraries, not
vendor nor product libraries. This effectively hides this module from
non-system modules. Default value is false.
moved_to_apex
bool, moved_to_apex marks this module has having been distributed through an apex module.
local_include_dirs
configurable list of string, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of string, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitalization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
thin
bool
lto_O0
bool, Use --lto-O0 flag.
min_sdk_version
configurable string, Minimum OS API level supported by this C or C++ module. This property becomes the value
of the __ANDROID_API__ macro. When the C or C++ module is included in an APEX or an APK,
this property is also used to ensure that the min_sdk_version of the containing module is
not older (i.e. less) than this module's min_sdk_version. When not set, this property
defaults to the value of sdk_version. When this is set to "apex_inherit", this tracks
min_sdk_version of the containing APEX. When the module
is not built for an APEX, "apex_inherit" defaults to sdk_version.
multilib
interface
namespace
string, C++ namespace where the generated symbols go.
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
native_coverage
bool
no_crt_pad_segment
bool, don't link in crt_pad_segment. This flag is currently only used internal to
soong for testing and for vndk prebuilt shared libraries.
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
odm_available
bool, This is the same as the "vendor_available" except that the install path
of the vendor variant is /odm or /vendor/odm.
By replacing "vendor_available: true" with "odm_available: true", the
module will install its vendor variant to the /odm partition or /vendor/odm.
As the modules with "odm_available: true" still create the vendor variants,
they can link to the other vendor modules as the vendor_available modules do.
Also, the vendor modules can link to odm_available modules.
It may not be used for VNDK modules.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
openmp
bool, Build and link with OpenMP
optimize_for_size
bool, Aggresively trade performance for smaller binary size.
This should only be used for on-device binaries that are rarely executed and not
performance critical.
⊕orderfile
instrumentation
bool
order_file_path
string
load_order_file
bool
cflags
list of string, Additional compiler flags to use when building this module
for orderfile profiling.
overrides
list of string, Names of modules to be overridden. Listed modules can only be other shared libraries
(in Make or Soong).
This does not completely prevent installation of the overridden libraries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other library will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
product_available
bool, whether this module should be allowed to be directly depended by other
modules with `product_specific: true` or `product_available: true`.
If set to true, an additional product variant will be built separately
that is limited to the set of libraries and headers that are exposed to
/product modules.
The product variant may be used with a different (newer) /system,
so it shouldn't have any unversioned runtime dependencies, or
make assumptions about the system that may not be true in the
future.
If set to false, this module becomes inaccessible from /product modules.
Different from the 'vendor_available' property, the modules with
vndk: {enabled: true} don't have to define 'product_available'. The VNDK
library without 'product_available' may not be depended on by any other
modules that has product variants including the product available VNDKs.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
and PRODUCT_PRODUCT_VNDK_VERSION isn't set.
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
⊕product_variables.arc
⊕cflags
⊕exclude_srcs
⊕include_dirs
⊕shared_libs
⊕static_libs
⊕srcs
⊕whole_static_libs
⊕product_variables.binder32bit
⊕product_variables.build_from_text_stub
⊕static_libs
⊕exclude_static_libs
⊕product_variables.debuggable
⊕cflags
⊕cppflags
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕strip.all
⊕strip.keep_symbols
⊕strip.keep_symbols_and_debug_frame
⊕static_libs
⊕exclude_static_libs
⊕whole_static_libs
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.eng
⊕cflags
⊕cppflags
⊕lto.never
⊕sanitize.address
⊕product_variables.malloc_low_memory
⊕cflags
⊕shared_libs
⊕whole_static_libs
⊕static_libs
⊕exclude_static_libs
⊕srcs
⊕product_variables.malloc_pattern_fill_contents
⊕product_variables.malloc_scudo_tsds_max
⊕product_variables.malloc_zero_contents
⊕product_variables.native_coverage
⊕product_variables.override_rs_driver
⊕product_variables.platform_sdk_version
⊕product_variables.release_aidl_use_unfrozen
⊕cflags
⊕required
⊕vintf_fragment_modules
⊕product_variables.safestack
⊕product_variables.selinuxignoreneverallows
⊕product_variables.shipping_api_level
⊕product_variables.uml
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
proto_srcs
list of string, Path(s) to proto srcs for atoms. Only one file must define the Atom proto message.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk.
On device without a dedicated recovery partition, the module is only
available after switching root into
/first_stage_ramdisk. To expose the module before switching root, install
the recovery variant instead.
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
relative_install_path
string, install to a subdirectory of the default install path for the module
⊕renderscript
include_dirs
list of string, list of directories that will be added to the llvm-rs-cc include paths
flags
list of string, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
configurable list of string, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of string, list of modules that should be installed with this module. This is similar to 'required'
but '.vendor' suffix will be appended to the module names if the shared libraries have
vendor variants and this module uses VNDK.
⊕sanitize
SanitizeUserProps
never
bool, Prevent use of any sanitizers on this module
address
bool, ASan (Address sanitizer), incompatible with static binaries.
Always runs in a diagnostic mode.
Use of address sanitizer disables cfi sanitizer.
Hwaddress sanitizer takes precedence over this sanitizer.
thread
bool, TSan (Thread sanitizer), incompatible with static binaries and 32 bit architectures.
Always runs in a diagnostic mode.
Use of thread sanitizer disables cfi and scudo sanitizers.
Hwaddress sanitizer takes precedence over this sanitizer.
hwaddress
bool, HWASan (Hardware Address sanitizer).
Use of hwasan sanitizer disables cfi, address, thread, and scudo sanitizers.
all_undefined
bool, Undefined behavior sanitizer
undefined
bool, Subset of undefined behavior sanitizer
misc_undefined
list of string, List of specific undefined behavior sanitizers to enable
fuzzer
bool, Fuzzer, incompatible with static binaries.
safestack
bool, safe-stack sanitizer, incompatible with 32-bit architectures.
cfi
bool, cfi sanitizer, incompatible with asan, hwasan, fuzzer, or Darwin
integer_overflow
bool, signed/unsigned integer overflow sanitizer, incompatible with Darwin.
scudo
bool, scudo sanitizer, incompatible with asan, hwasan, tsan
This should not be used in Android 11+ : https://source.android.com/devices/tech/debug/scudo
deprecated
scs
bool, shadow-call-stack sanitizer, only available on arm64/riscv64.
memtag_heap
bool, Memory-tagging, only available on arm64
if diag.memtag unset or false, enables async memory tagging
memtag_stack
bool, Memory-tagging stack instrumentation, only available on arm64
Adds instrumentation to detect stack buffer overflows and use-after-scope using MTE.
memtag_globals
bool, Memory-tagging globals instrumentation, only available on arm64
Adds instrumentation to detect global buffer overflows using MTE.
writeonly
bool, A modifier for ASAN and HWASAN for write only instrumentation
⊕diag
Sanitizers to run in the diagnostic mode (as opposed to the release mode).
Replaces abort() on error with a human-readable error message.
Address and Thread sanitizers always run in diagnostic mode.
undefined
bool, Undefined behavior sanitizer, diagnostic mode
cfi
bool, cfi sanitizer, diagnostic mode, incompatible with asan, hwasan, fuzzer, or Darwin
integer_overflow
bool, signed/unsigned integer overflow sanitizer, diagnostic mode, incompatible with Darwin.
memtag_heap
bool, Memory-tagging, only available on arm64
requires sanitizer.memtag: true
if set, enables sync memory tagging
misc_undefined
list of string, List of specific undefined behavior sanitizers to enable in diagnostic mode
no_recover
list of string, List of sanitizers to pass to -fno-sanitize-recover
results in only the first detected error for these sanitizers being reported and program then
exits with a non-zero exit code.
⊕config
Sanitizers to run with flag configuration specified
cfi_assembly_support
bool, Enables CFI support flags for assembly-heavy libraries
recover
list of string, List of sanitizers to pass to -fsanitize-recover
allows execution to continue for these sanitizers to detect multiple errors rather than only
the first one
blocklist
string, value to pass to -fsanitize-ignorelist
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, The API level that this module is built against. The APIs of this API level will be
visible at build time, but use of any APIs newer than min_sdk_version will render the
module unloadable on older devices. In the future it will be possible to weakly-link new
APIs, making the behavior match Java: such modules will load on older devices, but
calling new APIs on devices that do not support them will result in a crash.
This property has the same behavior as sdk_version does for Java modules. For those
familiar with Android Gradle, the property behaves similarly to how compileSdkVersion
does for Java code.
In addition, setting this property causes two variants to be built, one for the platform
and one for apps.
⊕shared
StaticOrSharedProperties
srcs
configurable list of string
tidy_disabled_srcs
list of string
tidy_timeout_srcs
list of string
⊕sanitized
Sanitized
⊕none
⊕address
⊕hwaddress
cflags
configurable list of string
enabled
bool
whole_static_libs
configurable list of string
static_libs
configurable list of string
shared_libs
configurable list of string
system_shared_libs
list of string
apex_available
list of string
installable
bool
shared_libs
configurable list of string, list of modules that should be dynamically linked into this module.
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
split_all_variants
bool, If this property is set to true, all supported variants of the module will be created.
Primarily intended for use in unit tests.
static_libs
configurable list of string, list of modules that should be statically linked into this module.
static_ndk_lib
bool, Static_ndk_lib is true if the static variant of the library is intended for NDK use.
stem
string, set the name of the output
stl
string, Select the STL library to use. Possible values are "libc++",
"libc++_static", "libstdc++", or "none". Leave blank to select the
default.
⊕strip
none
bool, Device modules default to stripping enabled leaving mini debuginfo.
Host modules default to stripping disabled, but can be enabled by setting any other
strip boolean property.
all
bool, all forces stripping everything, including the mini debug info.
keep_symbols
bool, keep_symbols enables stripping but keeps all symbols.
keep_symbols_list
list of string, keep_symbols_list specifies a list of symbols to keep if keep_symbols is enabled.
If it is unset then all symbols are kept.
keep_symbols_and_debug_frame
bool, keep_symbols_and_debug_frame enables stripping but keeps all symbols and debug frames.
⊕stubs
StubsProperties
Generate stubs to make this library accessible to APEXes.
symbol_file
string, Relative path to the symbol map. The symbol map provides the list of
symbols that are exported for stubs variant of this library.
versions
list of string, List versions to generate stubs libs for. The version name "current" is always
implicitly added.
implementation_installable
bool, Whether to not require the implementation of the library to be installed if a
client of the stubs is installed. Defaults to true; set to false if the
implementation is made available by some other means, e.g. in a Microdroid
virtual machine.
suffix
string, set suffix of the name of the output
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
system_shared_libs
list of string, list of system libraries that will be dynamically linked to
shared library and executable modules. If unset, generally defaults to libc,
libm, and libdl. Set to [] to prevent linking against the defaults.
target
interface
⊕target.android
compile_multilib
configurable string
enabled
bool
⊕target.apex
exclude_shared_libs
list of string, list of shared libs that should not be used to build the apex variant of
the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build the apex
variant of the C/C++ module.
⊕target.host
compile_multilib
configurable string
⊕target.non_apex
exclude_shared_libs
list of string, list of shared libs that should not be used to build the non-apex
variant of the C/C++ module.
⊕target.platform
shared_libs
list of string, list of shared libs that should be use to build the platform variant
of a module that sets sdk_version. This should rarely be necessary,
in most cases the same libraries are available for the SDK and platform
variants.
exclude_shared_libs
list of string, list of shared libs that should not be used to build the platform variant
of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the platform
variant of the C/C++ module.
required
list of string, List of modules required by the core variant.
exclude_required
list of string, List of modules not required by the core variant.
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
⊕target.product
srcs
list of string, list of source files that should only be used in vendor or
product variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to build vendor
or product variant of the C/C++ module.
cflags
configurable list of string, List of additional cflags that should be used to build vendor
or product variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to build
vendor or product variant of the C/C++ module.
suffix
string, set suffix of the name of the output
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
no_stubs
bool, Disable stubs for vendor/product variants
This is a workaround to keep `stubs` only for "core" variant (not product/vendor).
It would be nice if we could put `stubs` into a `target: { core: {} }`
block but it's not supported in soong yet. This could be removed/simplified once we have
a better syntax.
override_export_include_dirs
list of string, list of exported include directories, like
export_include_dirs, that will be applied to
vendor or product variant of this library.
This will overwrite any other declarations.
shared_libs
list of string, list of shared libs that only should be used to build vendor or
product variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build vendor or
product variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor or product variant of the C/C++ module.
version_script
string, version script for vendor or product variant
⊕target.ramdisk
static_libs
list of string, list of static libs that only should be used to build the ramdisk
variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
ramdisk variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to
build the ramdisk variants of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the ramdisk
variants of the C/C++ module.
⊕target.recovery
srcs
list of string, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to
build the recovery variant of the C/C++ module.
required
list of string, List of modules required by the recovery variant.
exclude_required
list of string, List of modules not required by the recovery variant.
shared_libs
list of string, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
recovery variant of the C/C++ module.
⊕target.vendor
override_export_include_dirs
list of string, list of exported include directories, like
export_include_dirs, that will be applied to
vendor or product variant of this library.
This will overwrite any other declarations.
shared_libs
list of string, list of shared libs that only should be used to build vendor or
product variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build vendor or
product variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor or product variant of the C/C++ module.
version_script
string, version script for vendor or product variant
suffix
string, set suffix of the name of the output
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
no_stubs
bool, Disable stubs for vendor/product variants
This is a workaround to keep `stubs` only for "core" variant (not product/vendor).
It would be nice if we could put `stubs` into a `target: { core: {} }`
block but it's not supported in soong yet. This could be removed/simplified once we have
a better syntax.
srcs
list of string, list of source files that should only be used in vendor or
product variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to build vendor
or product variant of the C/C++ module.
cflags
configurable list of string, List of additional cflags that should be used to build vendor
or product variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to build
vendor or product variant of the C/C++ module.
⊕target.vendor_ramdisk
exclude_srcs
list of string, list of source files that should not be used to
build the ramdisk variants of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the ramdisk
variants of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the vendor ramdisk variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the vendor ramdisk variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor ramdisk variant of the C/C++ module.
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_harness_ramdisk
bool, Whether this module is installed to test harness ramdisk
test_only
bool, Indicates that the module and its source code are only used in tests, not
production code. Used by coverage reports and potentially other tools.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of string, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of string, Checks that should be treated as errors.
tidy_disabled_srcs
list of string, list of source files that should not be compiled with clang-tidy.
tidy_flags
list of string, Extra flags to pass to clang-tidy
tidy_timeout_srcs
list of string, list of source files that should not be compiled by clang-tidy when TIDY_TIMEOUT is set.
unchecked_module
bool, If this property is set to true, this module will not be built on checkbuilds.
unexported_symbols_list
string, local file name to pass to the linker as -unexported_symbols_list
unique_host_soname
bool, rename host libraries to prevent overlap with system installed libraries
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
use_version_lib
bool, make android::build:GetBuildNumber() available containing the build ID.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vendor_available
bool, whether this module should be allowed to be directly depended by other
modules with `vendor: true`, `proprietary: true`, or `vendor_available:true`.
If set to true, two variants will be built separately, one like
normal, and the other limited to the set of libraries and headers
that are exposed to /vendor modules.
The vendor variant may be used with a different (newer) /system,
so it shouldn't have any unversioned runtime dependencies, or
make assumptions about the system that may not be true in the
future.
If set to false, this module becomes inaccessible from /vendor modules.
The modules with vndk: {enabled: true} must define 'vendor_available'
to 'true'.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
vendor_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_kernel_ramdisk
bool, Whether this module is installed to vendor kernel ramdisk
⊕vendor_public_library
vendorPublicLibraryProperties
If this is a vendor public library, properties to describe the vendor public library stubs.
symbol_file
string, Relative path to the symbol map.
unversioned
bool, Whether the system library uses symbol versions.
override_export_include_dirs
list of string, list of directories relative to the Blueprints file that willbe added to the include path
(using -I) for any module that links against the LLNDK variant of this module, replacing
any that were listed outside the llndk clause.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
vendor_ramdisk_available
bool, Make this module available when building for vendor ramdisk.
On device without a dedicated recovery partition, the module is only
available after switching root into
/first_stage_ramdisk. To expose the module before switching root, install
the recovery variant instead.
version_script
string, local file name to pass to the linker as --version-script. Not supported on darwin, and will fail to build
if provided to the darwin variant of a module.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable list of string, VINTF manifest fragments to be installed if this module is installed
visibility
list of string, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/main/README.md#visibility for
more details.
whole_program_vtables
bool, Use -fwhole-program-vtables cflag.
whole_static_libs
configurable list of string, list of modules whose object files should be linked into this module
in their entirety. For static library modules, all of the .o files from the intermediate
directory of the dependency will be linked into this modules .a file. For a shared library,
the dependency's .a file will be linked into this module using -Wl,--whole-archive.
xom
bool, Xom controls whether or not xom should be enabled for this module. Setting
this to false will disable xom for all dependents which link this module
statically.
yacc
YaccProperties
cc_atomslog_library_static
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
afdo
,
aidl
,
aidl_version
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
atoms_module
,
basename
,
bootstrap
,
bpf_target
,
buildstubs
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
clang_verify
,
cmake_snapshot_supported
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug_ramdisk
,
device_first_generated_headers
,
device_specific
,
dist
,
dists
,
double_loadable
,
dynamic_list
,
enabled
,
exclude_generated_sources
,
exclude_runtime_libs
,
exclude_shared_libs
,
exclude_static_libs
,
export_cflags
,
export_generated_headers
,
export_header_lib_headers
,
export_include_dirs
,
export_shared_lib_headers
,
export_static_lib_headers
,
export_system_include_dirs
,
exported_symbols_list
,
force_rust_staticlib
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
gen_type
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_cross_supported
,
host_ldlibs
,
host_required
,
ignore_max_page_size
,
include_build_directory
,
include_default_libs
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
install_in_root
,
install_in_xbin
,
install_path_skip_first_stage_ramdisk_dir
,
installable
,
instruction_set
,
interface
,
ldflags
,
lex
,
lfi_libs
,
lfi_supported
,
lfienabled
,
lfistoresonly
,
lfiuserlbox
,
lfivariation
,
licenses
,
linker_scripts
,
llndk
,
local_include_dirs
,
logtags
,
lto
,
lto_O0
,
min_sdk_version
,
multilib
,
namespace
,
native_bridge_supported
,
native_coverage
,
no_crt_pad_segment
,
no_full_install
,
no_libcrt
,
nocrt
,
odm_available
,
odm_dlkm_specific
,
openmp
,
optimize_for_size
,
orderfile
,
overrides
,
owner
,
pack_relocations
,
product_available
,
product_specific
,
product_variables.arc
,
product_variables.binder32bit
,
product_variables.build_from_text_stub
,
product_variables.debuggable
,
product_variables.eng
,
product_variables.malloc_low_memory
,
product_variables.malloc_pattern_fill_contents
,
product_variables.malloc_scudo_tsds_max
,
product_variables.malloc_zero_contents
,
product_variables.native_coverage
,
product_variables.override_rs_driver
,
product_variables.platform_sdk_version
,
product_variables.release_aidl_use_unfrozen
,
product_variables.safestack
,
product_variables.selinuxignoreneverallows
,
product_variables.shipping_api_level
,
product_variables.uml
,
product_variables.unbundled_build
,
proprietary
,
proto
,
proto_srcs
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
split_all_variants
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_dlkm_specific
,
system_ext_specific
,
system_shared_libs
,
target
,
target.android
,
target.apex
,
target.host
,
target.non_apex
,
target.platform
,
target.product
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target.vendor_ramdisk
,
target_required
,
team
,
test_harness_ramdisk
,
test_only
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_disabled_srcs
,
tidy_flags
,
tidy_timeout_srcs
,
unchecked_module
,
unexported_symbols_list
,
unique_host_soname
,
use_generic_config
,
use_version_lib
,
vendor
,
vendor_available
,
vendor_dlkm_specific
,
vendor_kernel_ramdisk
,
vendor_public_library
,
vendor_ramdisk
,
vendor_ramdisk_available
,
version_script
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
,
whole_program_vtables
,
whole_static_libs
,
xom
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
configurable list of string, list of source files used to compile the C/C++ module. May be .c, .cpp, or .S files.
srcs may reference the outputs of other modules that produce source files like genrule
or filegroup using the syntax ":module".
exclude_srcs
configurable list of string, list of source files that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
defaults
list of string
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
afdo
bool, Afdo allows developers self-service enroll for
automatic feedback-directed optimization using profile data.
⊕aidl
libs
list of string, List of aidl_library modules
include_dirs
list of string, list of directories that will be added to the aidl include paths.
local_include_dirs
list of string, list of directories relative to the Blueprints file that will
be added to the aidl include paths.
generate_traces
bool, whether to generate traces (for systrace) for this interface
flags
list of string, list of flags that will be passed to the AIDL compiler
aidl_version
int64, Version of AIDL lib to use for vendor logging. Default is 2.
allow_undefined_symbols
bool, allow the module to contain undefined symbols. By default,
modules cannot contain undefined symbols that are not satisified by their immediate
dependencies. Set this flag to true to remove --no-undefined from the linker flags.
This flag should only be necessary for compiling low-level libraries like libc.
apex_available
list of string, Availability of this module in APEXes. Only the listed APEXes can contain this module. If
the module has stubs then other APEXes and the platform may access it through them
(subject to visibility).
"//apex_available:anyapex" is a pseudo APEX name that matches to any APEX.
"//apex_available:platform" refers to non-APEX partitions like "system.img".
Prefix pattern (com.foo.*) can be used to match with any APEX name with the prefix(com.foo.).
Wildcard ? can be used to match exactly one path segment (e.g. com.?.foo matches com.bar.foo). This may be combined with prefix pattern for complex routing (e.g., com.?.foo.*).
Default is ["//apex_available:platform"].
arch
interface
asflags
list of string, list of module-specific flags that will be used for .S compiles
atoms_module
string, Atoms module annotation.
basename
string, Basename of the header and cpp files generated.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
bpf_target
bool, cc Build rules targeting BPF must set this to true. The correct fix is to
ban targeting bpf in cc rules instead use bpf_rules. (b/323415017)
⊕buildstubs
bool
c_std
string, C standard version to use. Can be a specific version (such as "gnu11"),
"experimental" (which will use draft versions like C1x when available),
or the empty string (which will use the default).
cflags
configurable list of string, list of module-specific flags that will be used for C and C++ compiles.
clang
bool, Deprecated. true is the default, false is invalid.
clang_asflags
list of string, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of string, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
clang_verify
bool, Add "-Xclang -verify" to the cflags and appends "touch $out" to
the clang command line.
cmake_snapshot_supported
bool, Allows this module to be included in CMake release snapshots to be built outside of Android
build system and source tree.
compile_multilib
configurable string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform).
conlyflags
list of string, list of module-specific flags that will be used for C compiles
cpp_std
string, C++ standard version to use. Can be a specific version (such as
"gnu++11"), "experimental" (which will use draft versions like C++1z when
available), or the empty string (which will use the default).
cppflags
configurable list of string, list of module-specific flags that will be used for C++ compiles
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
Dist
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
targets
list of string, Copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
append_artifact_with_product
bool, If true, then the artifact file will be appended with _<product name>. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be foo_coral.apk. If false, there is
no change to the artifact file name.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended with <product name>-. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be coral-foo.apk. If false, there is
no change to the artifact file name.
tag
string, A string tag to select the OutputFiles associated with the tag.
If no tag is specified then it will select the default dist paths provided
by the module type. If a tag of "" is specified then it will return the
default output files provided by the modules, i.e. the result of calling
OutputFiles("").
only_on_java_coverage_builds
bool, Only do the dist on java coverage builds (EMMA_INSTRUMENT=true).
Used for disting java coverage reports which are not built normally.
dists
list of Dist, a list of configurations to distribute output files from this module to the
distribution directory (default: $OUT/dist, configurable with $DIST_DIR)
double_loadable
bool, whether this module is capable of being loaded with other instance
(possibly an older version) of the same module in the same process.
Currently, a shared library that is a member of VNDK (vndk: {enabled: true})
can be double loaded in a vendor process if the library is also a
(direct and indirect) dependency of an LLNDK library. Such libraries must be
explicitly marked as `double_loadable: true` by the owner, or the dependency
from the LLNDK lib should be cut if the lib is not designed to be double loaded.
dynamic_list
string, local file name to pass to the linker as --dynamic-list. Not supported on darwin, and will fail to build
if provided to the darwin variant of a module.
enabled
configurable bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
exclude_generated_sources
list of string, list of generated sources that should not be used to build the C/C++ module.
This is most useful in the arch/multilib variants to remove non-common files
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with this module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build this module
exclude_static_libs
list of string, list of static libs that should not be used to build this module
export_cflags
configurable list of string, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
configurable list of string, list of directories relative to the Blueprints file that will
be added to the include path (using -I) for this module and any module that links
against this module. Directories listed in export_include_dirs do not need to be
listed in local_include_dirs.
export_system_include_dirs
list of string, list of directories that will be added to the system include path
using -isystem for this module and any module that links against this module.
exported_symbols_list
string, local file name to pass to the linker as -exported_symbols_list
force_rust_staticlib
bool, Force_rust_staticlib will force generation of the Rust staticlib with all Rust
dependencies and whole-archive it into the staticlib. This should only be set
for static libraries that are intended for use outside of Soong and should not
be set on static libraries used within Soong.
force_symbols_not_weak_list
string, local file name to pass to the linker as -force_symbols_not_weak_list
force_symbols_weak_list
string, local file name to pass to the linker as -force_symbols_weak_list
gen_type
string, Type of logging sources to generate. There are 2 choices:
"default": Generate logging methods that have a parameter for each atom field. [default]
"typesafe": Generate logging methods that use a struct for creating atom events.
generated_sources
list of string, list of generated sources to compile. These are the names of gensrcs or
genrule modules.
gnu_extensions
bool, if set to false, use -std=c++* instead of -std=gnu++*
group_static_libs
bool, deprecated and ignored because lld makes it unnecessary. See b/189475744.
Properties for ABI compatibility checker.
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
host_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_ldlibs
list of string, -l arguments to pass to linker for host-provided shared libraries
host_required
list of string, names of other modules to install on host if this module is installed
ignore_max_page_size
bool, ignore max page size. By default, max page size must be the
max page size set for the target.
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_default_libs
string, Options for including libstatssocket and libstatspull dependencies. There are 3 choices:
"full": include libstatssocket and libstatspull as shared_libs,
"headers_only": include libstatssocket_headers and libstatspull_headers as header_libs,
"none": Nothing is included by default.
The default option is "full" unless interface is set to "vendor"; then the default is "none".
If "interface" property is set to "vendor", this should be set to "none".
include_dirs
configurable list of string, list of directories relative to the root of the source tree that will
be added to the include path using -I.
If possible, don't use this. If adding paths from the current directory use
local_include_dirs, if adding paths from other modules use export_include_dirs in
that module.
init_rc
configurable list of string, init.rc files to be installed if this module is installed
inject_bssl_hash
bool, Inject boringssl hash into the shared library. This is only intended for use by external/boringssl.
install_in_root
bool, Install output directly in {partition}/, not in any subdir. This is only intended for use by
init_first_stage.
install_in_xbin
bool, Install output directly in {partition}/xbin
install_path_skip_first_stage_ramdisk_dir
bool, Whether the install path skips first_stage_ramdisk subdirectory.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
interface
string, The codegen API to use. Supported APIs are "platform" (default), "vendor", or "bootstrap".
ldflags
configurable list of string, list of module-specific flags that will be used for all link steps
lex
LexProperties
lfi_libs
list of string, List of lfi libs to statically link into this module. The lfi libs must be cc binaries
with lfi: { enabled: true }.
Lfi stands for Lightweight Fault Isolation and is a form of in-process sandboxing. The
lfi libs each are run in their own sandbox.
lfi_supported
bool, Whether this module can be built with for lightweight fault isolation (LFI), an
in-process sandboxing technique.
⊕lfienabled
bool
⊕lfistoresonly
bool
⊕lfiuserlbox
bool
⊕lfivariation
bool
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
linker_scripts
configurable list of string, local files to pass to the linker as --script. Not supported on darwin or windows, and will fail to build
if provided to the darwin or windows variant of a module.
⊕llndk
llndkLibraryProperties
If this is an LLNDK library, properties to describe the LLNDK stubs. Will be copied from
the module pointed to by llndk_stubs if it is set.
symbol_file
string, Relative path to the symbol map.
An example file can be seen here: TODO(danalbert): Make an example.
unversioned
bool, Whether the system library uses symbol versions.
override_export_include_dirs
list of string, list of directories relative to the Blueprints file that willbe added to the include path
(using -I) for any module that links against the LLNDK variant of this module, replacing
any that were listed outside the llndk clause.
private
bool, whether this module can be directly depended upon by libs that are installed
to /vendor and /product.
When set to true, this module can only be depended on by VNDK libraries, not
vendor nor product libraries. This effectively hides this module from
non-system modules. Default value is false.
moved_to_apex
bool, moved_to_apex marks this module has having been distributed through an apex module.
local_include_dirs
configurable list of string, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of string, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitalization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
thin
bool
lto_O0
bool, Use --lto-O0 flag.
min_sdk_version
configurable string, Minimum OS API level supported by this C or C++ module. This property becomes the value
of the __ANDROID_API__ macro. When the C or C++ module is included in an APEX or an APK,
this property is also used to ensure that the min_sdk_version of the containing module is
not older (i.e. less) than this module's min_sdk_version. When not set, this property
defaults to the value of sdk_version. When this is set to "apex_inherit", this tracks
min_sdk_version of the containing APEX. When the module
is not built for an APEX, "apex_inherit" defaults to sdk_version.
multilib
interface
namespace
string, C++ namespace where the generated symbols go.
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
native_coverage
bool
no_crt_pad_segment
bool, don't link in crt_pad_segment. This flag is currently only used internal to
soong for testing and for vndk prebuilt shared libraries.
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
odm_available
bool, This is the same as the "vendor_available" except that the install path
of the vendor variant is /odm or /vendor/odm.
By replacing "vendor_available: true" with "odm_available: true", the
module will install its vendor variant to the /odm partition or /vendor/odm.
As the modules with "odm_available: true" still create the vendor variants,
they can link to the other vendor modules as the vendor_available modules do.
Also, the vendor modules can link to odm_available modules.
It may not be used for VNDK modules.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
openmp
bool, Build and link with OpenMP
optimize_for_size
bool, Aggresively trade performance for smaller binary size.
This should only be used for on-device binaries that are rarely executed and not
performance critical.
⊕orderfile
instrumentation
bool
order_file_path
string
load_order_file
bool
cflags
list of string, Additional compiler flags to use when building this module
for orderfile profiling.
overrides
list of string, Names of modules to be overridden. Listed modules can only be other shared libraries
(in Make or Soong).
This does not completely prevent installation of the overridden libraries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other library will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
product_available
bool, whether this module should be allowed to be directly depended by other
modules with `product_specific: true` or `product_available: true`.
If set to true, an additional product variant will be built separately
that is limited to the set of libraries and headers that are exposed to
/product modules.
The product variant may be used with a different (newer) /system,
so it shouldn't have any unversioned runtime dependencies, or
make assumptions about the system that may not be true in the
future.
If set to false, this module becomes inaccessible from /product modules.
Different from the 'vendor_available' property, the modules with
vndk: {enabled: true} don't have to define 'product_available'. The VNDK
library without 'product_available' may not be depended on by any other
modules that has product variants including the product available VNDKs.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
and PRODUCT_PRODUCT_VNDK_VERSION isn't set.
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
⊕product_variables.arc
⊕cflags
⊕exclude_srcs
⊕include_dirs
⊕shared_libs
⊕static_libs
⊕srcs
⊕whole_static_libs
⊕product_variables.binder32bit
⊕product_variables.build_from_text_stub
⊕static_libs
⊕exclude_static_libs
⊕product_variables.debuggable
⊕cflags
⊕cppflags
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕strip.all
⊕strip.keep_symbols
⊕strip.keep_symbols_and_debug_frame
⊕static_libs
⊕exclude_static_libs
⊕whole_static_libs
⊕shared_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.eng
⊕cflags
⊕cppflags
⊕lto.never
⊕sanitize.address
⊕product_variables.malloc_low_memory
⊕cflags
⊕shared_libs
⊕whole_static_libs
⊕static_libs
⊕exclude_static_libs
⊕srcs
⊕product_variables.malloc_pattern_fill_contents
⊕product_variables.malloc_scudo_tsds_max
⊕product_variables.malloc_zero_contents
⊕product_variables.native_coverage
⊕product_variables.override_rs_driver
⊕product_variables.platform_sdk_version
⊕product_variables.release_aidl_use_unfrozen
⊕cflags
⊕required
⊕vintf_fragment_modules
⊕product_variables.safestack
⊕product_variables.selinuxignoreneverallows
⊕product_variables.shipping_api_level
⊕product_variables.uml
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
proto_srcs
list of string, Path(s) to proto srcs for atoms. Only one file must define the Atom proto message.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk.
On device without a dedicated recovery partition, the module is only
available after switching root into
/first_stage_ramdisk. To expose the module before switching root, install
the recovery variant instead.
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
relative_install_path
string, install to a subdirectory of the default install path for the module
⊕renderscript
include_dirs
list of string, list of directories that will be added to the llvm-rs-cc include paths
flags
list of string, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
configurable list of string, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of string, list of modules that should be installed with this module. This is similar to 'required'
but '.vendor' suffix will be appended to the module names if the shared libraries have
vendor variants and this module uses VNDK.
⊕sanitize
SanitizeUserProps
never
bool, Prevent use of any sanitizers on this module
address
bool, ASan (Address sanitizer), incompatible with static binaries.
Always runs in a diagnostic mode.
Use of address sanitizer disables cfi sanitizer.
Hwaddress sanitizer takes precedence over this sanitizer.
thread
bool, TSan (Thread sanitizer), incompatible with static binaries and 32 bit architectures.
Always runs in a diagnostic mode.
Use of thread sanitizer disables cfi and scudo sanitizers.
Hwaddress sanitizer takes precedence over this sanitizer.
hwaddress
bool, HWASan (Hardware Address sanitizer).
Use of hwasan sanitizer disables cfi, address, thread, and scudo sanitizers.
all_undefined
bool, Undefined behavior sanitizer
undefined
bool, Subset of undefined behavior sanitizer
misc_undefined
list of string, List of specific undefined behavior sanitizers to enable
fuzzer
bool, Fuzzer, incompatible with static binaries.
safestack
bool, safe-stack sanitizer, incompatible with 32-bit architectures.
cfi
bool, cfi sanitizer, incompatible with asan, hwasan, fuzzer, or Darwin
integer_overflow
bool, signed/unsigned integer overflow sanitizer, incompatible with Darwin.
scudo
bool, scudo sanitizer, incompatible with asan, hwasan, tsan
This should not be used in Android 11+ : https://source.android.com/devices/tech/debug/scudo
deprecated
scs
bool, shadow-call-stack sanitizer, only available on arm64/riscv64.
memtag_heap
bool, Memory-tagging, only available on arm64
if diag.memtag unset or false, enables async memory tagging
memtag_stack
bool, Memory-tagging stack instrumentation, only available on arm64
Adds instrumentation to detect stack buffer overflows and use-after-scope using MTE.
memtag_globals
bool, Memory-tagging globals instrumentation, only available on arm64
Adds instrumentation to detect global buffer overflows using MTE.
writeonly
bool, A modifier for ASAN and HWASAN for write only instrumentation
⊕diag
Sanitizers to run in the diagnostic mode (as opposed to the release mode).
Replaces abort() on error with a human-readable error message.
Address and Thread sanitizers always run in diagnostic mode.
undefined
bool, Undefined behavior sanitizer, diagnostic mode
cfi
bool, cfi sanitizer, diagnostic mode, incompatible with asan, hwasan, fuzzer, or Darwin
integer_overflow
bool, signed/unsigned integer overflow sanitizer, diagnostic mode, incompatible with Darwin.
memtag_heap
bool, Memory-tagging, only available on arm64
requires sanitizer.memtag: true
if set, enables sync memory tagging
misc_undefined
list of string, List of specific undefined behavior sanitizers to enable in diagnostic mode
no_recover
list of string, List of sanitizers to pass to -fno-sanitize-recover
results in only the first detected error for these sanitizers being reported and program then
exits with a non-zero exit code.
⊕config
Sanitizers to run with flag configuration specified
cfi_assembly_support
bool, Enables CFI support flags for assembly-heavy libraries
recover
list of string, List of sanitizers to pass to -fsanitize-recover
allows execution to continue for these sanitizers to detect multiple errors rather than only
the first one
blocklist
string, value to pass to -fsanitize-ignorelist
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, The API level that this module is built against. The APIs of this API level will be
visible at build time, but use of any APIs newer than min_sdk_version will render the
module unloadable on older devices. In the future it will be possible to weakly-link new
APIs, making the behavior match Java: such modules will load on older devices, but
calling new APIs on devices that do not support them will result in a crash.
This property has the same behavior as sdk_version does for Java modules. For those
familiar with Android Gradle, the property behaves similarly to how compileSdkVersion
does for Java code.
In addition, setting this property causes two variants to be built, one for the platform
and one for apps.
shared_libs
configurable list of string, list of modules that should be dynamically linked into this module.
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
split_all_variants
bool, If this property is set to true, all supported variants of the module will be created.
Primarily intended for use in unit tests.
⊕static
StaticOrSharedProperties
srcs
configurable list of string
tidy_disabled_srcs
list of string
tidy_timeout_srcs
list of string
⊕sanitized
Sanitized
⊕none
⊕address
⊕hwaddress
cflags
configurable list of string
enabled
bool
whole_static_libs
configurable list of string
static_libs
configurable list of string
shared_libs
configurable list of string
system_shared_libs
list of string
apex_available
list of string
installable
bool
static_libs
configurable list of string, list of modules that should be statically linked into this module.
static_ndk_lib
bool, Static_ndk_lib is true if the static variant of the library is intended for NDK use.
stem
string, set the name of the output
stl
string, Select the STL library to use. Possible values are "libc++",
"libc++_static", "libstdc++", or "none". Leave blank to select the
default.
⊕strip
none
bool, Device modules default to stripping enabled leaving mini debuginfo.
Host modules default to stripping disabled, but can be enabled by setting any other
strip boolean property.
all
bool, all forces stripping everything, including the mini debug info.
keep_symbols
bool, keep_symbols enables stripping but keeps all symbols.
keep_symbols_list
list of string, keep_symbols_list specifies a list of symbols to keep if keep_symbols is enabled.
If it is unset then all symbols are kept.
keep_symbols_and_debug_frame
bool, keep_symbols_and_debug_frame enables stripping but keeps all symbols and debug frames.
⊕stubs
StubsProperties
Generate stubs to make this library accessible to APEXes.
symbol_file
string, Relative path to the symbol map. The symbol map provides the list of
symbols that are exported for stubs variant of this library.
versions
list of string, List versions to generate stubs libs for. The version name "current" is always
implicitly added.
implementation_installable
bool, Whether to not require the implementation of the library to be installed if a
client of the stubs is installed. Defaults to true; set to false if the
implementation is made available by some other means, e.g. in a Microdroid
virtual machine.
suffix
string, set suffix of the name of the output
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
system_shared_libs
list of string, list of system libraries that will be dynamically linked to
shared library and executable modules. If unset, generally defaults to libc,
libm, and libdl. Set to [] to prevent linking against the defaults.
target
interface
⊕target.android
compile_multilib
configurable string
enabled
bool
⊕target.apex
exclude_shared_libs
list of string, list of shared libs that should not be used to build the apex variant of
the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build the apex
variant of the C/C++ module.
⊕target.host
compile_multilib
configurable string
⊕target.non_apex
exclude_shared_libs
list of string, list of shared libs that should not be used to build the non-apex
variant of the C/C++ module.
⊕target.platform
shared_libs
list of string, list of shared libs that should be use to build the platform variant
of a module that sets sdk_version. This should rarely be necessary,
in most cases the same libraries are available for the SDK and platform
variants.
exclude_shared_libs
list of string, list of shared libs that should not be used to build the platform variant
of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the platform
variant of the C/C++ module.
required
list of string, List of modules required by the core variant.
exclude_required
list of string, List of modules not required by the core variant.
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
⊕target.product
srcs
list of string, list of source files that should only be used in vendor or
product variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to build vendor
or product variant of the C/C++ module.
cflags
configurable list of string, List of additional cflags that should be used to build vendor
or product variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to build
vendor or product variant of the C/C++ module.
suffix
string, set suffix of the name of the output
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
no_stubs
bool, Disable stubs for vendor/product variants
This is a workaround to keep `stubs` only for "core" variant (not product/vendor).
It would be nice if we could put `stubs` into a `target: { core: {} }`
block but it's not supported in soong yet. This could be removed/simplified once we have
a better syntax.
override_export_include_dirs
list of string, list of exported include directories, like
export_include_dirs, that will be applied to
vendor or product variant of this library.
This will overwrite any other declarations.
shared_libs
list of string, list of shared libs that only should be used to build vendor or
product variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build vendor or
product variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor or product variant of the C/C++ module.
version_script
string, version script for vendor or product variant
⊕target.ramdisk
static_libs
list of string, list of static libs that only should be used to build the ramdisk
variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
ramdisk variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to
build the ramdisk variants of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the ramdisk
variants of the C/C++ module.
⊕target.recovery
srcs
list of string, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to
build the recovery variant of the C/C++ module.
required
list of string, List of modules required by the recovery variant.
exclude_required
list of string, List of modules not required by the recovery variant.
shared_libs
list of string, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
recovery variant of the C/C++ module.
⊕target.vendor
override_export_include_dirs
list of string, list of exported include directories, like
export_include_dirs, that will be applied to
vendor or product variant of this library.
This will overwrite any other declarations.
shared_libs
list of string, list of shared libs that only should be used to build vendor or
product variant of the C/C++ module.
static_libs
list of string, list of static libs that only should be used to build vendor or
product variant of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build vendor or
product variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor or product variant of the C/C++ module.
version_script
string, version script for vendor or product variant
suffix
string, set suffix of the name of the output
enabled
bool, Enable ABI checks (even if this is not an LLNDK/VNDK lib)
symbol_file
string, Path to a symbol file that specifies the symbols to be included in the generated
ABI dump file
exclude_symbol_versions
list of string, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of string, Symbol tags that should be ignored from the symbol file
check_all_apis
bool, Run checks on all APIs (in addition to the ones referred by
one of exported ELF symbols.)
diff_flags
list of string, Extra flags passed to header-abi-diff
ref_dump_dirs
list of string, Opt-in reference dump directories
no_stubs
bool, Disable stubs for vendor/product variants
This is a workaround to keep `stubs` only for "core" variant (not product/vendor).
It would be nice if we could put `stubs` into a `target: { core: {} }`
block but it's not supported in soong yet. This could be removed/simplified once we have
a better syntax.
srcs
list of string, list of source files that should only be used in vendor or
product variant of the C/C++ module.
exclude_srcs
list of string, list of source files that should not be used to build vendor
or product variant of the C/C++ module.
cflags
configurable list of string, List of additional cflags that should be used to build vendor
or product variant of the C/C++ module.
exclude_generated_sources
list of string, list of generated sources that should not be used to build
vendor or product variant of the C/C++ module.
⊕target.vendor_ramdisk
exclude_srcs
list of string, list of source files that should not be used to
build the ramdisk variants of the C/C++ module.
cflags
list of string, List of additional cflags that should be used to build the ramdisk
variants of the C/C++ module.
exclude_shared_libs
list of string, list of shared libs that should not be used to build
the vendor ramdisk variant of the C/C++ module.
exclude_static_libs
list of string, list of static libs that should not be used to build
the vendor ramdisk variant of the C/C++ module.
exclude_runtime_libs
list of string, list of runtime libs that should not be installed along with the
vendor ramdisk variant of the C/C++ module.
target_required
list of string, names of other modules to install on target if this module is installed
team
string, The team (defined by the owner/vendor) who owns the property.
test_harness_ramdisk
bool, Whether this module is installed to test harness ramdisk
test_only
bool, Indicates that the module and its source code are only used in tests, not
production code. Used by coverage reports and potentially other tools.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of string, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of string, Checks that should be treated as errors.
tidy_disabled_srcs
list of string, list of source files that should not be compiled with clang-tidy.
tidy_flags
list of string, Extra flags to pass to clang-tidy
tidy_timeout_srcs
list of string, list of source files that should not be compiled by clang-tidy when TIDY_TIMEOUT is set.
unchecked_module
bool, If this property is set to true, this module will not be built on checkbuilds.
unexported_symbols_list
string, local file name to pass to the linker as -unexported_symbols_list
unique_host_soname
bool, rename host libraries to prevent overlap with system installed libraries
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
use_version_lib
bool, make android::build:GetBuildNumber() available containing the build ID.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vendor_available
bool, whether this module should be allowed to be directly depended by other
modules with `vendor: true`, `proprietary: true`, or `vendor_available:true`.
If set to true, two variants will be built separately, one like
normal, and the other limited to the set of libraries and headers
that are exposed to /vendor modules.
The vendor variant may be used with a different (newer) /system,
so it shouldn't have any unversioned runtime dependencies, or
make assumptions about the system that may not be true in the
future.
If set to false, this module becomes inaccessible from /vendor modules.
The modules with vndk: {enabled: true} must define 'vendor_available'
to 'true'.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
vendor_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_kernel_ramdisk
bool, Whether this module is installed to vendor kernel ramdisk
⊕vendor_public_library
vendorPublicLibraryProperties
If this is a vendor public library, properties to describe the vendor public library stubs.
symbol_file
string, Relative path to the symbol map.
unversioned
bool, Whether the system library uses symbol versions.
override_export_include_dirs
list of string, list of directories relative to the Blueprints file that willbe added to the include path
(using -I) for any module that links against the LLNDK variant of this module, replacing
any that were listed outside the llndk clause.
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
vendor_ramdisk_available
bool, Make this module available when building for vendor ramdisk.
On device without a dedicated recovery partition, the module is only
available after switching root into
/first_stage_ramdisk. To expose the module before switching root, install
the recovery variant instead.
version_script
string, local file name to pass to the linker as --version-script. Not supported on darwin, and will fail to build
if provided to the darwin variant of a module.
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable list of string, VINTF manifest fragments to be installed if this module is installed
visibility
list of string, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/main/README.md#visibility for
more details.
whole_program_vtables
bool, Use -fwhole-program-vtables cflag.
whole_static_libs
configurable list of string, list of modules whose object files should be linked into this module
in their entirety. For static library modules, all of the .o files from the intermediate
directory of the dependency will be linked into this modules .a file. For a shared library,
the dependency's .a file will be linked into this module using -Wl,--whole-archive.
xom
bool, Xom controls whether or not xom should be enabled for this module. Setting
this to false will disable xom for all dependents which link this module
statically.
yacc
YaccProperties
java_atomslog_library
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
aconfig_Cache_files
,
aidl
,
aidl_version
,
annotation_processor_flags
,
apex_available
,
arch
,
associates
,
atoms_module
,
class_name
,
common_srcs
,
compile_data
,
compile_dex
,
compile_multilib
,
debug_ramdisk
,
device_common_java_resources
,
device_first_java_resources
,
device_specific
,
dex_preopt
,
dist
,
dists
,
dxflags
,
enable_ksp
,
enabled
,
enforce_uses_libs
,
errorprone
,
exclude_common_srcs
,
exclude_java_resource_dirs
,
exclude_java_resources
,
exclude_kotlinc_generated_files
,
exclude_uses_libs
,
exported_plugins
,
gen_type
,
generated_srcjars
,
header_jar_override
,
headers_only
,
hidden_api
,
hiddenapi_additional_annotations
,
host_cross_supported
,
host_required
,
hostdex
,
include_srcs
,
init_rc
,
install_path_skip_first_stage_ramdisk_dir
,
installable
,
interface
,
is_stubs_module
,
jacoco
,
jarjar_prefix
,
jarjar_rename
,
jarjar_rules
,
jarjar_shards
,
java_resource_dirs
,
java_resources
,
java_version
,
javac_shard_size
,
javac_srcjar_shards
,
javacflags
,
kotlin_incremental
,
kotlin_lang_version
,
kotlin_plugins
,
kotlincflags
,
lfi_supported
,
libs
,
licenses
,
lint
,
main_dex_rules
,
manifest
,
max_sdk_version
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
no_dex_container
,
no_full_install
,
odm_dlkm_specific
,
omit_static_modifier
,
openjdk9
,
optimize
,
optional_uses_libs
,
overrides
,
owner
,
package_name
,
patch_module
,
permitted_packages
,
platform_apis
,
plugins
,
product_specific
,
product_variables.arc
,
product_variables.build_from_text_stub
,
product_variables.debuggable
,
product_variables.eng
,
product_variables.malloc_low_memory
,
product_variables.native_coverage
,
product_variables.platform_sdk_version_or_codename
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
proto
,
proto_srcs
,
provides_uses_lib
,
ramdisk
,
ravenizer
,
recovery
,
replace_max_sdk_version_placeholder
,
required
,
sdk_version
,
services
,
soc_specific
,
split_all_variants
,
static_kotlin_stdlib
,
static_libs
,
stem
,
strict_deps
,
system_dlkm_specific
,
system_ext_specific
,
system_modules
,
target
,
target.android
,
target.host
,
target.hostdex
,
target_required
,
target_sdk_version
,
team
,
test_harness_ramdisk
,
unchecked_module
,
uncompress_dex
,
use_generic_config
,
use_tools_jar
,
uses_libs
,
v4_signature
,
vendor
,
vendor_dlkm_specific
,
vendor_kernel_ramdisk
,
vendor_ramdisk
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
,
worksource_support
name
string, The name of the module. Must be unique across all modules.
srcs
configurable list of string, list of source files used to compile the Java module. May be .java, .kt, .logtags, .proto,
or .aidl files.
exclude_srcs
configurable list of string, list of source files that should not be used to build the Java module.
This is most useful in the arch/multilib variants to remove non-common files
defaults
list of string
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
aconfig_Cache_files
list of *ast.SelectorExpr, intermediate aconfig cache file tacked in by GeneratedJavaLibraryModule
⊕aidl
include_dirs
list of string, Top level directories to pass to aidl tool
local_include_dirs
list of string, Directories rooted at the Android.bp file to pass to aidl tool
export_include_dirs
list of string, directories that should be added as include directories for any aidl sources of modules
that depend on this module, as well as to aidl for this module.
generate_traces
bool, whether to generate traces (for systrace) for this interface
generate_get_transaction_name
bool, whether to generate Binder#GetTransaction name method.
enforce_permissions
bool, whether all interfaces should be annotated with required permissions.
enforce_permissions_exceptions
list of string, allowlist for interfaces that (temporarily) do not require annotation for permissions.
flags
list of string, list of flags that will be passed to the AIDL compiler
aidl_version
int64, Version of AIDL lib to use for vendor logging. Default is 2.
annotation_processor_flags
list of string, List of annotation processor options to pass in.
apex_available
list of string, Availability of this module in APEXes. Only the listed APEXes can contain this module. If
the module has stubs then other APEXes and the platform may access it through them
(subject to visibility).
"//apex_available:anyapex" is a pseudo APEX name that matches to any APEX.
"//apex_available:platform" refers to non-APEX partitions like "system.img".
Prefix pattern (com.foo.*) can be used to match with any APEX name with the prefix(com.foo.).
Wildcard ? can be used to match exactly one path segment (e.g. com.?.foo matches com.bar.foo). This may be combined with prefix pattern for complex routing (e.g., com.?.foo.*).
Default is ["//apex_available:platform"].
arch
interface
associates
list of string, List of Kotlin libraries whose `internal` members are accessible to this library
atoms_module
string, Atoms module annotation.
class_name
string, Class name of the generated logging class. Default is "<atoms_module>StatsLog"
common_srcs
list of string, list Kotlin of source files containing Kotlin code that should be treated as common code in
a codebase that supports Kotlin multiplatform. See
https://kotlinlang.org/docs/reference/multiplatform.html. May be only be .kt files.
compile_data
list of string, A list of files or dependencies to make available to the build sandbox. This is
useful if source files are symlinks, the targets of the symlinks must be listed here.
Note that currently not all actions implemented by android_apps are sandboxed, so you
may only see this being necessary in lint builds.
compile_dex
bool, If set to true, compile dex regardless of installable. Defaults to false.
compile_multilib
configurable string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform).
debug_ramdisk
bool, Whether this module is installed to debug ramdisk
device_common_java_resources
configurable list of string, Same as java_resources, but modules added here will use the device variant. Can be useful
for making a host test that tests the contents of a device built app.
device_first_java_resources
configurable list of string, Same as java_resources, but modules added here will use the device's os variant and the
device's first architecture variant. Can be useful for making a host test that tests the
contents of a native device built app.
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dex_preopt
enabled
configurable bool, If false, prevent dexpreopting. Defaults to true.
app_image
configurable bool, If true, generate an app image (.art file) for this module.
profile_guided
configurable bool, If true, use a checked-in profile to guide optimization. Defaults to false unless
a matching profile is set or a profile is found in PRODUCT_DEX_PREOPT_PROFILE_DIR
that matches the name of this module, in which case it is defaulted to true.
profile
configurable string, If set, provides the path to profile relative to the Android.bp file. If not set,
defaults to searching for a file that matches the name of this module in the default
profile location set by PRODUCT_DEX_PREOPT_PROFILE_DIR, or empty if not found.
enable_profile_rewriting
configurable bool, If set to true, r8/d8 will use `profile` as input to generate a new profile that matches
the optimized dex.
The new profile will be subsequently used as the profile to dexpreopt the dex file.
⊕dist
Dist
configuration to distribute output files from this module to the distribution
directory (default: $OUT/dist, configurable with $DIST_DIR)
targets
list of string, Copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
append_artifact_with_product
bool, If true, then the artifact file will be appended with _<product name>. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be foo_coral.apk. If false, there is
no change to the artifact file name.
prepend_artifact_with_product
bool, If true, then the artifact file will be prepended with <product name>-. For
example, if the product is coral and the module is an android_app module
of name foo, then the artifact would be coral-foo.apk. If false, there is
no change to the artifact file name.
tag
string, A string tag to select the OutputFiles associated with the tag.
If no tag is specified then it will select the default dist paths provided
by the module type. If a tag of "" is specified then it will return the
default output files provided by the modules, i.e. the result of calling
OutputFiles("").
only_on_java_coverage_builds
bool, Only do the dist on java coverage builds (EMMA_INSTRUMENT=true).
Used for disting java coverage reports which are not built normally.
dists
list of Dist, a list of configurations to distribute output files from this module to the
distribution directory (default: $OUT/dist, configurable with $DIST_DIR)
dxflags
configurable list of string, list of module-specific flags that will be used for dex compiles
enable_ksp
bool, Which annotation processor to use when working with kotlin: kapt or ksp. Defaults to false.
enabled
configurable bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
enforce_uses_libs
bool, If true, the list of uses_libs and optional_uses_libs modules must match the AndroidManifest.xml file. Defaults
to true if either uses_libs or optional_uses_libs is set. Will unconditionally default to true in the future.
⊕errorprone
javacflags
list of string, List of javac flags that should only be used when running errorprone.
enabled
bool, This property can be in 3 states. When set to true, errorprone will
be run during the regular build. When set to false, errorprone will
never be run. When unset, errorprone will be run when the RUN_ERROR_PRONE
environment variable is true. Setting this to false will improve build
performance more than adding -XepDisableAllChecks in javacflags.
exclude_common_srcs
list of string, list of Kotlin source files that should excluded from the list of common_srcs.
exclude_java_resource_dirs
list of string, list of directories that should be excluded from java_resource_dirs
exclude_java_resources
list of string, list of files that should be excluded from java_resources and java_resource_dirs
exclude_kotlinc_generated_files
bool, Exclude kotlinc generate files: *.kotlin_module, *.kotlin_builtins. Defaults to false.
exclude_uses_libs
list of string, A list of shared library names to exclude from the classpath of the APK. Adding a library here
will prevent it from being used when precompiling the APK and prevent it from being implicitly
added to the APK's manifest's <uses-library> elements.
Care must be taken when using this as it could result in runtime errors if the APK actually
uses classes provided by the library and which are not provided in any other way.
This is primarily intended for use by various CTS tests that check the runtime handling of the
android.test.base shared library (and related libraries) but which depend on some common
libraries that depend on the android.test.base library. Without this those tests will end up
with a <uses-library android:name="android.test.base"/> in their manifest which would either
render the tests worthless (as they would be testing the wrong behavior), or would break the
test altogether by providing access to classes that the tests were not expecting. Those tests
provide the android.test.base statically and use jarjar to rename them so they do not collide
with the classes provided by the android.test.base library.
exported_plugins
list of string, List of modules to export to libraries that directly depend on this library as annotation
processors. Note that if the plugins set generates_api: true this will disable the turbine
optimization on modules that depend on this module, which will reduce parallelism and cause
more recompilation.
gen_type
string, Type of logging sources to generate. There are 2 choices:
"default": Generate logging methods that have a parameter for each atom field. [default]
"typesafe": Generate logging methods that use a struct for creating atom events.
generated_srcjars
list of *ast.SelectorExpr, Additional srcJars tacked in by GeneratedJavaLibraryModule
⊕hidden_api
unsupported
list of string, Marks each signature in the referenced files as being unsupported.
removed
list of string, Marks each signature in the referenced files as being unsupported because it has been
removed. Any conflicts with other flags are ignored.
max_target_r_low_priority
list of string, Marks each signature in the referenced files as being supported only for
targetSdkVersion <= R and low priority.
max_target_q
list of string, Marks each signature in the referenced files as being supported only for
targetSdkVersion <= Q.
max_target_p
list of string, Marks each signature in the referenced files as being supported only for
targetSdkVersion <= P.
max_target_o_low_priority
list of string, Marks each signature in the referenced files as being supported only for
targetSdkVersion <= O
and low priority. Any conflicts with other flags are ignored.
blocked
list of string, Marks each signature in the referenced files as being blocked.
unsupported_packages
list of string, Marks each signature in every package in the referenced files as being unsupported.
package_prefixes
configurable list of string, Contains prefixes of a package hierarchy that is provided solely by this
bootclasspath_fragment.
This affects the signature patterns file that is used to select the subset of monolithic
hidden API flags. See split_packages property for more details.
single_packages
list of string, A list of individual packages that are provided solely by this
bootclasspath_fragment but which cannot be listed in package_prefixes
because there are sub-packages which are provided by other modules.
This should only be used for legacy packages. New packages should be
covered by a package prefix.
split_packages
configurable list of string, The list of split packages provided by this bootclasspath_fragment.
A split package is one that contains classes which are provided by multiple
bootclasspath_fragment modules.
This defaults to "*" - which treats all packages as being split. A module that has no split
packages must specify an empty list.
This affects the signature patterns file that is generated by a bootclasspath_fragment and
used to select the subset of monolithic hidden API flags against which the flags generated
by the bootclasspath_fragment are compared.
The signature patterns file selects the subset of monolithic hidden API flags using a number
of patterns, i.e.:
* The qualified name (including package) of an outermost class, e.g. java/lang/Character.
This selects all the flags for all the members of this class and any nested classes.
* A package wildcard, e.g. java/lang/*. This selects all the flags for all the members of all
the classes in this package (but not in sub-packages).
* A recursive package wildcard, e.g. java/**. This selects all the flags for all the members
of all the classes in this package and sub-packages.
The signature patterns file is constructed as follows:
* All the signatures are retrieved from the all-flags.csv file.
* The member and inner class names are removed.
* If a class is in a split package then that is kept, otherwise the class part is removed
and replaced with a wildcard, i.e. *.
* If a package matches a package prefix then the package is removed.
* All the package prefixes are added with a recursive wildcard appended to each, i.e. **.
* The resulting patterns are sorted.
So, by default (i.e. without specifying any package_prefixes or split_packages) the signature
patterns is a list of class names, because there are no package packages and all packages are
assumed to be split.
If any split packages are specified then only those packages are treated as split and all
other packages are treated as belonging solely to the bootclasspath_fragment and so they use
wildcard package patterns.
So, if an empty list of split packages is specified then the signature patterns file just
includes a wildcard package pattern for every package provided by the bootclasspath_fragment.
If split_packages are specified and a package that is split is not listed then it could lead
to build failures as it will select monolithic flags that are generated by another
bootclasspath_fragment to compare against the flags provided by this fragment. The latter
will obviously not contain those flags and that can cause the comparison and build to fail.
If any package prefixes are specified then any matching packages are removed from the
signature patterns and replaced with a single recursive package pattern.
It is not strictly necessary to specify either package_prefixes or split_packages as the
defaults will produce a valid set of signature patterns. However, those patterns may include
implementation details, e.g. names of implementation classes or packages, which will be
exported to the sdk snapshot in the signature patterns file. That is something that should be
avoided where possible. Specifying package_prefixes and split_packages allows those
implementation details to be excluded from the snapshot.
hiddenapi_additional_annotations
list of string, A list of java_library instances that provide additional hiddenapi annotations for the library.
host_cross_supported
bool, If set to true, build a variant of the module for the host cross. Defaults to true.
host_required
list of string, names of other modules to install on host if this module is installed
hostdex
bool, If true, export a copy of the module as a -hostdex module for host testing.
include_srcs
bool, If set to true, include sources used to compile the module in to the final jar
init_rc
configurable list of string, init.rc files to be installed if this module is installed
install_path_skip_first_stage_ramdisk_dir
bool, Whether the install path skips first_stage_ramdisk subdirectory.
installable
bool, If set to true, allow this module to be dexed and installed on devices. Has no
effect on host modules, which are always considered installable.
interface
string, The codegen API to use. Supported APIs are "platform" (default), or "vendor"
is_stubs_module
bool, Property signifying whether the module compiles stubs or not.
Should be set to true when srcs of this module are stub files.
This property does not need to be set to true when the module depends on
the stubs via libs, but should be set to true when the module depends on
the stubs via static libs.
⊕jacoco
include_filter
list of string, List of classes to include for instrumentation with jacoco to collect coverage
information at runtime when building with coverage enabled. If unset defaults to all
classes.
Supports '*' as the last character of an entry in the list as a wildcard match.
If preceded by '.' it matches all classes in the package and subpackages, otherwise
it matches classes in the package that have the class name as a prefix.
exclude_filter
list of string, List of classes to exclude from instrumentation with jacoco to collect coverage
information at runtime when building with coverage enabled. Overrides classes selected
by the include_filter property.
Supports '*' as the last character of an entry in the list as a wildcard match.
If preceded by '.' it matches all classes in the package and subpackages, otherwise
it matches classes in the package that have the class name as a prefix.
jarjar_prefix
string, if not blank, used as prefix to generate repackage rule
jarjar_rename
list of string, java class names to rename with jarjar when a reverse dependency has a jarjar_prefix
property.
jarjar_rules
string, if not blank, run jarjar using the specified rules file
jarjar_shards
configurable string, Number of shards for jarjar. It needs to be an integer represented as a string.
TODO(b/383559945) change it to int, once Configurable supports the type.
java_resource_dirs
list of string, list of directories containing Java resources
java_resources
configurable list of string, list of files to use as Java resources
java_version
string, If not blank, set the java version passed to javac as -source and -target
javac_shard_size
int64, The number of Java source entries each Javac instance can process
javac_srcjar_shards
int64, The number of shards to be used for processing srcJars
javacflags
list of string, list of module-specific flags that will be used for javac compiles
kotlin_incremental
bool, Whether this target supports compilation with the kotlin-incremental-client.
kotlin_lang_version
string, Kotlin language version to target. Currently only 1.9 and 2 are supported.
See kotlinc's `-language-version` flag.
kotlin_plugins
list of string, List of modules to use as kotlin plugin
kotlincflags
list of string, list of module-specific flags that will be used for kotlinc compiles
lfi_supported
bool, Whether this module can be built with for lightweight fault isolation (LFI), an
in-process sandboxing technique.
libs
configurable list of string, list of java libraries that will be in the classpath
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
⊕lint
Controls for running Android Lint on the module.
enabled
bool, If true, run Android Lint on the module. Defaults to true.
flags
list of string, Flags to pass to the Android Lint tool.
fatal_checks
list of string, Checks that should be treated as fatal.
error_checks
list of string, Checks that should be treated as errors.
warning_checks
list of string, Checks that should be treated as warnings.
disabled_checks
list of string, Checks that should be skipped.
baseline_filename
string, The lint baseline file to use. If specified, lint warnings listed in this file will be
suppressed during lint checks.
strict_updatability_linting
bool, If true, baselining updatability lint checks (e.g. NewApi) is prohibited. Defaults to false.
test
bool, Treat the code in this module as test code for @VisibleForTesting enforcement.
This will be true by default for test module types, false otherwise.
If soong gets support for testonly, this flag should be replaced with that.
suppress_exit_code
bool, Whether to ignore the exit code of Android lint. This is the --exit_code
option. Defaults to false.
main_dex_rules
list of string, A list of files containing rules that specify the classes to keep in the main dex file.
manifest
configurable string, manifest file to be included in resulting jar
max_sdk_version
string, if not blank, set the maximum version of the sdk that the compiled artifacts will run against.
Defaults to empty string "". See sdk_version for possible values.
min_sdk_version
configurable string, if not blank, set the minimum version of the sdk that the compiled artifacts will run against.
Defaults to sdk_version if not set. See sdk_version for possible values.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
no_dex_container
bool, Disable dex container (also known as "multi-dex").
This may be necessary as a temporary workaround to mask toolchain bugs (see b/341652226).
no_full_install
bool, When set to true, this module is not installed to the full install path (ex: under
out/target/product/<name>/<partition>). It can be installed only to the packaging
modules like android_filesystem.
odm_dlkm_specific
bool, Install to partition odm_dlkm when set to true.
omit_static_modifier
bool, Generate logging methods without the static modifier.
⊕openjdk9
srcs
list of string, List of source files that should only be used when passing -source 1.9 or higher
javacflags
list of string, List of javac flags that should only be used when passing -source 1.9 or higher
⊕optimize
enabled
configurable bool, If false, disable all optimization and use D8 to compile dex, otherwise
use R8. Defaults to true for android_app and android_test_helper_app
modules, false for android_test, java_library, and java_test modules.
d8_on_eng
bool, If true, then `d8` will be used on eng builds instead of `r8`, even though
optimize.enabled is true.
force_disabled_with_source_stubs
bool, If true, disable the use of R8 and hence all optimizations if the build
is using source stubs. Overrides the `enabled` property.
Using R8 implicitly adds dependencies on the SDK in the boot classpath
(more precisely `LegacyCorePlatformBootclasspathLibraries` and/or
`FrameworkLibraries` in build/soong/java/config/config.go). If source
stubs are enabled (through e.g. PRODUCT_BUILD_FROM_SOURCE_STUB) then
implementation libraries in the SDK would get cyclic dependencies on each
other with R8. This flag needs to be true for those libraries to resort
to D8 in those builds.
The R8 dependencies are added statically before `select()` expressions
are evaluated. Hence this flag is applicable even if `enabled` is false,
and it cannot itself support `select()`.
ignore_library_extends_program
bool, Whether to allow that library classes inherit from program classes.
Defaults to false.
ignore_warnings
bool, Whether to continue building even if warnings are emitted. Defaults to true.
keep_runtime_invisible_annotations
bool, Whether runtime invisible annotations should be kept by R8. Defaults to false.
This is equivalent to:
-keepattributes RuntimeInvisibleAnnotations,
RuntimeInvisibleParameterAnnotations,
RuntimeInvisibleTypeAnnotations
This is only applicable when RELEASE_R8_ONLY_RUNTIME_VISIBLE_ANNOTATIONS is
enabled and will be used to migrate away from keeping runtime invisible
annotations (b/387958004).
proguard_compatibility
configurable bool, If true, runs R8 in Proguard compatibility mode, otherwise runs R8 in full mode.
Defaults to false.
Deprecated: This will soon be removed and disabled universally. See b/215530220.
protect_api_surface
bool, If true, R8 will not add public or protected members (fields or methods) to
the API surface of the compilation unit, i.e., classes that are kept or
have kept subclasses will not expose any members added by R8 for internal
use. That includes renamed members if obfuscation is enabled.
This should only be used for building targets that go on the bootclasspath.
Defaults to false.
shrink
configurable bool, If true, optimize for size by removing unused code. Defaults to true for apps,
false for libraries and tests.
optimize
configurable bool, If true, optimize bytecode. Defaults to true for apps when
`RELEASE_R8_OPTIMIZE_BY_DEFAULT` is set, otherwise false.
obfuscate
configurable bool, If true, obfuscate bytecode by renaming packages, classes, and members.
Defaults to false.
no_aapt_flags
bool, If true, do not use the flag files generated by aapt that automatically keep
classes referenced by the app manifest. Defaults to false.
shrink_resources
configurable bool, If true, optimize for size by removing unused resources. Ignored for the
"eng" build variant. Superseded by the optimized_shrink_resources setting
if that one is set explicitly to either true or false. Defaults to false.
optimized_shrink_resources
configurable bool, If true, use optimized resource shrinking in R8. Always false if
shrink_resources is false. Defaults to true if
RELEASE_USE_OPTIMIZED_RESOURCE_SHRINKING_BY_DEFAULT is true, false
otherwise.
Optimized shrinking means that R8 will trace and treeshake resources together with code
and apply additional optimizations. This implies non final fields in the R classes.
proguard_flags
configurable list of string, Flags to pass to proguard.
proguard_flags_files
configurable list of string, Specifies the locations of files containing proguard flags.
included_proguard_flags_files
configurable list of string, If a proguard file from proguard_flags_files uses -include to include another file,
that included file must be listed here so that the build system knows about the
dependency.
export_proguard_flags_files
bool, If true, transitive reverse dependencies of this module will have this
module's proguard spec appended to their optimization action
exclude
string, Path to a file containing a list of class names that should not be compiled using R8.
These classes will be compiled by D8 similar to when Optimize.Enabled is false.
Example:
r8.exclude:
com.example.Foo
com.example.Bar
com.example.Bar$Baz
By default all classes are compiled using R8 when Optimize.Enabled is set.
include
string, Path to a file containing a list of class names that should be compiled using R8.
A class is only compiled through R8 if and only if it's part of the includes and not
part of the excludes. Otherwise D8 will be used.
If this attribute is not specified then '**' is used instead, which includes every single
class that is not excluded.
The file is expected to contain fully-qualified classes name and package names ending
in `.*` or `.**`, separated by newline.
trace_references_from
configurable list of string, Optional list of downstream (Java) libraries from which to trace and preserve references
when optimizing. Note that this requires that the source reference does *not* have
a strict lib dependency on this target; dependencies should be on intermediate targets
statically linked into this target, e.g., if A references B, and we want to trace and
keep references from A when optimizing B, you would create an intermediate B.impl (
containing all static code), have A depend on `B.impl` via libs, and set
`trace_references_from: ["A"]` on B.
Also note that these are *not* inherited across targets, they must be specified at the
top-level target that is optimized.
TODO(b/212737576): Handle this implicitly using bottom-up deps mutation and implicit
creation of a proxy `.impl` library.
import_libraries_as_classpath
bool, Add libraries using `--classpath` instead of `--libs`, to allow overrides. This
should normally not be used, but can be necessary when running R8 on the boot
classpath itself.
optional_uses_libs
configurable list of string, A list of shared library modules that will be listed in uses-library tags in the AndroidManifest.xml file with
required=false.
overrides
list of string, List of module names that are prevented from being installed when this module gets
installed.
owner
string, vendor who owns this module
package_name
string, Java package name for the generated logging class
patch_module
string, When compiling language level 9+ .java code in packages that are part of
a system module, patch_module names the module that your sources and
dependencies should be patched into. The Android runtime currently
doesn't implement the JEP 261 module system so this option is only
supported at compile time. It should only be needed to compile tests in
packages that exist in libcore and which are inconvenient to move
elsewhere.
permitted_packages
list of string, If not empty, classes are restricted to the specified packages and their sub-packages.
This restriction is checked after applying jarjar rules and including static libs.
platform_apis
bool, Whether to compile against the platform APIs instead of an SDK.
If true, then sdk_version must be empty. The value of this field
is ignored when module's type isn't android_app, android_test, or android_test_helper_app.
plugins
list of string, List of modules to use as annotation processors
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
⊕product_variables.arc
⊕exclude_srcs
⊕static_libs
⊕srcs
⊕product_variables.build_from_text_stub
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕static_libs
⊕srcs
⊕exclude_srcs
⊕product_variables.eng
⊕product_variables.malloc_low_memory
⊕product_variables.native_coverage
⊕product_variables.platform_sdk_version_or_codename
⊕product_variables.release_aidl_use_unfrozen
⊕required
⊕vintf_fragment_modules
⊕product_variables.selinuxignoreneverallows
⊕product_variables.unbundled_build
⊕enabled
Configurable[bool]
Configurable[bool]
proptools.Configurable[bool]
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of string, list of directories that will be added to the protoc include paths.
local_include_dirs
list of string, list of directories relative to the bp file that will
be added to the protoc include paths.
canonical_path_from_root
bool, whether to identify the proto files from the root of the
source tree (the original method in Android, useful for
android-specific protos), or relative from where they were
specified (useful for external/third party protos).
This defaults to true today, but is expected to default to
false in the future.
output_params
list of string, List of extra options that will be passed to the proto generator.
proto_srcs
list of string, Path(s) to proto srcs for atoms. Only one file must define the Atom proto message.
provides_uses_lib
string, Optional name of the <uses-library> provided by this module. This is needed for non-SDK
libraries, because SDK ones are automatically picked up by Soong. The <uses-library> name
normally is the same as the module name, but there are exceptions.
ramdisk
bool, Whether this module is installed to ramdisk
⊕ravenizer
enabled
bool, If true, enable the "Ravenizer" tool on the output jar.
"Ravenizer" is a tool for Ravenwood tests, but it can also be enabled on other kinds
of java targets.
strip_mockito
bool, If true, the "Ravenizer" tool will remove all Mockito and DexMaker
classes from the output jar.
flags
list of string, Extra arguments passed to Ravenizer
recovery
bool, Whether this module is installed to recovery partition
replace_max_sdk_version_placeholder
string, if not blank, set the maxSdkVersion properties of permission and uses-permission tags.
Defaults to empty string "". See sdk_version for possible values.
required
configurable list of string, names of other modules to install if this module is installed
sdk_version
string, If not blank, set to the version of the sdk to compile against.
Defaults to an empty string, which compiles the module against the private platform APIs.
Values are of one of the following forms:
1) numerical API level, "current", "none", or "core_platform"
2) An SDK kind with an API level: "<sdk kind>_<API level>"
See build/soong/android/sdk_version.go for the complete and up to date list of SDK kinds.
If the SDK kind is empty, it will be set to public.
services
list of string, List of files to include in the META-INF/services folder of the resulting jar.
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
split_all_variants
bool, If this property is set to true, all supported variants of the module will be created.
Primarily intended for use in unit tests.
static_kotlin_stdlib
bool, If true, package the kotlin stdlib into the jar. Defaults to true.
static_libs
configurable list of string, list of java libraries that will be compiled into the resulting jar
stem
string, set the name of the output. If not set, `name` is used.
To override a module with this property set, overriding module might need to set this as well.
Otherwise, both the overridden and the overriding modules will have the same output name, which
can cause the duplicate output error.
strict_deps
string, If set to "warn" or "error", enables strict dependency checking for this module.
This ensures that the module only references classes that are provided by its direct
dependencies, preventing accidental usage of transitive dependencies.
system_dlkm_specific
bool, Install to partition system_dlkm when set to true.
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
system_modules
string, When targeting 1.9 and above, override the modules to use with --system,
otherwise provides defaults libraries to add to the bootclasspath.
target
interface
⊕target.android
compile_multilib
configurable string
enabled
bool
⊕target.host
compile_multilib
configurable string
⊕target.hostdex
required
list of string, Additional required dependencies to add to -hostdex modules.
target_required
list of string, names of other modules to install on target if this module is installed
target_sdk_version
string, if not blank, set the targetSdkVersion in the AndroidManifest.xml.
Defaults to sdk_version if not set. See sdk_version for possible values.
team
string, The team (defined by the owner/vendor) who owns the property.
test_harness_ramdisk
bool, Whether this module is installed to test harness ramdisk
unchecked_module
bool, If this property is set to true, this module will not be built on checkbuilds.
uncompress_dex
bool, Keep the data uncompressed. We always need uncompressed dex for execution,
so this might actually save space by avoiding storing the same data twice.
This defaults to reasonable value based on module and should not be set.
It exists only to support ART tests.
use_generic_config
bool, Set to true if this module must be generic and does not require product-specific information.
To be included in the system image, this property must be set to true.
use_tools_jar
bool, Add host jdk tools.jar to bootclasspath
uses_libs
configurable list of string, A list of shared library modules that will be listed in uses-library tags in the AndroidManifest.xml file.
v4_signature
bool, If true, generate the signature file of APK Signing Scheme V4, along side the signed APK file.
Defaults to false.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vendor_dlkm_specific
bool, Install to partition vendor_dlkm when set to true.
vendor_kernel_ramdisk
bool, Whether this module is installed to vendor kernel ramdisk
vendor_ramdisk
bool, Whether this module is installed to vendor ramdisk
vintf_fragment_modules
configurable list of string, vintf_fragment Modules required from this module.
vintf_fragments
configurable list of string, VINTF manifest fragments to be installed if this module is installed
visibility
list of string, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/main/README.md#visibility for
more details.
worksource_support
bool, Add support for logging WorkSource objects.