cc_benchmark
cc_benchmark compiles an executable binary that performs benchmark testing
of a specific component in a device. Additional files such as test suites
and test configuration are installed on the side of the compiled executed
binary.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
auto_gen_config
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
data
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
require_root
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
stl
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
test_config
,
test_config_template
,
test_suites
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, list of module-specific flags that will be used for .S compiles
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
data
list of strings, list of files or filegroup modules that provide data that should be installed alongside
the test
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
generated_sources
list of strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
require_root
bool, Add RootTargetPreparer to auto generated test config. This guarantees the test to run
with root permission.
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
target_required
list of strings, names of other modules to install on target if this module is installed
test_config
string, the name of the test configuration (for example "AndroidTest.xml") that should be
installed with the module.
test_config_template
string, the name of the test configuration template (for example "AndroidTestTemplate.xml") that
should be installed with the module.
test_suites
list of strings, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_benchmark_host
cc_benchmark_host compiles an executable binary that performs benchmark
testing of a specific component in the host. Additional files such as
test suites and test configuration are installed on the side of the
compiled executed binary.
name
,
srcs
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
auto_gen_config
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
data
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
require_root
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
stl
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
test_config
,
test_config_template
,
test_suites
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, list of module-specific flags that will be used for .S compiles
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
data
list of strings, list of files or filegroup modules that provide data that should be installed alongside
the test
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
generated_sources
list of strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
require_root
bool, Add RootTargetPreparer to auto generated test config. This guarantees the test to run
with root permission.
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
target_required
list of strings, names of other modules to install on target if this module is installed
test_config
string, the name of the test configuration (for example "AndroidTest.xml") that should be
installed with the module.
test_config_template
string, the name of the test configuration template (for example "AndroidTestTemplate.xml") that
should be installed with the module.
test_suites
list of strings, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_binary
cc_binary produces a binary that is runnable on a device.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
stl
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
generated_sources
list of strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_binary_host
cc_binary_host produces a binary that is runnable on a host.
name
,
srcs
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
stl
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
generated_sources
list of strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_defaults
cc_defaults provides a set of properties that can be inherited by other cc
modules. A module can use the properties from a cc_defaults using
`defaults: ["<:default_module_name>"]`. Properties of both modules are
merged (when possible) by prepending the default module's values to the
depending module's values.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
auto_gen_config
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
corpus
,
cpp_std
,
cppflags
,
data
,
debug
,
defaults
,
defaults_visibility
,
device_specific
,
dictionary
,
disable_framework
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
fuzz_config
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
gtest
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
isolated
,
ldflags
,
licenses
,
linker_script
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
no_named_install_directory
,
nocrt
,
notice
,
objs
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
require_root
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_executable
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
test_config
,
test_config_template
,
test_for
,
test_mainline_modules
,
test_min_api_level
,
test_min_sdk_version
,
test_options
,
test_per_src
,
test_suites
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, list of module-specific flags that will be used for .S compiles
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, list of module-specific flags that will be used for C compiles
corpus
list of strings, Optional list of seed files to be installed to the fuzz target's output
directory.
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
list of strings, list of module-specific flags that will be used for C++ compiles
data
list of strings, list of files or filegroup modules that provide data that should be installed alongside
the test
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
defaults_visibility
list of strings, Controls the visibility of the defaults module itself.
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`.
dictionary
string, Optional dictionary to be installed to the fuzz target's output directory.
disable_framework
bool, Add RunCommandTargetPreparer to stop framework before the test and start it after the test.
⊕dist
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
fuzz_config
FuzzConfig, Config for running the target on fuzzing infrastructure.
generated_sources
list of strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
gtest
bool, if set, build against the gtest library. Defaults to true.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
isolated
bool, if set, use the isolated gtest runner. Defaults to false.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
linker_script
string, if set, the path to a linker script to pass to ld -r when combining multiple object files.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
no_named_install_directory
bool, Disables the creation of a test-specific directory when used with
relative_install_path. Useful if several tests need to be in the same
directory, but test_per_src doesn't work.
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
notice
string, relative path to a file to include in the list of notices for the device
objs
list of strings, names of other cc_object modules to link into this module using partial linking
openmp
bool, Build and link with OpenMP
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
require_root
bool, Add RootTargetPreparer to auto generated test config. This guarantees the test to run
with root permission.
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_executable
bool, compile executable with -static
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
test_config
string, the name of the test configuration (for example "AndroidTest.xml") that should be
installed with the module.
test_config_template
string, the name of the test configuration template (for example "AndroidTestTemplate.xml") that
should be installed with the module.
test_for
list of strings, List of APEXes that this module tests. The module has access to
the private part of the listed APEXes even when it is not included in the
APEXes.
test_mainline_modules
list of strings, Add parameterized mainline modules to auto generated test config. The options will be
handled by TradeFed to download and install the specified modules on the device.
test_min_api_level
int64, Add MinApiLevelModuleController to auto generated test config. If the device property of
"ro.product.first_api_level" < Test_min_api_level, then skip this module.
test_min_sdk_version
int64, Add MinApiLevelModuleController to auto generated test config. If the device property of
"ro.build.version.sdk" < Test_min_sdk_version, then skip this module.
test_options
TestOptions, Test options.
test_per_src
bool, Create a separate binary for each source file. Useful when there is
global state that can not be torn down and reset between each test suite.
test_suites
list of strings, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_fuzz
cc_fuzz creates a host/device fuzzer binary. Host binaries can be found at
$ANDROID_HOST_OUT/fuzz/, and device binaries can be found at /data/fuzz on
your device, or $ANDROID_PRODUCT_OUT/data/fuzz in your build tree.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
corpus
,
cpp_std
,
cppflags
,
data
,
debug
,
defaults
,
device_specific
,
dictionary
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
fuzz_config
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
stl
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, list of module-specific flags that will be used for C compiles
corpus
list of strings, Optional list of seed files to be installed to the fuzz target's output
directory.
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
list of strings, list of module-specific flags that will be used for C++ compiles
data
list of strings, Optional list of data files to be installed to the fuzz target's output
directory. Directory structure relative to the module is preserved.
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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`.
dictionary
string, Optional dictionary to be installed to the fuzz target's output directory.
⊕dist
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
fuzz_config
FuzzConfig, Config for running the target on fuzzing infrastructure.
generated_sources
list of strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
Default: true
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_genrule
cc_genrule is a genrule that can depend on other cc_* objects.
The cmd may be run multiple times, once for each of the different arch/etc
variations.
name
,
srcs
,
host_supported
,
device_supported
,
apex_available
,
arch
,
cmd
,
compile_multilib
,
depfile
,
device_specific
,
dist
,
enabled
,
exclude_srcs
,
export_include_dirs
,
host_required
,
init_rc
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
out
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
required
,
sdk_version
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
tool_files
,
tools
,
vendor
,
vendor_available
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, list of input files
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.
apex_available
list of strings, 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".
Default is ["//apex_available:platform"].
arch
interface
cmd
string, The command to run on one or more input files. Cmd supports substitution of a few variables
(the actual substitution is implemented in GenerateAndroidBuildActions below)
Available variables for substitution:
$(location): the path to the first entry in tools or tool_files
$(location <label>): the path to the tool, tool_file, input or output with name <label>
$(in): one or more input files
$(out): a single output file
$(depfile): a file to which dependencies will be written, if the depfile property is set to true
$(genDir): the sandbox directory for this tool; contains $(out)
$$: a literal $
All files used must be declared as inputs (to ensure proper up-to-date checks).
Use "$(in)" directly in Cmd to ensure that all inputs used are declared.
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
depfile
bool, Enable reading a file containing dependencies in gcc format after the command completes
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
targets
list of strings, 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).
enabled
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_srcs
list of strings, input files to exclude
export_include_dirs
list of strings, List of directories to export generated headers from
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
out
list of strings, names of the output files that will be generated
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).
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
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool
required
list of strings, names of other modules to install if this module is installed
sdk_version
string
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_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.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
tool_files
list of strings, Local file that is used as the tool
tools
list of strings, name of the modules (if any) that produces the host executable. Leave empty for
prebuilts or scripts that do not need a module to build them.
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
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
cc_library
cc_library creates both static and/or shared libraries for a device and/or
host. By default, a cc_library has a single variant that targets the device.
Specifying `host_supported: true` also creates a library that targets the
host.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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 strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
suffix
string, set suffix of the name of the output
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_library_headers contains a set of c/c++ headers which are imported by
other soong cc modules using the header_libs property. For best practices,
use export_include_dirs property or LOCAL_EXPORT_C_INCLUDE_DIRS for
Make.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
Properties for ABI compatibility checker
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
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.
keep_symbols_and_debug_frame
bool
cc_library_host_shared
cc_library_host_shared creates a shared library that is usable on a host.
name
,
srcs
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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 strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_library_host_static
cc_library_host_static creates a static library that is linkable to a host
binary.
name
,
srcs
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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 strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_library_shared
cc_library_shared creates a shared library for a device and/or host.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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 strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_library_static
cc_library_static creates a static library for a device and/or host binary.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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 strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_object
cc_object runs the compiler without running the linker. It is rarely
necessary, but sometimes used to generate .s files from .c files to use as
input to a cc_genrule module.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_srcs
,
generated_headers
,
generated_sources
,
gnu_extensions
,
header_libs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
installable
,
instruction_set
,
licenses
,
linker_script
,
local_include_dirs
,
logtags
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
notice
,
objs
,
openmp
,
owner
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
renderscript
,
required
,
rtti
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
soc_specific
,
stl
,
system_ext_specific
,
target
,
target.host
,
target.recovery
,
target.vendor
,
target_required
,
use_apex_name_macro
,
vendor
,
vendor_available
,
vintf_fragments
,
visibility
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
apex_available
list of strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, list of module-specific flags that will be used for C and C++ compiles.
Default: [-fno-addrsig]
clang
bool, Deprecated. true is the default, false is invalid.
clang_asflags
list of strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_srcs
list of strings, 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
generated_sources
list of strings, 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++*
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, init.rc files to be installed if this module is installed
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
licenses
list of strings, Names of the licenses that apply to this module.
linker_script
string, if set, the path to a linker script to pass to ld -r when combining multiple object files.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
objs
list of strings, names of other cc_object modules to link into this module using partial linking
openmp
bool, Build and link with OpenMP
owner
string, vendor who owns this module
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
⊕renderscript
include_dirs
list of strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
⊕sanitize
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
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).
stl
string, Select the STL library to use. Possible values are "libc++",
"libc++_static", "libstdc++", or "none". Leave blank to select the
default.
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.host, target.android
⊕target.recovery
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
target_required
list of strings, names of other modules to install on target if this module is installed
use_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
yacc
YaccProperties
cc_prebuilt_binary
cc_prebuilt_binary installs a precompiled executable in srcs property in the
device's directory.
name
,
srcs
,
host_supported
,
device_supported
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
group_static_libs
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefer
,
prefix_symbols
,
product_specific
,
proprietary
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
stl
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, a prebuilt library or binary. Can reference a genrule module that generates an executable file.
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.
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 strings, 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".
Default is ["//apex_available:platform"].
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.
check_elf_files
bool, Check the prebuilt ELF files (e.g. DT_SONAME, DT_NEEDED, resolution of undefined
symbols, etc), default true.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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
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
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
cc_prebuilt_library
cc_prebuilt_library installs a precompiled shared library that are
listed in the srcs property in the device's directory.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefer
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, a prebuilt library or binary. Can reference a genrule module that generates an executable file.
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.
⊕aidl
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 strings, 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".
Default is ["//apex_available:platform"].
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.
check_elf_files
bool, Check the prebuilt ELF files (e.g. DT_SONAME, DT_NEEDED, resolution of undefined
symbols, etc), default true.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
suffix
string, set suffix of the name of the output
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
cc_prebuilt_library_headers is a prebuilt version of cc_library_headers
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefer
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
Properties for ABI compatibility checker
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
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.
keep_symbols_and_debug_frame
bool
cc_prebuilt_library_shared
cc_prebuilt_library_shared installs a precompiled shared library that are
listed in the srcs property in the device's directory.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefer
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, a prebuilt library or binary. Can reference a genrule module that generates an executable file.
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.
⊕aidl
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 strings, 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".
Default is ["//apex_available:platform"].
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.
check_elf_files
bool, Check the prebuilt ELF files (e.g. DT_SONAME, DT_NEEDED, resolution of undefined
symbols, etc), default true.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
suffix
string, set suffix of the name of the output
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
cc_prebuilt_library_static
cc_prebuilt_library_static installs a precompiled static library that are
listed in the srcs property in the device's directory.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefer
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, a prebuilt library or binary. Can reference a genrule module that generates an executable file.
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.
⊕aidl
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 strings, 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".
Default is ["//apex_available:platform"].
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.
check_elf_files
bool, Check the prebuilt ELF files (e.g. DT_SONAME, DT_NEEDED, resolution of undefined
symbols, etc), default true.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
cc_prebuilt_object
name
,
srcs
,
host_supported
,
device_supported
,
apex_available
,
arch
,
bootstrap
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
header_libs
,
host_required
,
init_rc
,
installable
,
licenses
,
linker_script
,
logtags
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
notice
,
objs
,
owner
,
prefer
,
prefix_symbols
,
product_specific
,
proprietary
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
required
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
soc_specific
,
stl
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vendor_available
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings
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.
apex_available
list of strings, 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".
Default is ["//apex_available:platform"].
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.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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 strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool
licenses
list of strings, Names of the licenses that apply to this module.
linker_script
string, if set, the path to a linker script to pass to ld -r when combining multiple object files.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
objs
list of strings, names of other cc_object modules to link into this module using partial linking
owner
string, vendor who owns this module
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
required
list of strings, names of other modules to install if this module is installed
⊕sanitize
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
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).
stl
string, Select the STL library to use. Possible values are "libc++",
"libc++_static", "libstdc++", or "none". Leave blank to select the
default.
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.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
cc_test
cc_test generates a test config file and an executable binary file to test
specific functionality on a device. The executable binary gets an implicit
static_libs dependency on libgtests unless the gtest flag is set to false.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
auto_gen_config
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
data
,
debug
,
defaults
,
device_specific
,
disable_framework
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
gtest
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
isolated
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
no_named_install_directory
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
require_root
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
stl
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
test_config
,
test_config_template
,
test_for
,
test_mainline_modules
,
test_min_api_level
,
test_min_sdk_version
,
test_options
,
test_per_src
,
test_suites
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, list of module-specific flags that will be used for .S compiles
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
data
list of strings, list of files or filegroup modules that provide data that should be installed alongside
the test
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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`.
disable_framework
bool, Add RunCommandTargetPreparer to stop framework before the test and start it after the test.
⊕dist
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
generated_sources
list of strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
gtest
bool, if set, build against the gtest library. Defaults to true.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
isolated
bool, if set, use the isolated gtest runner. Defaults to false.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
no_named_install_directory
bool, Disables the creation of a test-specific directory when used with
relative_install_path. Useful if several tests need to be in the same
directory, but test_per_src doesn't work.
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
require_root
bool, Add RootTargetPreparer to auto generated test config. This guarantees the test to run
with root permission.
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
target_required
list of strings, names of other modules to install on target if this module is installed
test_config
string, the name of the test configuration (for example "AndroidTest.xml") that should be
installed with the module.
test_config_template
string, the name of the test configuration template (for example "AndroidTestTemplate.xml") that
should be installed with the module.
test_for
list of strings, List of APEXes that this module tests. The module has access to
the private part of the listed APEXes even when it is not included in the
APEXes.
test_mainline_modules
list of strings, Add parameterized mainline modules to auto generated test config. The options will be
handled by TradeFed to download and install the specified modules on the device.
test_min_api_level
int64, Add MinApiLevelModuleController to auto generated test config. If the device property of
"ro.product.first_api_level" < Test_min_api_level, then skip this module.
test_min_sdk_version
int64, Add MinApiLevelModuleController to auto generated test config. If the device property of
"ro.build.version.sdk" < Test_min_sdk_version, then skip this module.
test_options
TestOptions, Test options.
test_per_src
bool, Create a separate binary for each source file. Useful when there is
global state that can not be torn down and reset between each test suite.
test_suites
list of strings, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_test_host
cc_test_host compiles a test host binary.
name
,
srcs
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
auto_gen_config
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
data
,
debug
,
defaults
,
device_specific
,
disable_framework
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
gtest
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
isolated
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
no_named_install_directory
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
require_root
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
stl
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
test_config
,
test_config_template
,
test_for
,
test_mainline_modules
,
test_min_api_level
,
test_min_sdk_version
,
test_options
,
test_per_src
,
test_suites
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, list of module-specific flags that will be used for .S compiles
auto_gen_config
bool, Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
doesn't exist next to the Android.bp, this attribute doesn't need to be set to true
explicitly.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
data
list of strings, list of files or filegroup modules that provide data that should be installed alongside
the test
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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`.
disable_framework
bool, Add RunCommandTargetPreparer to stop framework before the test and start it after the test.
⊕dist
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
generated_sources
list of strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
gtest
bool, if set, build against the gtest library. Defaults to true.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
isolated
bool, if set, use the isolated gtest runner. Defaults to false.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
no_named_install_directory
bool, Disables the creation of a test-specific directory when used with
relative_install_path. Useful if several tests need to be in the same
directory, but test_per_src doesn't work.
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
require_root
bool, Add RootTargetPreparer to auto generated test config. This guarantees the test to run
with root permission.
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
target_required
list of strings, names of other modules to install on target if this module is installed
test_config
string, the name of the test configuration (for example "AndroidTest.xml") that should be
installed with the module.
test_config_template
string, the name of the test configuration template (for example "AndroidTestTemplate.xml") that
should be installed with the module.
test_for
list of strings, List of APEXes that this module tests. The module has access to
the private part of the listed APEXes even when it is not included in the
APEXes.
test_mainline_modules
list of strings, Add parameterized mainline modules to auto generated test config. The options will be
handled by TradeFed to download and install the specified modules on the device.
test_min_api_level
int64, Add MinApiLevelModuleController to auto generated test config. If the device property of
"ro.product.first_api_level" < Test_min_api_level, then skip this module.
test_min_sdk_version
int64, Add MinApiLevelModuleController to auto generated test config. If the device property of
"ro.build.version.sdk" < Test_min_sdk_version, then skip this module.
test_options
TestOptions, Test options.
test_per_src
bool, Create a separate binary for each source file. Useful when there is
global state that can not be torn down and reset between each test suite.
test_suites
list of strings, list of compatibility suites (for example "cts", "vts") that the module should be
installed into.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
cc_test_library
cc_test_library creates an archive of files (i.e. .o files) which is later
referenced by another module (such as cc_test, cc_defaults or cc_test_library)
for archiving or linking.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
gtest
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
isolated
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
test_for
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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 strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
gtest
bool, if set, build against the gtest library. Defaults to true.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
isolated
bool, if set, use the isolated gtest runner. Defaults to false.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
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 strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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
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 strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, 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
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
suffix
string, set suffix of the name of the output
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
target_required
list of strings, names of other modules to install on target if this module is installed
test_for
list of strings, List of APEXes that this module tests. The module has access to
the private part of the listed APEXes even when it is not included in the
APEXes.
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
kernel_headers retrieves the list of kernel headers directories from
TARGET_BOARD_KERNEL_HEADERS and TARGET_PRODUCT_KERNEL_HEADERS variables in
a makefile for compilation. See
https://android.googlesource.com/platform/build/+/master/core/config.mk
for more details on them.
name
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
renderscript
,
required
,
rtti
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
Properties for ABI compatibility checker
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
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.
keep_symbols_and_debug_frame
bool
llndk_headers contains a set of c/c++ llndk headers files which are imported
by other soongs cc modules.
name
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
required
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
Properties for ABI compatibility checker
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
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.
keep_symbols_and_debug_frame
bool
llndk_library
llndk_library creates a stub llndk shared library based on the provided
version file. Example:
llndk_library {
name: "libfoo",
symbol_file: "libfoo.map.txt",
export_include_dirs: ["include_vndk"],
}
name
,
arch
,
bootstrap
,
clang
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
export_cflags
,
export_headers_as_system
,
export_include_dirs
,
export_llndk_headers
,
export_preprocessed_headers
,
export_system_include_dirs
,
host_required
,
init_rc
,
installable
,
licenses
,
logtags
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
notice
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
required
,
sdk_variant_only
,
sdk_version
,
soc_specific
,
symbol_file
,
system_ext_specific
,
target
,
target.host
,
target.vendor
,
target_required
,
unversioned
,
vendor
,
vendor_available
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
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.
clang
bool, Deprecated. true is the default, false is invalid.
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
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
targets
list of strings, 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).
enabled
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.
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
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).
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
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
required
list of strings, names of other modules to install if this module is installed
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
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).
symbol_file
string, Relative path to the symbol map.
An example file can be seen here: TODO(danalbert): Make an example.
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.host, target.android
⊕target.vendor
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
target_required
list of strings, names of other modules to install on target if this module is installed
unversioned
bool, Whether the system library uses symbol versions.
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 can be directly depended upon by libs that are installed to /vendor.
When set to false, this module can only be depended on by VNDK libraries, not vendor
libraries. This effectively hides this module from vendors. Default value is true.
Default: true
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
ndk_headers installs the sets of ndk headers defined in the srcs property
to the sysroot base + "usr/include" + to directory + directory component.
ndk_headers requires the license file to be specified. Example:
Given:
sysroot base = "ndk/sysroot"
from = "include/foo"
to = "bar"
header = "include/foo/woodly/doodly.h"
output path = "ndk/sysroot/usr/include/bar/woodly/doodly.h"
name
,
srcs
,
compile_multilib
,
device_specific
,
dist
,
draft
,
enabled
,
exclude_srcs
,
from
,
host_required
,
init_rc
,
license
,
licenses
,
native_bridge_supported
,
notice
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target.host
,
target_required
,
to
,
vendor
,
vintf_fragments
,
visibility
ndk_library
ndk_library creates a stub library that exposes dummy implementation
of functions and variables for use at build time only.
name
,
arch
,
compile_multilib
,
device_specific
,
dist
,
draft
,
enabled
,
first_version
,
host_required
,
init_rc
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
symbol_file
,
system_ext_specific
,
target
,
target.host
,
target_required
,
unversioned_until
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
arch
interface
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
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
targets
list of strings, 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).
draft
bool, True if this API is not yet ready to be shipped in the NDK. It will be
available in the platform for testing, but will be excluded from the
sysroot provided to the NDK proper.
enabled
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.
first_version
string, The first API level a library was available. A library will be generated
for every API level beginning with this one.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
Default: true
notice
string, relative path to a file to include in the list of notices for the device
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).
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
list of strings, names of other modules to install if this module is installed
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).
symbol_file
string, Relative path to the symbol map.
An example file can be seen here: TODO(danalbert): Make an example.
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.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
unversioned_until
string, The first API level that library should have the version script applied.
This defaults to the value of first_version, and should almost never be
used. This is only needed to work around platform bugs like
https://github.com/android-ndk/ndk/issues/265.
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
ndk_prebuilt_object
ndk_prebuilt_object exports a precompiled ndk object file for linking
operations. Soong's module name format is ndk_<NAME>.o.<sdk_version> where
the object is located under
./prebuilts/ndk/current/platforms/android-<sdk_version>/arch-$(HOST_ARCH)/usr/lib/<NAME>.o.
name
,
apex_available
,
arch
,
bootstrap
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
header_libs
,
host_required
,
init_rc
,
installable
,
licenses
,
linker_script
,
logtags
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
notice
,
objs
,
owner
,
prefix_symbols
,
product_specific
,
proprietary
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
required
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vendor_available
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
apex_available
list of strings, 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".
Default is ["//apex_available:platform"].
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.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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 strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool
licenses
list of strings, Names of the licenses that apply to this module.
linker_script
string, if set, the path to a linker script to pass to ld -r when combining multiple object files.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
Default: true
notice
string, relative path to a file to include in the list of notices for the device
objs
list of strings, names of other cc_object modules to link into this module using partial linking
owner
string, vendor who owns this module
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
required
list of strings, names of other modules to install if this module is installed
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
Default: current
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_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.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
ndk_prebuilt_shared_stl
ndk_prebuilt_shared_stl exports a precompiled ndk shared standard template
library (stl) library for linking operation. The soong's module name format
is ndk_<NAME>.so where the library is located under
./prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/$(HOST_ARCH)/<NAME>.so.
name
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
required
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
⊕aidl
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 strings, 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".
Default is ["//apex_available:platform"].
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.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
required
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
Default: minimum
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static_libs
list of strings, 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.
Default: none
⊕strip
none
bool
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
ndk_prebuilt_static_stl
ndk_prebuilt_static_stl exports a precompiled ndk static standard template
library (stl) library for linking operation. The soong's module name format
is ndk_<NAME>.a where the library is located under
./prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/$(HOST_ARCH)/<NAME>.a.
name
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
required
,
runtime_libs
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
stl
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
⊕aidl
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 strings, 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".
Default is ["//apex_available:platform"].
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.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
Default: true
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
required
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
Default: current
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, 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.
Default: none
⊕strip
none
bool
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
preprocessed_ndk_headers preprocesses all the ndk headers listed in the srcs
property by executing the command defined in the preprocessor property.
name
,
srcs
,
compile_multilib
,
device_specific
,
dist
,
draft
,
enabled
,
exclude_srcs
,
host_required
,
init_rc
,
license
,
licenses
,
native_bridge_supported
,
notice
,
owner
,
preprocessor
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target.host
,
target_required
,
to
,
vendor
,
vintf_fragments
,
visibility
toolchain_library is used internally by the build tool to link the specified
static library in src property to the device libraries that are shipped with
gcc.
name
,
src
,
srcs
,
host_supported
,
device_supported
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
asflags
,
bootstrap
,
c_std
,
cflags
,
clang
,
clang_asflags
,
clang_cflags
,
compile_multilib
,
conlyflags
,
cpp_std
,
cppflags
,
debug
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_srcs
,
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
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
generated_headers
,
generated_sources
,
gnu_extensions
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
include_build_directory
,
include_dirs
,
init_rc
,
inject_bssl_hash
,
installable
,
instruction_set
,
ldflags
,
licenses
,
local_include_dirs
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
openmp
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
renderscript
,
repack_objects_to_keep
,
required
,
rtti
,
runtime_libs
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_apex_name_macro
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
,
yacc
name
string, The name of the module. Must be unique across all modules.
src
string, the prebuilt toolchain library, as a path from the top of the source tree
srcs
list of strings, 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".
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.
⊕aidl
include_dirs
list of strings, list of directories that will be added to the aidl include paths.
local_include_dirs
list of strings, 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
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
asflags
list of strings, 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.
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
list of strings, 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 strings, list of module-specific flags that will be used for .S compiles when
compiling with clang
clang_cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles when
compiling with clang
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 strings, 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
list of strings, list of module-specific flags that will be used for C++ compiles
⊕debug, release
cflags
list of strings, list of module-specific flags that will be used for C and C++ compiles in debug or
release builds
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_srcs
list of strings, 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
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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 strings, 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, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
include_build_directory
bool, Add the directory containing the Android.bp file to the list of include
directories. Defaults to true.
include_dirs
list of strings, 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
list of strings, 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.
installable
bool
instruction_set
string, the instruction set architecture to use to compile the C/C++
module.
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
local_include_dirs
list of strings, list of directories relative to the Blueprints file that will
be added to the include path using -I
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
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.
notice
string, relative path to a file to include in the list of notices for the device
openmp
bool, Build and link with OpenMP
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
static
bool, Link statically against the protobuf runtime
type
string, Proto generator type. C++: full or lite. Java: micro, nano, stream, or lite.
plugin
string, Proto plugin to use as the generator. Must be a cc_binary_host module.
include_dirs
list of strings, list of directories that will be added to the protoc include paths.
local_include_dirs
list of strings, 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.
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
⊕renderscript
include_dirs
list of strings, list of directories that will be added to the llvm-rs-cc include paths
flags
list of strings, list of flags that will be passed to llvm-rs-cc
target_api
string, Renderscript API level to target
repack_objects_to_keep
list of strings, Repack the archive with only the selected objects.
required
list of strings, names of other modules to install if this module is installed
rtti
bool, pass -frtti instead of -fno-rtti
runtime_libs
list of strings, 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.
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
Default: current
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, list of modules that should be statically linked into this module.
static_ndk_lib
bool
stem
string, set the name of the output
⊕strip
none
bool
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
srcs
list of strings, list of source files that should only be used in the
recovery variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the recovery variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the recovery
variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
srcs
list of strings, list of source files that should only be used in the
vendor variant of the C/C++ module.
exclude_srcs
list of strings, list of source files that should not be used to
build the vendor variant of the C/C++ module.
cflags
list of strings, List of additional cflags that should be used to build the vendor
variant of the C/C++ module.
suffix
string, set suffix of the name of the output
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_apex_name_macro
bool, Adds __ANDROID_APEX_<APEX_MODULE_NAME>__ macro defined for apex variants in addition to __ANDROID_APEX__
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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
vendor_public_library
vendor_public_library creates a stub shared library for a vendor public
library. This stub library is a build-time only artifact that provides
symbols that are exposed from a vendor public library. Example:
vendor_public_library {
name: "libfoo",
symbol_file: "libfoo.map.txt",
export_public_headers: ["libfoo_headers"],
}
name
,
arch
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
export_cflags
,
export_include_dirs
,
export_public_headers
,
export_system_include_dirs
,
host_required
,
init_rc
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
symbol_file
,
system_ext_specific
,
target
,
target.host
,
target.vendor
,
target_required
,
unversioned
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
arch
interface
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
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
targets
list of strings, 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).
enabled
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.
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
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).
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
list of strings, names of other modules to install if this module is installed
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).
symbol_file
string, Relative path to the symbol map.
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.host, target.android
⊕target.vendor
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
target_required
list of strings, names of other modules to install on target if this module is installed
unversioned
bool, Whether the system library uses symbol versions.
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
vendor_snapshot_binary
name
,
src
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_static_libs
,
export_generated_headers
,
export_header_lib_headers
,
export_shared_lib_headers
,
export_static_lib_headers
,
group_static_libs
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
prefix_symbols
,
product_specific
,
proprietary
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
static_executable
,
static_libs
,
stem
,
strip
,
suffix
,
symlink_preferred_arch
,
symlinks
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_arch
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
src
string, Prebuilt file for each arch.
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 strings, 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".
Default is ["//apex_available:platform"].
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.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
Default: true
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
Default: true
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
pack_relocations
bool, Generate compact dynamic relocation table, default true.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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
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
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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.
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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_executable
bool, compile executable with -static
static_libs
list of strings, list of modules that should be statically linked into this module.
stem
string, set the name of the output
⊕strip
none
bool
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
suffix
string, append to the name of the output
symlink_preferred_arch
bool, if set, install a symlink to the preferred architecture
symlinks
list of strings, install symlinks to the binary. Symlink names will have the suffix and the binary
extension (if any) appended
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 strings, 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.
Default: []
target
interface
⊕target.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
target_arch
string, Target arch name of the snapshot (e.g. 'arm64' for variant 'aosp_arm64_ab')
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
use_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version
string, snapshot version.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
name
,
src
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_static_libs
,
export_cflags
,
export_flags
,
export_generated_headers
,
export_header_lib_headers
,
export_include_dirs
,
export_shared_lib_headers
,
export_static_lib_headers
,
export_system_include_dirs
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sanitize_minimal_dep
,
sanitize_ubsan_dep
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_arch
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
Properties for ABI compatibility checker
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
keep_symbols_and_debug_frame
bool
vendor_snapshot_object
name
,
src
,
host_supported
,
device_supported
,
apex_available
,
arch
,
bootstrap
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
header_libs
,
host_required
,
init_rc
,
installable
,
licenses
,
linker_script
,
logtags
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
notice
,
objs
,
owner
,
prefix_symbols
,
product_specific
,
proprietary
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
required
,
sanitize
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
soc_specific
,
stl
,
system_ext_specific
,
target
,
target.host
,
target_arch
,
target_required
,
vendor
,
vendor_available
,
version
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
src
string, Prebuilt file for each arch.
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.
apex_available
list of strings, 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".
Default is ["//apex_available:platform"].
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.
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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 strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool
licenses
list of strings, Names of the licenses that apply to this module.
linker_script
string, if set, the path to a linker script to pass to ld -r when combining multiple object files.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
objs
list of strings, names of other cc_object modules to link into this module using partial linking
owner
string, vendor who owns this module
prefix_symbols
string, if set, add an extra objcopy --prefix-symbols= step
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).
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
recovery
bool, Whether this module is installed to recovery partition
recovery_available
bool, Make this module available when building for recovery
required
list of strings, names of other modules to install if this module is installed
⊕sanitize
enable AddressSanitizer, ThreadSanitizer, or UndefinedBehaviorSanitizer
never
bool
address
bool, main sanitizers
thread
bool
hwaddress
bool
undefined
bool, local sanitizers
all_undefined
bool
misc_undefined
list of strings
fuzzer
bool
safestack
bool
cfi
bool
integer_overflow
bool
scudo
bool
scs
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.
undefined
bool
cfi
bool
integer_overflow
bool
misc_undefined
list of strings
no_recover
list of strings
recover
list of strings, value to pass to -fsanitize-recover=
blacklist
string, value to pass to -fsanitize-blacklist
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
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).
stl
string, Select the STL library to use. Possible values are "libc++",
"libc++_static", "libstdc++", or "none". Leave blank to select the
default.
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.host, target.android
target_arch
string, Target arch name of the snapshot (e.g. 'arm64' for variant 'aosp_arm64_ab')
target_required
list of strings, names of other modules to install on target if this module is installed
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version
string, snapshot version.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
vendor_snapshot_shared
name
,
src
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_static_libs
,
export_cflags
,
export_flags
,
export_generated_headers
,
export_header_lib_headers
,
export_include_dirs
,
export_shared_lib_headers
,
export_static_lib_headers
,
export_system_include_dirs
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sanitize_minimal_dep
,
sanitize_ubsan_dep
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_arch
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
src
string, Prebuilt file for each arch.
⊕aidl
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 strings, 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".
Default is ["//apex_available:platform"].
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.
check_elf_files
bool, Check the prebuilt ELF files (e.g. DT_SONAME, DT_NEEDED, resolution of undefined symbols,
etc).
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_flags
list of strings, list of flags that will be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
Default: true
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
Default: true
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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_minimal_dep
bool, Whether this prebuilt needs to depend on sanitize minimal runtime or not.
sanitize_ubsan_dep
bool, Whether this prebuilt needs to depend on sanitize ubsan runtime or not.
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static_libs
list of strings, list of modules that should be statically linked into this module.
static_ndk_lib
bool
stem
string, set the name of the output
⊕strip
none
bool
Default: true
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.
Default: []
target
interface
⊕target.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
suffix
string, set suffix of the name of the output
target_arch
string, Target arch name of the snapshot (e.g. 'arm64' for variant 'aosp_arm64')
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version
string, snapshot version.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
vendor_snapshot_static
name
,
src
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_static_libs
,
export_cflags
,
export_flags
,
export_generated_headers
,
export_header_lib_headers
,
export_include_dirs
,
export_shared_lib_headers
,
export_static_lib_headers
,
export_system_include_dirs
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sanitize_minimal_dep
,
sanitize_ubsan_dep
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static
,
static_libs
,
static_ndk_lib
,
stem
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_arch
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
src
string, Prebuilt file for each arch.
⊕aidl
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 strings, 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".
Default is ["//apex_available:platform"].
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.
check_elf_files
bool, Check the prebuilt ELF files (e.g. DT_SONAME, DT_NEEDED, resolution of undefined symbols,
etc).
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_flags
list of strings, list of flags that will be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
Default: true
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
Default: true
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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_minimal_dep
bool, Whether this prebuilt needs to depend on sanitize minimal runtime or not.
sanitize_ubsan_dep
bool, Whether this prebuilt needs to depend on sanitize ubsan runtime or not.
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static
StaticOrSharedProperties
static_libs
list of strings, list of modules that should be statically linked into this module.
static_ndk_lib
bool
stem
string, set the name of the output
⊕strip
none
bool
Default: true
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.
Default: []
target
interface
⊕target.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
suffix
string, set suffix of the name of the output
target_arch
string, Target arch name of the snapshot (e.g. 'arm64' for variant 'aosp_arm64')
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version
string, snapshot version.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.
versioned_ndk_headers preprocesses the headers with the bionic versioner:
https://android.googlesource.com/platform/bionic/+/master/tools/versioner/README.md.
Unlike the ndk_headers soong module, versioned_ndk_headers operates on a
directory level specified in `from` property. This is only used to process
the bionic/libc/include directory.
name
,
compile_multilib
,
device_specific
,
dist
,
draft
,
enabled
,
from
,
host_required
,
init_rc
,
license
,
licenses
,
native_bridge_supported
,
notice
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target.host
,
target_required
,
to
,
vendor
,
vintf_fragments
,
visibility
vndk_libraries_txt
vndk_libraries_txt is a special kind of module type in that it name is one of
- llndk.libraries.txt
- vndkcore.libraries.txt
- vndksp.libraries.txt
- vndkprivate.libraries.txt
- vndkcorevariant.libraries.txt
A module behaves like a prebuilt_etc but its content is generated by soong.
By being a soong module, these files can be referenced by other soong modules.
For example, apex_vndk can depend on these files as prebuilt.
name
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
host_required
,
init_rc
,
licenses
,
native_bridge_supported
,
notice
,
owner
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all 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
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
targets
list of strings, 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).
enabled
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 strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
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).
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
list of strings, names of other modules to install if this module is installed
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_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.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
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.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
vndk_prebuilt_shared
vndk_prebuilt_shared installs Vendor Native Development kit (VNDK) snapshot
shared libraries for system build. Example:
vndk_prebuilt_shared {
name: "libfoo",
version: "27",
target_arch: "arm64",
vendor_available: true,
vndk: {
enabled: true,
},
export_include_dirs: ["include/external/libfoo/vndk_include"],
arch: {
arm64: {
srcs: ["arm/lib64/libfoo.so"],
},
arm: {
srcs: ["arm/lib/libfoo.so"],
},
},
}
name
,
srcs
,
aidl
,
allow_undefined_symbols
,
apex_available
,
arch
,
binder32bit
,
bootstrap
,
check_elf_files
,
clang
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
double_loadable
,
enabled
,
exclude_shared_libs
,
exclude_static_libs
,
export_cflags
,
export_flags
,
export_generated_headers
,
export_header_lib_headers
,
export_include_dirs
,
export_shared_lib_headers
,
export_static_lib_headers
,
export_system_include_dirs
,
force_symbols_not_weak_list
,
force_symbols_weak_list
,
group_static_libs
,
header_abi_checker
,
header_libs
,
host_ldlibs
,
host_required
,
init_rc
,
inject_bssl_hash
,
installable
,
ldflags
,
licenses
,
logtags
,
lto
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_coverage
,
no_libcrt
,
nocrt
,
notice
,
overrides
,
owner
,
pack_relocations
,
pgo
,
product_specific
,
proprietary
,
proto
,
ramdisk
,
ramdisk_available
,
recovery
,
recovery_available
,
relative_install_path
,
required
,
runtime_libs
,
sdk_member_name
,
sdk_variant_only
,
sdk_version
,
shared
,
shared_libs
,
soc_specific
,
sort_bss_symbols_by_size
,
static_libs
,
static_ndk_lib
,
stem
,
strip
,
stubs
,
suffix
,
system_ext_specific
,
system_shared_libs
,
target
,
target.host
,
target.platform
,
target.ramdisk
,
target.recovery
,
target.vendor
,
target_arch
,
target_required
,
tidy
,
tidy_checks
,
tidy_checks_as_errors
,
tidy_flags
,
unexported_symbols_list
,
unique_host_soname
,
use_clang_lld
,
use_version_lib
,
vendor
,
vendor_available
,
version
,
version_script
,
vintf_fragments
,
visibility
,
vndk
,
whole_static_libs
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, Prebuilt files for each arch.
⊕aidl
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 strings, 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".
Default is ["//apex_available:platform"].
arch
interface
binder32bit
bool, If the prebuilt snapshot lib is built with 32 bit binder, this must be set to true.
The lib with 64 bit binder does not need to set this property.
bootstrap
bool, Allows this module to use non-APEX version of libraries. Useful
for building binaries that are started before APEXes are activated.
check_elf_files
bool, Check the prebuilt ELF files (e.g. DT_SONAME, DT_NEEDED, resolution of undefined symbols,
etc).
Default: false
clang
bool, Deprecated. true is the default, false is invalid.
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
defaults
list of strings
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
targets
list of strings, 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).
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.
enabled
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_shared_libs
list of strings, list of shared libs that should not be used to build this module
exclude_static_libs
list of strings, list of static libs that should not be used to build this module
export_cflags
list of strings, list of plain cc flags to be used for any module that links against this module.
export_flags
list of strings, list of flags that will be used for any module that links against this module.
export_include_dirs
list of strings, 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 strings, 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.
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
group_static_libs
bool, group static libraries. This can resolve missing symbols issues with interdependencies
between static libraries, but it is generally better to order them correctly instead.
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 strings, Symbol versions that should be ignored from the symbol file
exclude_symbol_tags
list of strings, Symbol tags that should be ignored from the symbol file
host_ldlibs
list of strings, -l arguments to pass to linker for host-provided shared libraries
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, 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.
installable
bool
ldflags
list of strings, list of module-specific flags that will be used for all link steps
licenses
list of strings, Names of the licenses that apply to this module.
logtags
list of strings, *.logtags files, to combine together in order to generate the /system/etc/event-log-tags
file
⊕lto
Lto must violate capitialization style for acronyms so that it can be
referred to in blueprint files as "lto"
never
bool
full
bool
thin
bool
min_sdk_version
string, Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_coverage
bool
no_libcrt
bool, don't link in libclang_rt.builtins-*.a
Default: true
nocrt
bool, don't link in crt_begin and crt_end. This flag should only be necessary for
compiling crt or libc.
Default: true
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, 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.
⊕pgo
instrumentation
bool
sampling
bool
profile_file
string
benchmarks
list of strings
enable_profile_use
bool
cflags
list of strings, Additional compiler flags to use when building this module
for profiling (either instrumentation or sampling).
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).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
⊕proto
ramdisk
bool, Whether this module is installed to ramdisk
ramdisk_available
bool, Make this module available when building for ramdisk
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
list of strings, names of other modules to install if this module is installed
runtime_libs
list of strings, 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.
sdk_member_name
string, Name of the module that this sdk member is representing
sdk_variant_only
bool, If true, always create an sdk variant and don't create a platform variant.
sdk_version
string, Minimum sdk version supported when compiling against the ndk. Setting this property causes
two variants to be built, one for the platform and one for apps.
shared
StaticOrSharedProperties
shared_libs
list of strings, 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).
sort_bss_symbols_by_size
bool, Order symbols in .bss section by their sizes. Only useful for shared libraries.
static_libs
list of strings, list of modules that should be statically linked into this module.
static_ndk_lib
bool
stem
string, set the name of the output
⊕strip
none
bool
Default: true
all
bool
keep_symbols
bool
keep_symbols_list
list of strings
keep_symbols_and_debug_frame
bool
⊕stubs
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 strings, List versions to generate stubs libs for.
suffix
string, set suffix of the name of the output
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 strings, 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.
Default: []
target
interface
⊕target.host, target.android
⊕target.platform
shared_libs
list of strings, 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.
⊕target.ramdisk
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the ramdisk variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the ramdisk variant of the C/C++ module.
⊕target.recovery
shared_libs
list of strings, list of shared libs that only should be used to build the recovery
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the recovery
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build
the recovery variant of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build
the recovery variant of the C/C++ module.
⊕target.vendor
override_export_include_dirs
list of strings, list of exported include directories, like
export_include_dirs, that will be applied to the
vendor variant of this library. This will overwrite
any other declarations.
shared_libs
list of strings, list of shared libs that only should be used to build the vendor
variant of the C/C++ module.
static_libs
list of strings, list of static libs that only should be used to build the vendor
variant of the C/C++ module.
exclude_shared_libs
list of strings, list of shared libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_static_libs
list of strings, list of static libs that should not be used to build the vendor variant
of the C/C++ module.
exclude_runtime_libs
list of strings, list of runtime libs that should not be installed along with the vendor
variant of the C/C++ module.
version_script
string, version script for this vendor variant
suffix
string, set suffix of the name of the output
target_arch
string, Target arch name of the snapshot (e.g. 'arm64' for variant 'aosp_arm64_ab')
target_required
list of strings, names of other modules to install on target if this module is installed
tidy
bool, whether to run clang-tidy over C-like sources.
tidy_checks
list of strings, Extra checks to enable or disable in clang-tidy
tidy_checks_as_errors
list of strings, Checks that should be treated as errors.
tidy_flags
list of strings, Extra flags to pass to clang-tidy
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_clang_lld
bool, Use clang lld instead of gnu ld.
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`.
In addition, this module should be allowed to be directly depended by
product modules with `product_specific: true`.
If set to true, three variants will be built separately, one like
normal, another limited to the set of libraries and headers
that are exposed to /vendor modules, and the other to /product modules.
The vendor and product variants 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 or /product
modules.
Default value is true when vndk: {enabled: true} or vendor: true.
Nothing happens if BOARD_VNDK_VERSION isn't set in the BoardConfig.mk
If PRODUCT_PRODUCT_VNDK_VERSION isn't set, product variant will not be used.
version
string, VNDK snapshot version.
version_script
string, local file name to pass to the linker as --version_script
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, 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/+/master/README.md#visibility for
more details.
⊕vndk
enabled
bool, declared as a VNDK or VNDK-SP module. The vendor variant
will be installed in /system instead of /vendor partition.
`vendor_available` must be explicitly set to either true or
false together with `vndk: {enabled: true}`.
support_system_process
bool, declared as a VNDK-SP module, which is a subset of VNDK.
`vndk: { enabled: true }` must set together.
All these modules are allowed to link to VNDK-SP or LL-NDK
modules only. Other dependency will cause link-type errors.
If `support_system_process` is not set or set to false,
the module is VNDK-core and can link to other VNDK-core,
VNDK-SP or LL-NDK modules only.
extends
string, Extending another module
whole_static_libs
list of strings, 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.