platform_build_soong/android/Android.bp

88 lines
2.0 KiB
Plaintext
Raw Normal View History

bootstrap_go_package {
name: "soong-android",
pkgPath: "android/soong/android",
deps: [
"blueprint",
"blueprint-bootstrap",
"soong",
"soong-android-soongconfig",
"soong-env",
"soong-shared",
"soong-ui-metrics_proto",
],
srcs: [
"androidmk.go",
"apex.go",
"api_levels.go",
"arch.go",
"bazel_handler.go",
Create a AOSP Bazel overlay workspace with Soong The Bazel overlay is a directory at out/soong/bazel_overlay that replicates the layout of the AOSP Soong module tree, but as a Bazel workspace. Each Soong module variant is represented as a BUILD target created with the `soong_module` rule. To create this overlay, run `m bazel_overlay`. A `soong_module` target can depend on other `soong_module` targets. These dependencies replicate each module's `directDeps` in the Blueprint graph, just before `PrepareBuildActions`. This enables users to use bazel query as a way to introspect the Soong module graph. For example, - Direct reverse dependencies of //bionic/libc:generated_android_ids in //bionic/libc/...: $ bazel query 'rdeps(//bionic/libc/..., //bionic/libc:generated_android_ids, 1)' //bionic/libc:libc_bionic_ndk--android_recovery_arm_armv7-a-neon_static //bionic/libc:libc_bionic_ndk--android_ramdisk_arm_armv7-a-neon_static //bionic/libc:libc_bionic_ndk--android_arm_armv7-a-neon_static_com.android.runtime //bionic/libc:libc_bionic_ndk--android_arm_armv7-a-neon_static //bionic/libc:generated_android_ids - Why does com.android.runtime depend on lzma? $ bazel query 'somepath(//bionic/apex:com.android.runtime--android_common_com.android.runtime_image, //external/lzma/...)' //bionic/apex:com.android.runtime--android_common_com.android.runtime_image //bionic/libc/malloc_debug:libc_malloc_debug--android_arm_armv7-a-neon_shared_com.android.runtime //system/core/libunwindstack:libunwindstack--android_arm_armv7-a-neon_shared_com.android.runtime //external/lzma/C:liblzma--android_arm_armv7-a-neon_shared_com.android.runtime - What does the dep graph of //bionic/libc:crtbegin_so look like? $ bazel query 'deps(//bionic/libc:crtbegin_so--android_arm_armv7-a-neon)' --output=graph > graph.in && dot -Tpng < graph.in > graph.png https://photos.app.goo.gl/DfsdoFRNsRjGwTmy8 Test: croot && m bazel_overlay && cd out/soong/bazel_overlay && bazel query //... && bazel query 'rdeps(//bionic/libc/..., //bionic/libc:generated_android_ids, 1)' Signed-off-by: Jingwen Chen <jingwen@google.com> Change-Id: I3bf40309bfb2d963bb8a688706385a57ee304c37#
2020-07-15 18:06:41 +08:00
"bazel_overlay.go",
"config.go",
"csuite_config.go",
"defaults.go",
"defs.go",
"depset.go",
"expand.go",
"filegroup.go",
"hooks.go",
"image.go",
"makefile_goal.go",
"makevars.go",
"metrics.go",
"module.go",
"mutator.go",
"namespace.go",
"neverallow.go",
"notices.go",
"onceper.go",
"override_module.go",
"package.go",
"package_ctx.go",
"path_properties.go",
"paths.go",
"phony.go",
"prebuilt.go",
"prebuilt_build_tool.go",
"proto.go",
"register.go",
"rule_builder.go",
"sandbox.go",
"sdk.go",
"singleton.go",
"soong_config_modules.go",
"test_suites.go",
"testing.go",
"util.go",
"variable.go",
"visibility.go",
"writedocs.go",
// Lock down environment access last
"env.go",
],
testSrcs: [
"android_test.go",
"androidmk_test.go",
"apex_test.go",
"arch_test.go",
"config_test.go",
"csuite_config_test.go",
"depset_test.go",
"expand_test.go",
"module_test.go",
"mutator_test.go",
"namespace_test.go",
"neverallow_test.go",
"onceper_test.go",
"package_test.go",
"path_properties_test.go",
"paths_test.go",
"prebuilt_test.go",
"rule_builder_test.go",
"soong_config_modules_test.go",
"util_test.go",
"variable_test.go",
"visibility_test.go",
],
}