commit | b6803a5f52cb152869abda9a9b870122d8704e56 | [log] [tgz] |
---|---|---|
author | Vinh Tran <vinhdaitran@google.com> | Wed Dec 14 11:34:54 2022 -0500 |
committer | Vinh Tran <vinhdaitran@google.com> | Wed Dec 14 18:54:47 2022 -0500 |
tree | d3d2c636b61cab2c9d526c7569cd46403aa4f9cf | |
parent | ccfe6022d445b1fecc161c073033ef3e999a3b41 [diff] [blame] |
Add ApexInfo.RequiresLibs to mixed build handler for apex Adding ApexInfo.RequiresLibs from Bazel to apexBundle.requiredDeps which is eventuallyread by apex androidmk writer for LOCAL_REQUIRED_MODULES to ensures the libs are installed as part of a bundle build. In Soong, apexBundle.requiredDeps is set in https://cs.android.com/android/platform/build/soong/+/master:apex/apex.go;l=2305-2323;drc=cb7e73bc0130a95f5991c925c349387185abc098 The same logic is replicated in Bazel at https://cs.android.com/android/platform/build/bazel/+/master:rules/apex/cc.bzl;l=141-163;drc=cb7e73bc0130a95f5991c925c349387185abc098. This CL is porting the required libs set by Bazel in mixed build. Test: go test Test: run build/bazel/ci/mixed_libc.sh Bug: 215500321 Change-Id: Id7256d279ac09a8fd42db391a7e93ce0021d8345
diff --git a/android/bazel_paths.go b/android/bazel_paths.go index b2ea22f..3b159d3 100644 --- a/android/bazel_paths.go +++ b/android/bazel_paths.go
@@ -458,6 +458,11 @@ return fmt.Sprintf("//%s:%s", moduleDir, moduleName) } +// ModuleFromBazelLabel reverses the logic in bp2buildModuleLabel +func ModuleFromBazelLabel(label string) string { + return strings.Split(label, ":")[1] +} + // BazelOutPath is a Bazel output path compatible to be used for mixed builds within Soong/Ninja. type BazelOutPath struct { OutputPath