rust_binary
rust_binary produces a binary that is runnable on a device.
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
prefer_dynamic
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlibs
,
shared_libs
,
soc_specific
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the main source file that contains the program entry point (e.g. src/main.rs)
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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
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
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
prefer_dynamic
bool, passes -C prefer-dynamic to rustc, which tells it to dynamically link the stdlib
(assuming it has no dylib dependencies already)
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlibs
list of strings, list of rust rlib crate dependencies
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_binary_host
name
,
srcs
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
prefer_dynamic
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlibs
,
shared_libs
,
soc_specific
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the main source file that contains the program entry point (e.g. src/main.rs)
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
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
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
prefer_dynamic
bool, passes -C prefer-dynamic to rustc, which tells it to dynamically link the stdlib
(assuming it has no dylib dependencies already)
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlibs
list of strings, list of rust rlib crate dependencies
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_defaults
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
apex_available
,
arch
,
auto_gen_config
,
compile_multilib
,
crate_name
,
defaults
,
defaults_visibility
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
prefer_dynamic
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
test_config
,
test_config_template
,
test_suites
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
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.
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
defaults_visibility
list of strings, Controls the visibility of the defaults module itself.
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
prefer_dynamic
bool, passes -C prefer-dynamic to rustc, which tells it to dynamically link the stdlib
(assuming it has no dylib dependencies already)
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, set name of the procMacro
suffix
string, append to name of 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).
target
interface
⊕target.host, target.android
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.
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.
rust_library
rust_library produces all variants.
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_dylib
rust_library_dylib produces a dylib.
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_host
rust_library_host produces all variants.
name
,
srcs
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_host_dylib
rust_library_dylib_host produces a dylib.
name
,
srcs
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_host_rlib
rust_library_rlib_host produces an rlib.
name
,
srcs
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_host_shared
rust_library_shared_host produces an shared library.
name
,
srcs
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_host_static
rust_library_static_host produces a static library.
name
,
srcs
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_rlib
rust_library_rlib produces an rlib.
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_shared
rust_library_shared produces a shared library.
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_library_static
rust_library_static produces a static library.
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_prebuilt_dylib
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylib
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
include_dirs
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlib
,
rlibs
,
shared
,
shared_libs
,
soc_specific
,
static
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the prebuilt 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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylib
VariantLibraryProperties
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
host_required
list of strings, names of other modules to install on host if this module is installed
include_dirs
list of strings, path to include directories to pass to cc_* modules, only relevant for static/shared variants.
init_rc
list of strings, init.rc files to be installed if this module is installed
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
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
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlib
VariantLibraryProperties
rlibs
list of strings, list of rust rlib crate dependencies
shared
VariantLibraryProperties
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static
VariantLibraryProperties
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_proc_macro
name
,
srcs
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlibs
,
shared_libs
,
soc_specific
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the source file that is the main entry point of the program (e.g. src/lib.rs)
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
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
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
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
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlibs
list of strings, list of rust rlib crate dependencies
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
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.
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.
rust_test
name
,
srcs
,
host_supported
,
device_supported
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
auto_gen_config
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
prefer_dynamic
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlibs
,
shared_libs
,
soc_specific
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
test_config
,
test_config_template
,
test_suites
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the main source file that contains the program entry point (e.g. src/main.rs)
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.
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
arch
interface
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.
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
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
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
prefer_dynamic
bool, passes -C prefer-dynamic to rustc, which tells it to dynamically link the stdlib
(assuming it has no dylib dependencies already)
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlibs
list of strings, list of rust rlib crate dependencies
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
target
interface
⊕target.host, target.android
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.
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.
rust_test_host
name
,
srcs
,
androidMkDylibs
,
androidMkProcMacroLibs
,
androidMkRlibs
,
androidMkSharedLibs
,
androidMkStaticLibs
,
arch
,
auto_gen_config
,
compile_multilib
,
crate_name
,
defaults
,
deny_warnings
,
device_specific
,
dist
,
dylibs
,
edition
,
enabled
,
features
,
flags
,
host_required
,
init_rc
,
ld_flags
,
licenses
,
multilib
,
native_bridge_supported
,
no_stdlibs
,
notice
,
owner
,
prefer_dynamic
,
proc_macros
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
relative_install_path
,
required
,
rlibs
,
shared_libs
,
soc_specific
,
static_libs
,
stem
,
suffix
,
system_ext_specific
,
target
,
target.host
,
target_required
,
test_config
,
test_config_template
,
test_suites
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
srcs
list of strings, path to the main source file that contains the program entry point (e.g. src/main.rs)
androidMkDylibs
list of strings
androidMkProcMacroLibs
list of strings
androidMkRlibs
list of strings
androidMkSharedLibs
list of strings
androidMkStaticLibs
list of strings
arch
interface
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.
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
crate_name
string, crate name, required for libraries. This must be the expected extern crate name used in source
defaults
list of strings
deny_warnings
bool, whether to pass "-D warnings" to rustc. Defaults to true.
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).
dylibs
list of strings, list of rust dylib crate dependencies
edition
string, specific rust edition that should be used if the default version is not desired
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.
features
list of strings, list of features to enable for this crate
flags
list of strings, flags to pass to rustc
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
ld_flags
list of strings, flags to pass to the linker
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)
no_stdlibs
bool, whether to suppress inclusion of standard crates - defaults to false
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
prefer_dynamic
bool, passes -C prefer-dynamic to rustc, which tells it to dynamically link the stdlib
(assuming it has no dylib dependencies already)
proc_macros
list of strings, list of rust proc_macro crate dependencies
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
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
rlibs
list of strings, list of rust rlib crate dependencies
shared_libs
list of strings, list of C shared library dependencies
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
static_libs
list of strings, list of C static library dependencies
stem
string, sets name of the output
suffix
string, append to name of 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).
target
interface
⊕target.host, target.android
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.
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.