aconfig_declarations_group
name
,
defaults
,
aconfig_declarations_groups
,
arch
,
cc_aconfig_libraries
,
compile_multilib
,
debug_ramdisk
,
device_specific
,
dist
,
dists
,
enabled
,
host_required
,
init_rc
,
java_aconfig_libraries
,
licenses
,
multilib
,
native_bridge_supported
,
no_full_install
,
odm_dlkm_specific
,
overrides
,
owner
,
product_specific
,
product_variables.debuggable
,
product_variables.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
ramdisk
,
recovery
,
required
,
rust_aconfig_libraries
,
soc_specific
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
use_generic_config
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
defaults
list of string
aconfig_declarations_groups
list of string, Name of the aconfig_declarations_group modules
arch
interface
cc_aconfig_libraries
list of string, Name of the cc_aconfig_library modules
compile_multilib
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_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("").
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)
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.
host_required
list of string, names of other modules to install on host if this module is installed
init_rc
configurable list of string, init.rc files to be installed if this module is installed
java_aconfig_libraries
list of string, Name of the java_aconfig_library modules
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
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.
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
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.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕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
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
configurable list of string, names of other modules to install if this module is installed
rust_aconfig_libraries
list of string, Name of the rust_aconfig_library modules
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).
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).
target
interface
⊕target.android
compile_multilib
string
enabled
bool
⊕target.host
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.
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.
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_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.
cc_aconfig_library
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
aconfig_declarations
,
afdo
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
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_symbols_not_weak_list
,
force_symbols_weak_list
,
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_dirs
,
init_rc
,
inject_bssl_hash
,
install_in_root
,
install_in_xbin
,
installable
,
instruction_set
,
ldflags
,
lex
,
licenses
,
linker_scripts
,
llndk
,
local_include_dirs
,
logtags
,
lto
,
lto_O0
,
min_sdk_version
,
mode
,
multilib
,
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.enforce_vintf_manifest
,
product_variables.eng
,
product_variables.malloc_low_memory
,
product_variables.malloc_pattern_fill_contents
,
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.treble_linker_namespaces
,
product_variables.uml
,
product_variables.unbundled_build
,
proprietary
,
proto
,
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
,
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_only
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_disabled_srcs
,
tidy_flags
,
tidy_timeout_srcs
,
unexported_symbols_list
,
unique_host_soname
,
use_generic_config
,
use_version_lib
,
vendor
,
vendor_available
,
vendor_dlkm_specific
,
vendor_public_library
,
vendor_ramdisk
,
vendor_ramdisk_available
,
version_script
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
,
whole_program_vtables
,
whole_static_libs
,
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.
aconfig_declarations
string, name of the aconfig_declarations module to generate a library for
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
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.).
Default is ["//apex_available:platform"].
arch
interface
asflags
list of string, list of module-specific flags that will be used for .S compiles
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
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("").
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
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_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
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_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
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of string, list of module-specific flags that will be used for all link steps
lex
LexProperties
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
linker_scripts
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
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.
mode
string, default mode is "production", the other accepted modes are:
"test": to generate test mode version of the library
"exported": to generate exported mode version of the library
"force-read-only": to generate force-read-only mode version of the library
an error will be thrown if the mode is not supported
multilib
interface
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.enforce_vintf_manifest
⊕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_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.treble_linker_namespaces
⊕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
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).
⊕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
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
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
⊕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.
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
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.
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
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.
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
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.
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.
⊕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.
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.
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.
⊕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.
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
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
⊕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_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.
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_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.
yacc
YaccProperties
java_aconfig_library
name
,
srcs
,
exclude_srcs
,
defaults
,
host_supported
,
device_supported
,
aconfig_Cache_files
,
aconfig_declarations
,
aidl
,
apex_available
,
arch
,
associates
,
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
,
enabled
,
enforce_uses_libs
,
errorprone
,
exclude_common_srcs
,
exclude_java_resource_dirs
,
exclude_java_resources
,
exclude_kotlinc_generated_files
,
exclude_uses_libs
,
exported_plugins
,
generated_srcjars
,
header_jar_override
,
headers_only
,
hidden_api
,
hiddenapi_additional_annotations
,
host_cross_supported
,
host_required
,
hostdex
,
include_srcs
,
init_rc
,
installable
,
is_stubs_module
,
jacoco
,
jarjar_prefix
,
jarjar_rename
,
jarjar_rules
,
jarjar_shards
,
java_resource_dirs
,
java_resources
,
java_version
,
javac_shard_size
,
javacflags
,
kotlin_incremental
,
kotlin_lang_version
,
kotlin_plugins
,
kotlincflags
,
libs
,
licenses
,
lint
,
main_dex_rules
,
manifest
,
max_sdk_version
,
min_sdk_version
,
mode
,
multilib
,
native_bridge_supported
,
no_dex_container
,
no_full_install
,
odm_dlkm_specific
,
openjdk9
,
optimize
,
optional_uses_libs
,
overrides
,
owner
,
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
,
provides_uses_lib
,
ramdisk
,
ravenizer
,
recovery
,
replace_max_sdk_version_placeholder
,
required
,
sdk_version
,
services
,
soc_specific
,
static_kotlin_stdlib
,
static_libs
,
stem
,
system_dlkm_specific
,
system_ext_specific
,
system_modules
,
target
,
target.android
,
target.host
,
target.hostdex
,
target_required
,
target_sdk_version
,
team
,
uncompress_dex
,
use_generic_config
,
use_tools_jar
,
uses_libs
,
v4_signature
,
vendor
,
vendor_dlkm_specific
,
vendor_ramdisk
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, list of source files used to compile the Java module. May be .java, .kt, .logtags, .proto,
or .aidl files.
exclude_srcs
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
aconfig_declarations
string, name of the aconfig_declarations module to generate a library for
⊕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
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.).
Default is ["//apex_available:platform"].
arch
interface
associates
list of string, List of Kotlin libraries whose `internal` members are accessible to this library
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
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("").
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
list of string, list of module-specific flags that will be used for dex compiles
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.
generated_srcjars
list of *ast.SelectorExpr, Additional srcJars tacked in by GeneratedJavaLibraryModule
⊕hidden_api
package_prefixes
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
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.
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.
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
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.
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
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
libs
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
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
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.
mode
string, default mode is "production", the other accepted modes are:
"test": to generate test mode version of the library
"exported": to generate exported mode version of the library
"force-read-only": to generate force-read-only mode version of the library
an error will be thrown if the mode is not supported
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.
⊕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
bool, If false, disable all optimization. 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.
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
bool, If true, runs R8 in Proguard compatibility mode, otherwise runs R8 in full mode.
Defaults to false for apps and tests, true for libraries.
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
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 false.
obfuscate
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
bool, If true, optimize for size by removing unused resources. Defaults to false.
optimized_shrink_resources
bool, If true, use optimized resource shrinking in R8, overriding the
Shrink_resources setting. Defaults to false.
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
list of string, Flags to pass to proguard.
proguard_flags_files
list of string, Specifies the locations of files containing proguard flags.
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.
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
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.
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).
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.
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
string
enabled
bool
⊕target.host
⊕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.
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_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.
rust_aconfig_library
rust_aconfig_library generates aconfig rust code from the provided aconfig declaration. This module type will
create library variants that can be used as a crate dependency by adding it to the rlibs, dylibs, and rustlibs
properties of other modules.
name
,
srcs
,
defaults
,
host_supported
,
device_supported
,
aconfig_declarations
,
afdo
,
aliases
,
apex_available
,
apex_exclude
,
arch
,
bootstrap
,
cargo_env_compat
,
cargo_pkg_version
,
cfgs
,
clippy_lints
,
compile_multilib
,
crate_name
,
crate_root
,
debug_ramdisk
,
device_specific
,
dist
,
dists
,
double_loadable
,
dylib
,
edition
,
enabled
,
exclude_from_recovery_snapshot
,
exclude_from_vendor_snapshot
,
export_include_dirs
,
extra_exported_symbols
,
features
,
flags
,
host_cross_supported
,
host_required
,
include_dirs
,
init_rc
,
installable
,
ld_flags
,
licenses
,
lints
,
lto
,
min_sdk_version
,
mode
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_full_install
,
no_stdlibs
,
odm_available
,
odm_dlkm_specific
,
overrides
,
owner
,
prefer_rlib
,
proc_macros
,
product_available
,
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.release_aidl_use_unfrozen
,
product_variables.selinuxignoreneverallows
,
product_variables.unbundled_build
,
proprietary
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
rlib
,
rlibs
,
rustlibs
,
sanitize
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
source_stem
,
static
,
static_libs
,
stdlibs
,
stem
,
strip
,
stubs
,
suffix
,
sysroot
,
system_dlkm_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
team
,
use_expansive_default_srcs
,
use_generic_config
,
vendor
,
vendor_available
,
vendor_dlkm_specific
,
vendor_ramdisk
,
vendor_ramdisk_available
,
version_script
,
vintf_fragment_modules
,
vintf_fragments
,
visibility
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
srcs
list of string, path to the source file that is the main entry point of the program (e.g. main.rs or lib.rs).
Only a single source file can be defined. Modules which generate source can be included by prefixing
the module name with ":", for example ":libfoo_bindgen"
If no source file is defined, a single generated source module can be defined to be used as the main source.
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_declarations
string, name of the aconfig_declarations module to generate a library for
afdo
bool, Afdo allows developers self-service enroll for
automatic feedback-directed optimization using profile data.
aliases
list of string, Rust crate dependencies to rename. Each entry should be a string of the form "dependencyname:alias".
"dependencyname" here should be the name of the crate, not the Android module. This is
equivalent to writing `alias = { package = "dependencyname" }` in a `Cargo.toml`.
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.).
Default is ["//apex_available:platform"].
apex_exclude
bool, Deprecated - exclude this rust_ffi target from being included in APEXes.
TODO(b/362509506): remove this once all apex_exclude uses are switched to stubs.
arch
interface
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
cargo_env_compat
bool, Enables emitting certain Cargo environment variables. Only intended to be used for compatibility purposes.
Will set CARGO_CRATE_NAME to the crate_name property's value.
Will set CARGO_BIN_NAME to the output filename value without the extension.
cargo_pkg_version
string, If cargo_env_compat is true, sets the CARGO_PKG_VERSION env var to this value.
cfgs
configurable list of string, list of configuration options to enable for this crate. To enable features, use the "features" property.
clippy_lints
string, name of the lint set that should be used to validate this module.
Possible values are "default" (for using a sensible set of lints
depending on the module's location), "android" (for the strictest
lint set that applies to all Android platform code), "vendor" (for a
relaxed set) and "none" (to disable the execution of clippy). The
default value is "default". See also the `lints` property.
Default: none
compile_multilib
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).
crate_name
string, crate name, used for the library variant of this source provider. See additional details in rust_library.
crate_root
string, Entry point that is passed to rustc to begin the compilation. E.g. main.rs or lib.rs.
When this property is set,
* sandboxing is enabled for this module, and
* the srcs attribute is interpreted as a list of all source files potentially
used in compilation, including the entrypoint, and
* compile_data can be used to add additional files used in compilation that
not directly used as source files.
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("").
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.
⊕dylib
VariantLibraryProperties
enabled
bool
srcs
list of string
edition
string, specific rust edition that should be used if the default version is not desired
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_from_recovery_snapshot
bool, Normally Soong uses the directory structure to decide which modules
should be included (framework) or excluded (non-framework) from the
different snapshots (vendor, recovery, etc.), but this property
allows a partner to exclude a module normally thought of as a
framework module from the recovery snapshot.
exclude_from_vendor_snapshot
bool, Normally Soong uses the directory structure to decide which modules
should be included (framework) or excluded (non-framework) from the
different snapshots (vendor, recovery, etc.), but this property
allows a partner to exclude a module normally thought of as a
framework module from the vendor snapshot.
export_include_dirs
list of string, path to include directories to export to cc_* modules, only relevant for static/shared variants.
features
configurable list of string, list of features to enable for this crate
flags
list of string, flags to pass to rustc. To enable configuration options or features, use the "cfgs" or "features" properties.
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
include_dirs
list of string, TODO: Remove this when all instances of Include_dirs have been removed from rust_ffi modules.
path to include directories to pass to cc_* modules, only relevant for static/shared variants (deprecated, use export_include_dirs instead).
init_rc
configurable list of string, init.rc files to be installed if this module is installed
installable
bool
ld_flags
list of string, flags to pass to the linker
licenses
list of string, Describes the licenses applicable to this module. Must reference license modules.
lints
string, name of the lint set that should be used to validate this module.
Possible values are "default" (for using a sensible set of lints
depending on the module's location), "android" (for the strictest
lint set that applies to all Android platform code), "vendor" (for
a relaxed set) and "none" (for ignoring all lint warnings and
errors). The default value is "default".
Default: none
⊕lto
Control whether LTO is used for the final (Rust) linkage. This does not impact
cross-language LTO.
thin
bool, Whether thin LTO should be enabled. By default this is true.
LTO provides such a large code size benefit for Rust, this should always
be enabled for production builds unless there's a clear need to disable it.
min_sdk_version
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.
mode
string, default mode is "production", the other accepted modes are:
"test": to generate test mode version of the library
"exported": to generate exported mode version of the library
"force-read-only": to generate force-read-only mode version of the library
an error will be thrown if the mode is not supported
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architectures (also known as native bridge binary)
native_coverage
bool
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_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
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.
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
prefer_rlib
bool, Change the rustlibs linkage to select rlib linkage by default for device targets.
Also link libstd as an rlib as well on device targets.
Note: This is the default behavior for host targets.
This is primarily meant for rust_binary and rust_ffi modules where the default
linkage of libstd might need to be overridden in some use cases. This should
generally be avoided with other module types since it may cause collisions at
linkage if all dependencies of the root binary module do not link against libstd
the same way.
proc_macros
configurable list of string, list of rust proc_macro crate dependencies
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
⊕include_dirs
⊕shared_libs
⊕static_libs
⊕srcs
⊕whole_static_libs
⊕product_variables.build_from_text_stub
⊕product_variables.debuggable
⊕init_rc
⊕required
⊕host_required
⊕target_required
⊕strip.all
⊕strip.keep_symbols
⊕strip.keep_symbols_and_debug_frame
⊕static_libs
⊕whole_static_libs
⊕shared_libs
⊕srcs
⊕product_variables.eng
⊕product_variables.malloc_low_memory
⊕shared_libs
⊕whole_static_libs
⊕static_libs
⊕srcs
⊕product_variables.native_coverage
⊕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
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
required
configurable list of string, names of other modules to install if this module is installed
⊕rlib
VariantLibraryProperties
enabled
bool
srcs
list of string
rlibs
configurable list of string, list of rust rlib crate dependencies
rustlibs
configurable list of string, list of rust automatic crate dependencies.
Rustlibs linkage is rlib for host targets and dylib for device targets.
⊕sanitize
enable AddressSanitizer, HWAddressSanitizer, and others.
address
bool
hwaddress
bool
memtag_heap
bool, Memory-tagging, only available on arm64
if diag.memtag unset or false, enables async memory tagging
fuzzer
bool
never
bool
⊕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.
memtag_heap
bool, Memory-tagging, only available on arm64
requires sanitizer.memtag: true
if set, enables sync memory tagging
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
VariantLibraryProperties
enabled
bool
srcs
list of string
shared_libs
configurable list of string, list of C shared library dependencies
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).
source_stem
string, filename for the generated source file (<source_stem>.rs). This field is required.
The inherited "stem" property sets the output filename for the generated library variants only.
⊕static
VariantLibraryProperties
enabled
bool
srcs
list of string
static_libs
configurable list of string, list of C static library dependencies. These dependencies do not normally propagate to dependents
and may need to be redeclared. See whole_static_libs for bundling static dependencies into a library.
stdlibs
configurable list of string, list of Rust system library dependencies.
This is usually only needed when `no_stdlibs` is true, in which case it can be used to depend on system crates
like `core` and `alloc`.
stem
string, sets name of the output
⊕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
*ast.SelectorExpr
Generate stubs to make this library accessible to APEXes.
Can only be set for modules producing shared libraries.
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, append to name of output
sysroot
bool, Whether this library is part of the Rust toolchain sysroot.
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).
target
interface
⊕target.android
compile_multilib
string
enabled
bool
⊕target.host
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.
use_expansive_default_srcs
bool, Set this to true to use an expansive default set of source file requirements
(all .rs, .h, .xml, and .md files in the module tree).
This is primarily for tracking sources for RBE purposes. Currently defaults
to true, though this may change in the future.
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.
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_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, Version script to pass to the linker. By default this will replace the
implicit rustc emitted version script to mirror expected behavior in CC.
This is only relevant for rust_ffi_shared modules which are exposing a
versioned C API.
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_static_libs
configurable list of string, Similar to static_libs, but will bundle the static library dependency into a library. This is helpful
to avoid having to redeclare the dependency for dependents of this library, but in some cases may also
result in bloat if multiple dependencies all include the same static library whole.
The common use case for this is when the static library is unlikely to be a dependency of other modules to avoid
having to redeclare the static library dependency for every dependent module.
If you are not sure what to, for rust_library modules most static dependencies should go in static_libraries,
and for rust_ffi modules most static dependencies should go into whole_static_libraries.
For rust_ffi static variants, these libraries will be included in the resulting static library archive.
For rust_library rlib variants, these libraries will be bundled into the resulting rlib library. This will
include all of the static libraries symbols in any dylibs or binaries which use this rlib as well.