5 years agoMerge cherrypicks of [4368877, 4369031, 4369032, 4369033, 4369034, 4368878, 4369035... pie-release android-9.0.0_r1 android-9.0.0_r10 android-9.0.0_r17 android-9.0.0_r18 android-9.0.0_r2 android-9.0.0_r3 android-9.0.0_r5 android-9.0.0_r6 android-9.0.0_r7 android-9.0.0_r8 android-9.0.0_r9 android-cts-9.0_r1 android-cts-9.0_r2 android-cts-9.0_r3 android-cts-9.0_r4 android-cts-9.0_r5 android-cts-9.0_r6 android-cts-9.0_r7 android-cts-9.0_r8 android-vts-9.0_r4 android-vts-9.0_r5 android-vts-9.0_r6 android-vts-9.0_r7 android-vts-9.0_r8 android-vts-9.0_r9 android-wear-9.0.0_r1 android-wear-9.0.0_r2 android-wear-9.0.0_r3 android-wear-9.0.0_r4
Merge cherrypicks of [4368877, 4369031, 4369032, 4369033, 4369034, 4368878, 4369035, 4369036, 4369008] into pi-release
Change-Id: I758bc94b92ca72e194430c56a45615b71a8c39ab
Change-Id: I758bc94b92ca72e194430c56a45615b71a8c39ab
Fix VNDK-Ext ABI check regression
VNDK-Ext are modules with `vndk.enabled: true` but not having
`vendor_available: true`. In addition, VNDK-Ext should be checked by
source ABI checker. This change fixes the regression introduced in
Bug: 110142940
Test: Create libminijail_ext, break some ABIs, and see an error.
Merged-In: I8b47ac12d2e132f641129c9549ed22c3971d6c89
Change-Id: I8b47ac12d2e132f641129c9549ed22c3971d6c89
(cherry picked from commit ef1ff3de9804d8e99df06f0874c974b3f1e85e36)
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 39299e61610198b3d3c511a58ea540471d8e29c2)
VNDK-Ext are modules with `vndk.enabled: true` but not having
`vendor_available: true`. In addition, VNDK-Ext should be checked by
source ABI checker. This change fixes the regression introduced in
Bug: 110142940
Test: Create libminijail_ext, break some ABIs, and see an error.
Merged-In: I8b47ac12d2e132f641129c9549ed22c3971d6c89
Change-Id: I8b47ac12d2e132f641129c9549ed22c3971d6c89
(cherry picked from commit ef1ff3de9804d8e99df06f0874c974b3f1e85e36)
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 39299e61610198b3d3c511a58ea540471d8e29c2)
Snap for 4832339 from 19b1742614570b0debcdd13238917126924d321c to pi-release
Change-Id: Ie8d65ddd251352c57b4e2ee7a151693f218567dc
Change-Id: Ie8d65ddd251352c57b4e2ee7a151693f218567dc
Add kotlin stdlib to javac classpath
Java modules that have .kt sources may also use kotlin stdlib types
in their .java sources.
Bug: 78245848
Test: m checkbuild
Change-Id: I064cb76b8a641ad92d648febaa400bc01549a9c5
Merged-In: I064cb76b8a641ad92d648febaa400bc01549a9c5
(cherry picked from commit 49da2757cd04850b4667504e7e9bd595aad25c94)
Java modules that have .kt sources may also use kotlin stdlib types
in their .java sources.
Bug: 78245848
Test: m checkbuild
Change-Id: I064cb76b8a641ad92d648febaa400bc01549a9c5
Merged-In: I064cb76b8a641ad92d648febaa400bc01549a9c5
(cherry picked from commit 49da2757cd04850b4667504e7e9bd595aad25c94)
Snap for 4810559 from 9ccbba0200cf56cc6b1b09bc45fa2efb1ea9a411 to pi-release
Change-Id: I3881547af30a519049efbb05601ab3a9cb44b43a
Change-Id: I3881547af30a519049efbb05601ab3a9cb44b43a
Disable CFI for vendor variants of all components
The current VNDK ABI snapshot expects that CFI is disabled for
components that either in the include paths (from cfi-common.mk) OR
enabled directly in the makefile/blueprint. However, on non-arm64
architectures, the build system was only disabling CFI for vendor
components in the include paths.
This topic corrects it by (a) removing the include paths check to
disable CFI for vendor variants (this CL), and (b) inheriting the CFI
include paths in all product configs to ensure that when we update the
ABI we're able to move to relying exclusively
on (PRODUCT_)CFI_INCLUDE_PATHS.
Bug: 66301104
Test: ABI matches for all architectures.
Change-Id: I648edf13346b18fd88b623682e8590ed44709e0d
The current VNDK ABI snapshot expects that CFI is disabled for
components that either in the include paths (from cfi-common.mk) OR
enabled directly in the makefile/blueprint. However, on non-arm64
architectures, the build system was only disabling CFI for vendor
components in the include paths.
This topic corrects it by (a) removing the include paths check to
disable CFI for vendor variants (this CL), and (b) inheriting the CFI
include paths in all product configs to ensure that when we update the
ABI we're able to move to relying exclusively
on (PRODUCT_)CFI_INCLUDE_PATHS.
Bug: 66301104
Test: ABI matches for all architectures.
Change-Id: I648edf13346b18fd88b623682e8590ed44709e0d
Snap for 4807121 from 1c54f66bd56d00592b6ce55826411ae6af9e2697 to pi-release
Change-Id: I115236c6d50a30b3e0d20c8631d7198e9fc999cd
Change-Id: I115236c6d50a30b3e0d20c8631d7198e9fc999cd
Restrict CFI_INCLUDE_PATHS to Arm64
This CL restricts CFI_INCLUDE_PATHS and PRODUCT_CFI_INCLUDE_PATHS to
Arm64 only.
Bug: 66301104
Test: x86 targets do not respect the include paths variables
Change-Id: I66ec2fb05435535aaf5d59fdfc7a170a4fdd4f26
This CL restricts CFI_INCLUDE_PATHS and PRODUCT_CFI_INCLUDE_PATHS to
Arm64 only.
Bug: 66301104
Test: x86 targets do not respect the include paths variables
Change-Id: I66ec2fb05435535aaf5d59fdfc7a170a4fdd4f26
Snap for 4801384 from 165e01b744fe42cf700e388f7e0fb874966a6bfc to pi-release
Change-Id: I2d863012b6e1bd554d3c41ed841363c2c02a6a5c
Change-Id: I2d863012b6e1bd554d3c41ed841363c2c02a6a5c
Disable CFI for vendor variants of VNDK libraries
Enabling CFI changes the VNDK ABI from the frozen snapshot, so the
only solution for now is to temporarily disable CFI on all vendor
variants for the sake of compatibility.
Bug: 66301104
Test: ABI is consistent.
Change-Id: Ie7dca41e0f647808b08adede09a30f3c746e6bda
Enabling CFI changes the VNDK ABI from the frozen snapshot, so the
only solution for now is to temporarily disable CFI on all vendor
variants for the sake of compatibility.
Bug: 66301104
Test: ABI is consistent.
Change-Id: Ie7dca41e0f647808b08adede09a30f3c746e6bda
Merge "Allow abi diffs sanitized variants of vndk libraries on production devices." into pi-dev
Snap for 4796401 from 683444e40f552f7b1d71ed777c7c58a769c2ec72 to pi-release
Change-Id: Ie408d788bd43d8224481dec4d8aa9d4561c2c48d
Change-Id: Ie408d788bd43d8224481dec4d8aa9d4561c2c48d
Merge "Add bpf module type" into pi-dev
Snap for 4793185 from 3e2f0ff226fb4d3874139a8a8b5a06268e72c854 to pi-release
Change-Id: I063d9f056e434235c7f1e3c57317f046501e6051
Change-Id: I063d9f056e434235c7f1e3c57317f046501e6051
Add bpf module type
Add a module type for compiling .c to .o using clang --target=bpf.
Bug: 72981744
Test: m
Change-Id: Ie5712bfabe34901a84ed33737053306ca56ebeb4
Merged-In: Ie5712bfabe34901a84ed33737053306ca56ebeb4
(cherry picked from commit 3ba736a7e162a913973baab7861bf62071f60428)
Add a module type for compiling .c to .o using clang --target=bpf.
Bug: 72981744
Test: m
Change-Id: Ie5712bfabe34901a84ed33737053306ca56ebeb4
Merged-In: Ie5712bfabe34901a84ed33737053306ca56ebeb4
(cherry picked from commit 3ba736a7e162a913973baab7861bf62071f60428)
Temporarily remove -check-all-apis from header-abi-diff invocation.
-check-all-apis currently, produces noise for some libraries
(eg:libstagefright_soft_vpxenc), so remove this till a good solution
arrives.
Bug: 79928919
Test: create abi reference for libstagefright_soft_vpxenc; m -j
libstagefright_soft_vpxenc.vendor; no warnings about struct LAYER_CONTEXT
layout changing.
Merged-In: I8f30700c1b619c72504ca9aef69075f6e334ba5f
Change-Id: I8f30700c1b619c72504ca9aef69075f6e334ba5f
(cherry picked from commit 39d167aa2c9af9cbb31e212fd6da8292f5e801ad)
-check-all-apis currently, produces noise for some libraries
(eg:libstagefright_soft_vpxenc), so remove this till a good solution
arrives.
Bug: 79928919
Test: create abi reference for libstagefright_soft_vpxenc; m -j
libstagefright_soft_vpxenc.vendor; no warnings about struct LAYER_CONTEXT
layout changing.
Merged-In: I8f30700c1b619c72504ca9aef69075f6e334ba5f
Change-Id: I8f30700c1b619c72504ca9aef69075f6e334ba5f
(cherry picked from commit 39d167aa2c9af9cbb31e212fd6da8292f5e801ad)
Snap for 4787078 from 61e3d778e010c69a5c0735ab2bb363dcf12fc5d1 to pi-release
Change-Id: I40e57431340e39f217e48ef0c6fb829c55eef7c2
Change-Id: I40e57431340e39f217e48ef0c6fb829c55eef7c2
Merge "Delete product in installClean" into pi-dev
Don't export UBSan minimal runtime symbols.
When linking in the UBSan minimal runtime, don't export the symbols.
This was resulting in an edge case where symbols were sometimes
undefined at runtime on address sanitized builds if static library
dependencies were integer overflow sanitized.
Bug: 78766744
Test: readelf on libraries show either inclusion of the shared library
or no undefined symbols related to the minimal runtime.
Change-Id: Ide85c8c6b53b400ce9166ccaf96d250797fe4b24
Merged-In: Ide85c8c6b53b400ce9166ccaf96d250797fe4b24
(cherry picked from commit 59fdea2ac2ded9190eaa9ce81252cd809a2985cb)
When linking in the UBSan minimal runtime, don't export the symbols.
This was resulting in an edge case where symbols were sometimes
undefined at runtime on address sanitized builds if static library
dependencies were integer overflow sanitized.
Bug: 78766744
Test: readelf on libraries show either inclusion of the shared library
or no undefined symbols related to the minimal runtime.
Change-Id: Ide85c8c6b53b400ce9166ccaf96d250797fe4b24
Merged-In: Ide85c8c6b53b400ce9166ccaf96d250797fe4b24
(cherry picked from commit 59fdea2ac2ded9190eaa9ce81252cd809a2985cb)
Snap for 4784261 from 79dff70b468b683fc23fb2e61107a9f69288fee4 to pi-release
Change-Id: I79bff8a73bf00f2d452c349f3e2aada915eef67c
Change-Id: I79bff8a73bf00f2d452c349f3e2aada915eef67c
Delete product in installClean
Bug: 79780604
Test: succeeded building and tested with taimen
Change-Id: I11c4ecb839a28d852e0d5faf762afda33166ad48
Merged-In: I11c4ecb839a28d852e0d5faf762afda33166ad48
(cherry picked from commit f6307ccae16bb86fe1cdb417b0cbacbe3b3c6cda)
Bug: 79780604
Test: succeeded building and tested with taimen
Change-Id: I11c4ecb839a28d852e0d5faf762afda33166ad48
Merged-In: I11c4ecb839a28d852e0d5faf762afda33166ad48
(cherry picked from commit f6307ccae16bb86fe1cdb417b0cbacbe3b3c6cda)
Remove cortex-a53 linker workaround for new cpus.
Bug: 78133793
Test: Built target with cortex-a53 and verified that the flag is still
Test: there.
Test: Build target with cortex-a55/cortex-a75 and verified that the flag
Test: is not there.
Test: Built and booted on a taimen, ran bionic unit tests.
Change-Id: Ibd7f497ecf46e5781cd0265463b0782babdf062a
Bug: 78133793
Test: Built target with cortex-a53 and verified that the flag is still
Test: there.
Test: Build target with cortex-a55/cortex-a75 and verified that the flag
Test: is not there.
Test: Built and booted on a taimen, ran bionic unit tests.
Change-Id: Ibd7f497ecf46e5781cd0265463b0782babdf062a
Allow abi diffs sanitized variants of vndk libraries on production devices.
Previously abi diffs were allowed only on unsanitized variants of vndk
libraries. This CL allows them on all sanitized variants which go onto
production devices, eg: cfi variants.
Bug: 66301104
Test: Without this change, for arm64 libstagefright_foundation doesn't
get an lsdump file since we don't build an unsanitized variant
(aosp_arm64_ab).
Test: With this change, for arm64 libstagefright_foundation does
get an lsdump file (aosp_arm64_ab)
Merged-In: I94f82fd84fc898e4980c3f3619df9677ed723c32
Change-Id: I94f82fd84fc898e4980c3f3619df9677ed723c32
(cherry picked from commit b7e08ca83000f14653ffdd0bc4195067bb902dfc)
Previously abi diffs were allowed only on unsanitized variants of vndk
libraries. This CL allows them on all sanitized variants which go onto
production devices, eg: cfi variants.
Bug: 66301104
Test: Without this change, for arm64 libstagefright_foundation doesn't
get an lsdump file since we don't build an unsanitized variant
(aosp_arm64_ab).
Test: With this change, for arm64 libstagefright_foundation does
get an lsdump file (aosp_arm64_ab)
Merged-In: I94f82fd84fc898e4980c3f3619df9677ed723c32
Change-Id: I94f82fd84fc898e4980c3f3619df9677ed723c32
(cherry picked from commit b7e08ca83000f14653ffdd0bc4195067bb902dfc)
Snap for 4778776 from 01dd3fb5043b1af6913292bd237d1ba08f57e623 to pi-release
Change-Id: I7125d2c929c881c5d3e0d7436ba32a1c5e5e4bb6
Change-Id: I7125d2c929c881c5d3e0d7436ba32a1c5e5e4bb6
Add support for cortex-a55/cortex-a75.
Bug: 78133793
Test: Builds when using cortex-a75 as a target.
Change-Id: Ie3fbe40b15f4d89eeba0d630a82097122fc83b33
(cherry picked from commit 0612597a41ca425150ef33900df8239b304bf654)
Bug: 78133793
Test: Builds when using cortex-a75 as a target.
Change-Id: Ie3fbe40b15f4d89eeba0d630a82097122fc83b33
(cherry picked from commit 0612597a41ca425150ef33900df8239b304bf654)
Merge cherrypicks of [4042485, 4043619, 4043655, 4042338] into pi-release
Change-Id: I5e82828d9307553d00f24a3223bba5ec3ed298e0
Change-Id: I5e82828d9307553d00f24a3223bba5ec3ed298e0
Don't install modules in unexported namespaces
Make builds handle modules with duplicate names in different
namespaces by passing a list of exported namespaces to Soong.
Soong-only builds can try to install both modules, leading to
a duplicate rule error. Re-use the same list of exported
namespaces in Soong, which will be empty in all existing
Soong-only builds. This will effectively only install modules
in the root namespace in Soong-only builds.
Test: m checkbuild
Bug: 79369665
Change-Id: Ie80d4b77e1dce165a33579fcf58b571989794b35
(cherry picked from commit 3607f21303837dcc5ec1da66fa1bc8ffc680de61)
Make builds handle modules with duplicate names in different
namespaces by passing a list of exported namespaces to Soong.
Soong-only builds can try to install both modules, leading to
a duplicate rule error. Re-use the same list of exported
namespaces in Soong, which will be empty in all existing
Soong-only builds. This will effectively only install modules
in the root namespace in Soong-only builds.
Test: m checkbuild
Bug: 79369665
Change-Id: Ie80d4b77e1dce165a33579fcf58b571989794b35
(cherry picked from commit 3607f21303837dcc5ec1da66fa1bc8ffc680de61)
Snap for 4773106 from b691e24d899f3a773da88df0eecada5918a96a2c to pi-release
Change-Id: I508cd5fa3e117ca9d90e5c0ac604b7e416855758
Change-Id: I508cd5fa3e117ca9d90e5c0ac604b7e416855758
Pass platform version name as --version-name for framework-res.apk
framework-res.apk should get the platform version name ("9") as
--version-name, not the SDK version ("28"). It will get copied
to compileSdkVersionCodename in APKs compiled against it.
Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version
Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
framework-res.apk should get the platform version name ("9") as
--version-name, not the SDK version ("28"). It will get copied
to compileSdkVersionCodename in APKs compiled against it.
Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version
Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
Snap for 4767765 from 8fe13b971fe3ceff9e1fcbb9089e417dbeb17366 to pi-release
Change-Id: I4de1b778101ccff8f7cfb7ab3725b7c590328798
Change-Id: I4de1b778101ccff8f7cfb7ab3725b7c590328798
Fix androidmk converting cc libraries
The java library rewrites should only happen for java modules, not cc
modules.
Bug: 79272000
Test: Ran androidmk on a number of Android.mk files
Change-Id: Ife2cfb5a69d7db37216671f08317033b99fcd3a1
Merged-In: Ife2cfb5a69d7db37216671f08317033b99fcd3a1
(cherry picked from commit 75dec2291b73995ca4d4ddb1b828dfce7f959043)
The java library rewrites should only happen for java modules, not cc
modules.
Bug: 79272000
Test: Ran androidmk on a number of Android.mk files
Change-Id: Ife2cfb5a69d7db37216671f08317033b99fcd3a1
Merged-In: Ife2cfb5a69d7db37216671f08317033b99fcd3a1
(cherry picked from commit 75dec2291b73995ca4d4ddb1b828dfce7f959043)
Snap for 4765094 from 7f9b6fbeece0867c8f027fb5cafafab25cc4f5c6 to pi-release
Change-Id: I309dd62ddbb35e39810f36e4545a7eee6d384daa
Change-Id: I309dd62ddbb35e39810f36e4545a7eee6d384daa
Export lists of support libraries modules to Make
Make will use the list to sort support libraries into
LOCAL_STATIC_ANDROID_LIBRARIES and LOCAL_STATIC_JAVA_LIBRARIES
as appropriate.
Bug: 78300023
Test: m checkbuild
Change-Id: I58582b124f2b6a9b124683ddf8f5d77314f2e941
Merged-In: I58582b124f2b6a9b124683ddf8f5d77314f2e941
(cherry picked from commit ff8ab0745f59c9c1ec3268051e24956ba8647849)
Make will use the list to sort support libraries into
LOCAL_STATIC_ANDROID_LIBRARIES and LOCAL_STATIC_JAVA_LIBRARIES
as appropriate.
Bug: 78300023
Test: m checkbuild
Change-Id: I58582b124f2b6a9b124683ddf8f5d77314f2e941
Merged-In: I58582b124f2b6a9b124683ddf8f5d77314f2e941
(cherry picked from commit ff8ab0745f59c9c1ec3268051e24956ba8647849)
Regenerate R.java files from LOCAL_STATIC_ANDROID_LIBRARIES
If a static android library lib1 has static_libs: ["lib2"] then the
R.class files for packages in lib2 will be merged into the jar for
lib1. If an app has lib1 in its static_libs it will get the R.class
files from lib2 through lib1, instead of regenerating the R.java
files with numbering that matches the resource table of the app.
Pass transtive static android library dependencies on the aapt2
command line so that aapt2 will always regenerate the R.java
constants for those packages.
Also extract the packages that have R.java files after each aapt2
invocation. This is not necessary for Soong, but is passed to
make to let it force regenerating the packages using
--extra-packages.
Bug: 78300023
Test: m checkbuild
Change-Id: I0f3444af44d2a9f370d1f156c908972f8cc3a1ee
Merged-In: I0f3444af44d2a9f370d1f156c908972f8cc3a1ee
(cherry picked from commit 66f78820e12138dcc9acf1b3c6bd6d26f3340f93)
If a static android library lib1 has static_libs: ["lib2"] then the
R.class files for packages in lib2 will be merged into the jar for
lib1. If an app has lib1 in its static_libs it will get the R.class
files from lib2 through lib1, instead of regenerating the R.java
files with numbering that matches the resource table of the app.
Pass transtive static android library dependencies on the aapt2
command line so that aapt2 will always regenerate the R.java
constants for those packages.
Also extract the packages that have R.java files after each aapt2
invocation. This is not necessary for Soong, but is passed to
make to let it force regenerating the packages using
--extra-packages.
Bug: 78300023
Test: m checkbuild
Change-Id: I0f3444af44d2a9f370d1f156c908972f8cc3a1ee
Merged-In: I0f3444af44d2a9f370d1f156c908972f8cc3a1ee
(cherry picked from commit 66f78820e12138dcc9acf1b3c6bd6d26f3340f93)
Use and export proguard flags from static dependencies
Export proguard flags from Android library modules, and use them
from static dependencies in Android apps when running proguard.
Also export them to Make.
Unlike Make, which concatentates all the exported flags from
dependencies, Soong dedups exported flags files.
Bug: 73724997
Test: m checkbuild
Change-Id: I8f86fecb09cbc591832ce67e8ecef551a6600349
Merged-In: I8f86fecb09cbc591832ce67e8ecef551a6600349
(cherry picked from commit 89c31581a52e4534e1a726f49d700250d676e1a2)
Export proguard flags from Android library modules, and use them
from static dependencies in Android apps when running proguard.
Also export them to Make.
Unlike Make, which concatentates all the exported flags from
dependencies, Soong dedups exported flags files.
Bug: 73724997
Test: m checkbuild
Change-Id: I8f86fecb09cbc591832ce67e8ecef551a6600349
Merged-In: I8f86fecb09cbc591832ce67e8ecef551a6600349
(cherry picked from commit 89c31581a52e4534e1a726f49d700250d676e1a2)
Add pom2bp
Convert pom2mk to pom2bp that writes out Android.bp files instead
of Android.mk files. pom2mk stays for now until the last users
of it are cleaned up.
Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2bp -regen Android.mk
Change-Id: I584d63c4228bad32f9e1914b06bde807078d6a55
Merged-In: I584d63c4228bad32f9e1914b06bde807078d6a55
(cherry picked from commit 70dd38f09e830d98f6b9a8e161991b211e3a760e)
Convert pom2mk to pom2bp that writes out Android.bp files instead
of Android.mk files. pom2mk stays for now until the last users
of it are cleaned up.
Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2bp -regen Android.mk
Change-Id: I584d63c4228bad32f9e1914b06bde807078d6a55
Merged-In: I584d63c4228bad32f9e1914b06bde807078d6a55
(cherry picked from commit 70dd38f09e830d98f6b9a8e161991b211e3a760e)
Remove product-specific flags from android_library modules
Static android libraries should not get the product-specific
flags.
Bug: 73724997
Test: m checkbuild
Change-Id: I89e8c0a3fb788b18ee6603e9d21c9b9a5275f42f
Merged-In: I89e8c0a3fb788b18ee6603e9d21c9b9a5275f42f
(cherry picked from commit e78dcd313c0a4e0a1e8c32b26fdc62bd6de93da2)
Static android libraries should not get the product-specific
flags.
Bug: 73724997
Test: m checkbuild
Change-Id: I89e8c0a3fb788b18ee6603e9d21c9b9a5275f42f
Merged-In: I89e8c0a3fb788b18ee6603e9d21c9b9a5275f42f
(cherry picked from commit e78dcd313c0a4e0a1e8c32b26fdc62bd6de93da2)
Add support for android_library modules
Add support for compiling android_library modules into AARs,
and refactor app support on top of it.
Bug: 73724997
Test: app_test.go
Change-Id: I1dfac5fffe577c6680bc4709147b2061eb7d819c
Merged-In: I1dfac5fffe577c6680bc4709147b2061eb7d819c
(cherry picked from commit a97c5d3f08c1df08c73cee4808feb3c1e015bdc8)
Add support for compiling android_library modules into AARs,
and refactor app support on top of it.
Bug: 73724997
Test: app_test.go
Change-Id: I1dfac5fffe577c6680bc4709147b2061eb7d819c
Merged-In: I1dfac5fffe577c6680bc4709147b2061eb7d819c
(cherry picked from commit a97c5d3f08c1df08c73cee4808feb3c1e015bdc8)
Fix androidmk_test.go import ordering
Bug: 73724997
Test: m checkbuild
Change-Id: I9fb94f22a157ffb9369eea071a867289c37cf026
Merged-In: I9fb94f22a157ffb9369eea071a867289c37cf026
(cherry picked from commit fdb084029fbca9cc1e4d449ee4957b171e6d4750)
Bug: 73724997
Test: m checkbuild
Change-Id: I9fb94f22a157ffb9369eea071a867289c37cf026
Merged-In: I9fb94f22a157ffb9369eea071a867289c37cf026
(cherry picked from commit fdb084029fbca9cc1e4d449ee4957b171e6d4750)
Add more androidmk translations for android libraries
Add support for translating LOCAL_MANIFEST_FILE, LOCAL_RESOURCE_DIR
LOCAL_SHARED_ANDROID_LIBRARIES, and LOCAL_STATIC_ANDROID_LIBRARIES.
Use the presence of non-empty LOCAL_RESOURCE_DIR,
LOCAL_SHARED_ANDROID_LIBRARIES or LOCAL_STATIC_ANDROID_LIBRARIES
to convert a java_library_static into an android_library module,
and then squash LOCAL_SHARED_ANDROID_LIBRARIES into
LOCAL_SHARED_LIBRARIES and LOCAL_STATIC_ANDROID_LIBRARIES into
LOCAL_STATIC_LIBRARIES.
Bug: 73724997
Test: androidmk_test.go
Change-Id: I3ad2a3561f69ebd097eca97cb170754d64e06123
Merged-In: I3ad2a3561f69ebd097eca97cb170754d64e06123
(cherry picked from commit 2dee86d69cf51b38e8b0afac2e8b47ab77380fac)
Add support for translating LOCAL_MANIFEST_FILE, LOCAL_RESOURCE_DIR
LOCAL_SHARED_ANDROID_LIBRARIES, and LOCAL_STATIC_ANDROID_LIBRARIES.
Use the presence of non-empty LOCAL_RESOURCE_DIR,
LOCAL_SHARED_ANDROID_LIBRARIES or LOCAL_STATIC_ANDROID_LIBRARIES
to convert a java_library_static into an android_library module,
and then squash LOCAL_SHARED_ANDROID_LIBRARIES into
LOCAL_SHARED_LIBRARIES and LOCAL_STATIC_ANDROID_LIBRARIES into
LOCAL_STATIC_LIBRARIES.
Bug: 73724997
Test: androidmk_test.go
Change-Id: I3ad2a3561f69ebd097eca97cb170754d64e06123
Merged-In: I3ad2a3561f69ebd097eca97cb170754d64e06123
(cherry picked from commit 2dee86d69cf51b38e8b0afac2e8b47ab77380fac)
Merge matching properties in bpfix
androidmk will start to generate multiple static_libs: properties
in a single module, add a pass in bpfix to fix them up into a
single property.
Bug: 73724997
Test: bpfix_test.go
Change-Id: I30955b6efbb767c02ba77f2f18d44951ef094bad
Merged-In: I30955b6efbb767c02ba77f2f18d44951ef094bad
(cherry picked from commit 9c55d237f6b72896209344aee18a1702c2f9ac3e)
androidmk will start to generate multiple static_libs: properties
in a single module, add a pass in bpfix to fix them up into a
single property.
Bug: 73724997
Test: bpfix_test.go
Change-Id: I30955b6efbb767c02ba77f2f18d44951ef094bad
Merged-In: I30955b6efbb767c02ba77f2f18d44951ef094bad
(cherry picked from commit 9c55d237f6b72896209344aee18a1702c2f9ac3e)
Make bpfix not modify the input tree
Make a new object called Fixer to hold the state of the tree, and
make a copy of the input tree so the original doesn't get modified.
Bug: 73724997
Test: bpfix_test.go
Change-Id: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63
Merged-In: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63
(cherry picked from commit adee968a4bace28bd26253bc436043eb513f6117)
Make a new object called Fixer to hold the state of the tree, and
make a copy of the input tree so the original doesn't get modified.
Bug: 73724997
Test: bpfix_test.go
Change-Id: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63
Merged-In: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63
(cherry picked from commit adee968a4bace28bd26253bc436043eb513f6117)
Fix format string issues
Fix issues caught by go vet.
Bug: 73724997
Test: m checkbuild
Change-Id: Ib8d740457c15432dabe1575a6707726ddaf93084
Merged-In: Ib8d740457c15432dabe1575a6707726ddaf93084
(cherry picked from commit f46e37f5f79bd7111aed84f6cf172f20431ec010)
Fix issues caught by go vet.
Bug: 73724997
Test: m checkbuild
Change-Id: Ib8d740457c15432dabe1575a6707726ddaf93084
Merged-In: Ib8d740457c15432dabe1575a6707726ddaf93084
(cherry picked from commit f46e37f5f79bd7111aed84f6cf172f20431ec010)
Snap for 4751833 from 8a32a05989ab6c6a675ae8e0d05104c398e774a4 to pi-release
Change-Id: I6c1b60af68fe510609fc200759beec817645d97f
Change-Id: I6c1b60af68fe510609fc200759beec817645d97f
Add pom2mk -exclude
Add an option to pom2mk to exclude modules by name.
Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk -exclude androidx.car_car
Change-Id: I083907ef364384aace524ced81820567f5075d76
Merged-In: I083907ef364384aace524ced81820567f5075d76
(manually cherry-picked from c7453caf2c0a94192d0f722f26e9552da953ef8f)
Add an option to pom2mk to exclude modules by name.
Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk -exclude androidx.car_car
Change-Id: I083907ef364384aace524ced81820567f5075d76
Merged-In: I083907ef364384aace524ced81820567f5075d76
(manually cherry-picked from c7453caf2c0a94192d0f722f26e9552da953ef8f)
Add pom2mk -regen
pom2mk -regen Android.mk will read the previous arguments out of
Android.mk, rerun pom2mk with those arguments, and write the result
to Android.mk.
Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk
Change-Id: Ie8e0f97ae5b87c8078cf8e753489326d80da1896
Merged-In: Ie8e0f97ae5b87c8078cf8e753489326d80da1896
(manually cherry-picked from 6b359adc1e2bf1726567000d97e412fea6e88b95)
pom2mk -regen Android.mk will read the previous arguments out of
Android.mk, rerun pom2mk with those arguments, and write the result
to Android.mk.
Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk
Change-Id: Ie8e0f97ae5b87c8078cf8e753489326d80da1896
Merged-In: Ie8e0f97ae5b87c8078cf8e753489326d80da1896
(manually cherry-picked from 6b359adc1e2bf1726567000d97e412fea6e88b95)
Snap for 4745538 from e6c053388b5d7f84da09557bf6529b839eda0c77 to pi-release
Change-Id: I910ce2b33fac4fffeac04122cf6e9d4434a5365b
Change-Id: I910ce2b33fac4fffeac04122cf6e9d4434a5365b
Don't use AppsDefaultVersionName for framework-res.apk
Some builds set AppsDefaultVersionName() to include the build
number ("P-123456"). aapt2 copies the version name of
framework-res into app manifests as compileSdkVersionCodename,
which confuses things if it contains the build number. Use the
DefaultAppTargetSdk ("P") instead.
Bug: 78324052
Test: m TARGET_BUILD_WITH_APPS_VERSION_NAME=true Dialer
aapt dump badging $OUT/system/priv-app/Dialer/Dialer.apk | grep compile
shows compileSdkVersionCodename=P
Change-Id: If67f40aae1066d4ff3bf97da1b2de2e1e250ad9c
Merged-In: If67f40aae1066d4ff3bf97da1b2de2e1e250ad9c
(cherry-picked from commit 402d5e091996abe6e69b5055150ab5438fc664ef)
Some builds set AppsDefaultVersionName() to include the build
number ("P-123456"). aapt2 copies the version name of
framework-res into app manifests as compileSdkVersionCodename,
which confuses things if it contains the build number. Use the
DefaultAppTargetSdk ("P") instead.
Bug: 78324052
Test: m TARGET_BUILD_WITH_APPS_VERSION_NAME=true Dialer
aapt dump badging $OUT/system/priv-app/Dialer/Dialer.apk | grep compile
shows compileSdkVersionCodename=P
Change-Id: If67f40aae1066d4ff3bf97da1b2de2e1e250ad9c
Merged-In: If67f40aae1066d4ff3bf97da1b2de2e1e250ad9c
(cherry-picked from commit 402d5e091996abe6e69b5055150ab5438fc664ef)
Snap for 4739962 from 2cc7d9fc783eabbf9ba4bf939a8cdf8569a59254 to pi-release
Change-Id: I137fb360d77f235fe68a43c2a2692a6e66e27469
Change-Id: I137fb360d77f235fe68a43c2a2692a6e66e27469
pom2mk to include extra-deps as top-level deps too
Specifically, the use case is android-support-car requires some stubs that don't have a Maven pom.
So those stubs can't easily be listed as a dependency in the pom.
However, we do want the dependency to exist when importing to Make and detected by extract_deps.py
Bug: 76692459
Test: m -j blueprint_tools \
&& update_prebuilts.py -s <build_id> \
&& git diff HEAD^ -- fix_dependencies.mk \
&& m -j checkbuild
Change-Id: If546ecf7416580a01bde7b906976ada4b1145253
Merged-In: If546ecf7416580a01bde7b906976ada4b1145253
(manually cherry-picked from commit 358f25e97d5ffaa0d90dd57002c18ecc6bf7094d)
Specifically, the use case is android-support-car requires some stubs that don't have a Maven pom.
So those stubs can't easily be listed as a dependency in the pom.
However, we do want the dependency to exist when importing to Make and detected by extract_deps.py
Bug: 76692459
Test: m -j blueprint_tools \
&& update_prebuilts.py -s <build_id> \
&& git diff HEAD^ -- fix_dependencies.mk \
&& m -j checkbuild
Change-Id: If546ecf7416580a01bde7b906976ada4b1145253
Merged-In: If546ecf7416580a01bde7b906976ada4b1145253
(manually cherry-picked from commit 358f25e97d5ffaa0d90dd57002c18ecc6bf7094d)
Merge "Have pom2mk list all duplicates modules" into pi-dev
Merge "Have pom2mk include runtime deps too" into pi-dev
Snap for 4731145 from 74d547d13c7fd167e78fa059d1eec9a4e5dadea0 to pi-release
Change-Id: I0ecaf6f232896a9d3eba9e261b0e3c454fb548da
Change-Id: I0ecaf6f232896a9d3eba9e261b0e3c454fb548da
Merge "Reverse RRO dir paths when passing to Make" into pi-dev
Merge "Fix aapt2 --min-sdk-version after finalized SDK" into pi-dev
Reverse RRO dir paths when passing to Make
LOCAL_RESOURCE_DIRS puts the highest priority overlay first, but
aapt2 expects the highest priority overlay last. Soong stores the
list in aapt2 order (low to high priority), but that means when it
exports to Make as LOCAL_SOONG_RRO_DIRS, which goes to
build_rro_package.mk and then package_internal.mk, it gets reversed
again and comes out backwards.
Bug: 78032566
Test: m checkbuild
Change-Id: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
Merged-In: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
(cherry picked from commit a140bb05f1eeafe046574454debd190c32e09888)
LOCAL_RESOURCE_DIRS puts the highest priority overlay first, but
aapt2 expects the highest priority overlay last. Soong stores the
list in aapt2 order (low to high priority), but that means when it
exports to Make as LOCAL_SOONG_RRO_DIRS, which goes to
build_rro_package.mk and then package_internal.mk, it gets reversed
again and comes out backwards.
Bug: 78032566
Test: m checkbuild
Change-Id: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
Merged-In: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
(cherry picked from commit a140bb05f1eeafe046574454debd190c32e09888)
Fix aapt2 --min-sdk-version after finalized SDK
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
Add PlatformSdkCodename() for non-finalized SDKs, use it for
DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.
Bug: 78224641
Test: TestAppSdkVersion in app_test.go
Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
Merged-In: I622eaf92f8a940f79007c2a579536da325700b06
(cherry picked from commit d09b0b653b615c322266fa2a41ecf0f0066bc93d)
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
Add PlatformSdkCodename() for non-finalized SDKs, use it for
DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.
Bug: 78224641
Test: TestAppSdkVersion in app_test.go
Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
Merged-In: I622eaf92f8a940f79007c2a579536da325700b06
(cherry picked from commit d09b0b653b615c322266fa2a41ecf0f0066bc93d)
Merge "Setting SKIP_ABI_CHECKS=true will make soong skip native abi checks." into pi-dev
Snap for 4728508 from 8328367c44085b948c003116c0ed74a047237a69 to pi-release
Change-Id: I8f494802977824aa17d2fced5e1c4df952be11ec
Change-Id: I8f494802977824aa17d2fced5e1c4df952be11ec
Setting SKIP_ABI_CHECKS=true will make soong skip native abi checks.
Bug: 78118272
Bug: 72225642
Test: SKIP_ABI_CHECKS=true mm -j64 in external/libjpeg-turbo; no abi
dumping / diffing happens
Test: SKIP_ABI_CHECKS=false mm -j64 in external/libjpeg-turbo; abi
dumping / diffing happens
Test: SKIP_ABI_CHECKS=foo mm -j64 in external/libjpeg-turbo; abi
dumping / diffing happens
Merged-In: I6330bc6de81abd589e78572af8efdf70d4c69b80
Change-Id: I6330bc6de81abd589e78572af8efdf70d4c69b80
(cherry picked from commit b391feaea59a3cec706237b1b980036512843a8d)
Bug: 78118272
Bug: 72225642
Test: SKIP_ABI_CHECKS=true mm -j64 in external/libjpeg-turbo; no abi
dumping / diffing happens
Test: SKIP_ABI_CHECKS=false mm -j64 in external/libjpeg-turbo; abi
dumping / diffing happens
Test: SKIP_ABI_CHECKS=foo mm -j64 in external/libjpeg-turbo; abi
dumping / diffing happens
Merged-In: I6330bc6de81abd589e78572af8efdf70d4c69b80
Change-Id: I6330bc6de81abd589e78572af8efdf70d4c69b80
(cherry picked from commit b391feaea59a3cec706237b1b980036512843a8d)
Add VendorConfig for board-level Soong plugin configuration
This allows Soong (Go) plugins to get custom configurations set in the
current product's BoardConfig.mk.
I'll have some more comprehensive documentation later, but the general
concept is that you'd have one namespace per plugin, defined in the
BoardConfig.mk (though they would work in the product.mk files too):
SOONG_CONFIG_NAMESPACES += myPlugin
Within that namespace you can set key-value pairs:
SOONG_CONFIG_myPlugin := key1 key2 ...
...
SOONG_CONFIG_myPlugin_key1 := value
...
SOONG_CONFIG_myPlugin_key2 := true
Then in your plugin, you can ask for your namespace:
vars := ctx.Config().VendorConfig("myPlugin")
And then use them:
str := vars.String("key1")
if vars.Bool("key2") { ... }
if vars.IsSet("key3") { ... }
Warning: It's not a good idea to fail on missing inputs, since an
android tree may contain plugins from multiple owners, and we may
configure your modules (but not build/install them) even if they're not
meant for the currently configured product.
Bug: 76168832
Test: define some variables, use them
Test: m blueprint_tools
Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741
Merged-In: I4c38f5a4344022c6f332de279d9bbef24502e741
(cherry picked from commit 0fe7866897b177f2bf7ec934c5615a2b48e48a23)
This allows Soong (Go) plugins to get custom configurations set in the
current product's BoardConfig.mk.
I'll have some more comprehensive documentation later, but the general
concept is that you'd have one namespace per plugin, defined in the
BoardConfig.mk (though they would work in the product.mk files too):
SOONG_CONFIG_NAMESPACES += myPlugin
Within that namespace you can set key-value pairs:
SOONG_CONFIG_myPlugin := key1 key2 ...
...
SOONG_CONFIG_myPlugin_key1 := value
...
SOONG_CONFIG_myPlugin_key2 := true
Then in your plugin, you can ask for your namespace:
vars := ctx.Config().VendorConfig("myPlugin")
And then use them:
str := vars.String("key1")
if vars.Bool("key2") { ... }
if vars.IsSet("key3") { ... }
Warning: It's not a good idea to fail on missing inputs, since an
android tree may contain plugins from multiple owners, and we may
configure your modules (but not build/install them) even if they're not
meant for the currently configured product.
Bug: 76168832
Test: define some variables, use them
Test: m blueprint_tools
Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741
Merged-In: I4c38f5a4344022c6f332de279d9bbef24502e741
(cherry picked from commit 0fe7866897b177f2bf7ec934c5615a2b48e48a23)
Make Config.ProductVariables private
All access to these should be going through the methods on Config /
DeviceConfig.
Bug: 76168832
Test: m blueprint_tools
Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
Merged-In: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
(cherry picked from commit 45133ac184b4e8b7071e7755ec3b98e217b54607)
All access to these should be going through the methods on Config /
DeviceConfig.
Bug: 76168832
Test: m blueprint_tools
Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
Merged-In: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
(cherry picked from commit 45133ac184b4e8b7071e7755ec3b98e217b54607)
Expose ProductVariables from TestConfig
In preparation for unexporting ProductVariables, explicitly return a
pointer to the structure from TestConfig / TestArchConfig.
Bug: 76168832
Test: m blueprint_tools
Change-Id: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
Merged-In: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
(cherry picked from commit 674dc7f7f06dc56edc7e331331d474dcf1bba53d)
In preparation for unexporting ProductVariables, explicitly return a
pointer to the structure from TestConfig / TestArchConfig.
Bug: 76168832
Test: m blueprint_tools
Change-Id: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
Merged-In: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
(cherry picked from commit 674dc7f7f06dc56edc7e331331d474dcf1bba53d)
Use Config/DeviceConfig functions to access ProductVariables
An upcoming change will stop exporting ProductVariables from Config, so
switch to using existing accessor functions, and add more when they're
missing.
Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
Merged-In: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
(cherry picked from commit 3fb1faeeb98143e132ca4d6f1cac42d6f060888b)
An upcoming change will stop exporting ProductVariables from Config, so
switch to using existing accessor functions, and add more when they're
missing.
Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
Merged-In: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
(cherry picked from commit 3fb1faeeb98143e132ca4d6f1cac42d6f060888b)
Add DistPath to reference the dist folder
Instead of open-coding the logic of whether there is one, or where to
find it.
Bug: 76168832
Test: diff out/soong/build.ninja without dist
Test: diff out/soong/build.ninja with dist specified
Change-Id: Ia3f1ef335e2d6e2175343338d04867d778a50300
Merged-In: Ia3f1ef335e2d6e2175343338d04867d778a50300
(cherry picked from commit bc0c5092671cbe7e58ab6a1f886414f864af3024)
Instead of open-coding the logic of whether there is one, or where to
find it.
Bug: 76168832
Test: diff out/soong/build.ninja without dist
Test: diff out/soong/build.ninja with dist specified
Change-Id: Ia3f1ef335e2d6e2175343338d04867d778a50300
Merged-In: Ia3f1ef335e2d6e2175343338d04867d778a50300
(cherry picked from commit bc0c5092671cbe7e58ab6a1f886414f864af3024)
Snap for 4725392 from 0f7e692fff56b04fc004306313c1b0725b351412 to pi-release
Change-Id: Idcc88212e62e62dcadf04a5cb2aec1518339887f
Change-Id: Idcc88212e62e62dcadf04a5cb2aec1518339887f
Switch PackageContext functions to take a ctx
So that the Path and similar functions can be used directly, without
manually adding something like configErrorWrapper (it just uses it all
the time now).
Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: I8cb524b09a84d0b8357d7c3501c71270af411e17
Merged-In: I8cb524b09a84d0b8357d7c3501c71270af411e17
(cherry picked from commit 54daaf0371fd7196bec7fd6c5960ba787b868751)
So that the Path and similar functions can be used directly, without
manually adding something like configErrorWrapper (it just uses it all
the time now).
Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: I8cb524b09a84d0b8357d7c3501c71270af411e17
Merged-In: I8cb524b09a84d0b8357d7c3501c71270af411e17
(cherry picked from commit 54daaf0371fd7196bec7fd6c5960ba787b868751)
Remove obsolete Brillo variable
Unlike the original change on master, this does not remove
product_variables.brillo, as I'm not backporting all of the other
removal CLs.
Bug: 76168832
Test: none
Change-Id: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
Merged-In: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
(cherry picked from commit a052599bb6d00d73efb23a8ef55d145b6cf95a2c)
Unlike the original change on master, this does not remove
product_variables.brillo, as I'm not backporting all of the other
removal CLs.
Bug: 76168832
Test: none
Change-Id: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
Merged-In: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
(cherry picked from commit a052599bb6d00d73efb23a8ef55d145b6cf95a2c)
Merge "Fix module rename inside namespace" into pi-dev
Fix module rename inside namespace
Rename was expecting fully qualified names, but context.go always
passes it short names.
Bug: 77922456
Test: TestRename in namespace_test.go
Change-Id: I552ff39fd8ed6ba6da4262925060b45104840ff7
Merged-In: I552ff39fd8ed6ba6da4262925060b45104840ff7
(cherry picked from commit eafb10c23a77432329678917ed6453e9d1c15abe)
Rename was expecting fully qualified names, but context.go always
passes it short names.
Bug: 77922456
Test: TestRename in namespace_test.go
Change-Id: I552ff39fd8ed6ba6da4262925060b45104840ff7
Merged-In: I552ff39fd8ed6ba6da4262925060b45104840ff7
(cherry picked from commit eafb10c23a77432329678917ed6453e9d1c15abe)
Snap for 4722539 from 0148f91348bb2457d5c1455bf7b1b0f54105e0fc to pi-release
Change-Id: I0ec02fd6330be5da005a50ef98e8a23561d77f5c
Change-Id: I0ec02fd6330be5da005a50ef98e8a23561d77f5c
Snap for 4716599 from 13a828764c4ac968d8e5245c939b790db27c739d to pi-release
Change-Id: I3587da1f711c2c0dc140bd7b5d45af1213b0ac13
Change-Id: I3587da1f711c2c0dc140bd7b5d45af1213b0ac13
Merge "Fixing protoOutParams concatenation." into pi-dev
Snap for 4713750 from 195f53c0f22ce02aab25f87b96720aca3c56c88c to pi-release
Change-Id: I0bff4a8f4c41cf33433e5a68bf19e4d8b0c8901a
Change-Id: I0bff4a8f4c41cf33433e5a68bf19e4d8b0c8901a
Merge "Add informational message to help with updation of VNDK abi references." into pi-dev
Snap for 4710485 from d95159cb33afbf252084975bf17a44ecaef42840 to pi-release
Change-Id: I500913b051e77e7472872a87e1da69faa79fe112
Change-Id: I500913b051e77e7472872a87e1da69faa79fe112
Fixing protoOutParams concatenation.
ParseGeneratorParameter delimits based on commas, not colons:
external/protobuf/src/google/protobuf/compiler/code_generator.cc
Bug: 72570104
Test: flash device with new build
Change-Id: I00042782a718d288ca6b0cb78f856d0fb223a926
(cherry picked from commit fb5b31ce9675e1acbba2d6eb0c0739195515fb85)
ParseGeneratorParameter delimits based on commas, not colons:
external/protobuf/src/google/protobuf/compiler/code_generator.cc
Bug: 72570104
Test: flash device with new build
Change-Id: I00042782a718d288ca6b0cb78f856d0fb223a926
(cherry picked from commit fb5b31ce9675e1acbba2d6eb0c0739195515fb85)
Add informational message to help with updation of VNDK abi references.
Bug: 64267858
Test: create reference dump for libjpeg; add exported function to libjpeg;
m -j libjpeg.vendor, build fails with helpful message.
Test: create reference dump for libjpeg; add exported function to libjpeg;
m -j libjpeg.vendor dist DIST_DIR=dist, build fails with helpful message.
Merged-In: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
Change-Id: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
(cherry picked from commit d8b70a39d12bbb5632811de5f3cb25b4456e49e1)
(cherry picked from commit 301aa8a8dcb0a92e96ffbf1aa2da3ca49ce2bda9)
Bug: 64267858
Test: create reference dump for libjpeg; add exported function to libjpeg;
m -j libjpeg.vendor, build fails with helpful message.
Test: create reference dump for libjpeg; add exported function to libjpeg;
m -j libjpeg.vendor dist DIST_DIR=dist, build fails with helpful message.
Merged-In: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
Change-Id: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
(cherry picked from commit d8b70a39d12bbb5632811de5f3cb25b4456e49e1)
(cherry picked from commit 301aa8a8dcb0a92e96ffbf1aa2da3ca49ce2bda9)
Have pom2mk list all duplicates modules
For easier debugging if there are multiple duplicates
Bug: 76692459
Test: ./update_current.py -x <build-id>
Change-Id: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f
Merged-In: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f
For easier debugging if there are multiple duplicates
Bug: 76692459
Test: ./update_current.py -x <build-id>
Change-Id: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f
Merged-In: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f
Have pom2mk include runtime deps too
It still excludes test deps though
Bug: 76692459
Test: ./update_current.py -x <build-id>
Change-Id: I55a786e9feab31f99b95b7cebe84869757e46270
Merged-In: I55a786e9feab31f99b95b7cebe84869757e46270
It still excludes test deps though
Bug: 76692459
Test: ./update_current.py -x <build-id>
Change-Id: I55a786e9feab31f99b95b7cebe84869757e46270
Merged-In: I55a786e9feab31f99b95b7cebe84869757e46270
Always include JAR dependencies (not just with --static-deps) in Makefile
Bug: 76692459
Test: ./update_current.py -x <build-id>
Change-Id: Ie0f77e52089adbe153d668fe39902545f469f2d2
Merged-In: Ie0f77e52089adbe153d668fe39902545f469f2d2
Bug: 76692459
Test: ./update_current.py -x <build-id>
Change-Id: Ie0f77e52089adbe153d668fe39902545f469f2d2
Merged-In: Ie0f77e52089adbe153d668fe39902545f469f2d2
Snap for 4701683 from d2cc96c24ad50127b12e9f259c946b3782bf49f7 to pi-release
Change-Id: I229cb77188faef533d7c6b910c781fca25a78a40
Change-Id: I229cb77188faef533d7c6b910c781fca25a78a40
Fix mini_debug_info stripping when no symbols should be kept.
If there are no symbols to keep (i.e. all function symbols are also in
the dynsym table), then the "${outfile}.keep_symbols" file has size 0.
When objcopy parses a --keep-symbols file, it has a special case for
0-sized files where it silently fails (exits with status 1, no error
message). On the other hand, objcopy is happy with a file containing no
symbols, as long as there is some whitespace or a comment. Avoid the
special case by appending a newline to keep_symbols.
Bug: b/62815515
Bug: b/77242617
Test: manual
Change-Id: I90fd3258426176dc18aa5a8c19389c55fe6329c7
(cherry picked from commit afefacf196dbe9a178e6b0607bb01d3c088fa59d)
If there are no symbols to keep (i.e. all function symbols are also in
the dynsym table), then the "${outfile}.keep_symbols" file has size 0.
When objcopy parses a --keep-symbols file, it has a special case for
0-sized files where it silently fails (exits with status 1, no error
message). On the other hand, objcopy is happy with a file containing no
symbols, as long as there is some whitespace or a comment. Avoid the
special case by appending a newline to keep_symbols.
Bug: b/62815515
Bug: b/77242617
Test: manual
Change-Id: I90fd3258426176dc18aa5a8c19389c55fe6329c7
(cherry picked from commit afefacf196dbe9a178e6b0607bb01d3c088fa59d)
Snap for 4698807 from d452a42d9dadca384e50f309b05b586507c29b20 to pi-release
Change-Id: I09ab3d9d9c2b552df3c7d154d494da1c28f32d83
Change-Id: I09ab3d9d9c2b552df3c7d154d494da1c28f32d83
Add overrides to cc_binary
Test: use it for healthd, it is not installed.
Bug: 77541952
Change-Id: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447
Merged-In: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447
Test: use it for healthd, it is not installed.
Bug: 77541952
Change-Id: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447
Merged-In: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447
[DO NOT MERGE] Switch to clang-4691093
Test: Build/boot marlin, sailfish, x86/arm/arm64 emulators
Bug: 68397894
Change-Id: Ic255b0b578838786f2bf54b53831f151187eaab0
Test: Build/boot marlin, sailfish, x86/arm/arm64 emulators
Bug: 68397894
Change-Id: Ic255b0b578838786f2bf54b53831f151187eaab0
Snap for 4693621 from 75c0008d7dbd70c04a8517142654f151b672fb0b to pi-release
Change-Id: Ic2c27e93a0cfbd36cc5580d1363ec892511d0094
Change-Id: Ic2c27e93a0cfbd36cc5580d1363ec892511d0094
Merge "Allow platform modules to link to vendor public libraries" into pi-dev
Allow VNDK-SP extensions to use vendor lib
This commit changes the VNDK-SP dependencies check. With the commit,
VNDK-SP-Ext can link to non-VNDK vendor shared libs. This commit also
refines the "cc_test" so that more error handling cases are properly
tested.
Before this commit, VNDK-SP-Ext could not depend on vendor libs. It
was disallowed because there were no correct way to load vendor libs.
The fallback link had to specify the shared lib names. On the other
hand, adding "/vendor/${LIB}" to search paths will lead to
double-loading issue.
In aosp/595067, "allow_all_shared_libs" was added to bionic dynamic
linker. Now, we can link the "vndk" namespace to "sphal" namespace.
Thus, like VNDK-Ext, VNDK-SP-Ext can link to vendor libs now.
Bug: 77249955
Test: lunch aosp_walleye-userdebug && make -j8 # runs unit tests
Test: lunch aosp_sailfish-userdebug && make -j8 # runs unit tests
Test: Create a VNDK-SP-Ext, link to vendor libs, and run it.
Change-Id: I5511204539a22c998528111076f46756807faf29
Merged-In: I5511204539a22c998528111076f46756807faf29
(cherry picked from commit d3c59a2b3acab9011a65b2e6932ec4cfd5ee1f2b)
This commit changes the VNDK-SP dependencies check. With the commit,
VNDK-SP-Ext can link to non-VNDK vendor shared libs. This commit also
refines the "cc_test" so that more error handling cases are properly
tested.
Before this commit, VNDK-SP-Ext could not depend on vendor libs. It
was disallowed because there were no correct way to load vendor libs.
The fallback link had to specify the shared lib names. On the other
hand, adding "/vendor/${LIB}" to search paths will lead to
double-loading issue.
In aosp/595067, "allow_all_shared_libs" was added to bionic dynamic
linker. Now, we can link the "vndk" namespace to "sphal" namespace.
Thus, like VNDK-Ext, VNDK-SP-Ext can link to vendor libs now.
Bug: 77249955
Test: lunch aosp_walleye-userdebug && make -j8 # runs unit tests
Test: lunch aosp_sailfish-userdebug && make -j8 # runs unit tests
Test: Create a VNDK-SP-Ext, link to vendor libs, and run it.
Change-Id: I5511204539a22c998528111076f46756807faf29
Merged-In: I5511204539a22c998528111076f46756807faf29
(cherry picked from commit d3c59a2b3acab9011a65b2e6932ec4cfd5ee1f2b)
Allow platform modules to link to vendor public libraries
Normally, when building with VNDK, platform modules are not allowed to
link against vendor libraries, because the ABI of the vendor libraries
are not guaranteed to be stable and may differ across multiple vendor
images.
However, the vendor public libraries are the exceptions. Vendor public
libraries are vendor libraries that are exposed to 3rd party apps and
listed in /vendor/etc/public.libraries.txt. Since they are intended to
be exposed to public, their ABI stability is guaranteed (by definition,
though it is up to the vendor to actually guarantee it).
This change provides a way to make a vendor lib as public by defining a
module of type 'vendor_public_library' with a map file that enumerates
public symbols that are publicized:
cc_library {
name: "libvendor",
proprietary: true,
...
}
vendor_public_library {
name: "libvendor",
symbol_file: "libvendor.map.txt",
}
This defines a stub library module named libvendor.vendorpublic from the
map file. `shared_libs: ["libvendor"]` is redirected to the stub library
when it is from the outside of the vendor partition.
Bug: 74275385
Test: m -j
Test: cc_test.go passes
Merged-In: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
Change-Id: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
(cherry picked from commit 374510bcb6a565902f8b8ea71045eb1f6ef095e1)
Normally, when building with VNDK, platform modules are not allowed to
link against vendor libraries, because the ABI of the vendor libraries
are not guaranteed to be stable and may differ across multiple vendor
images.
However, the vendor public libraries are the exceptions. Vendor public
libraries are vendor libraries that are exposed to 3rd party apps and
listed in /vendor/etc/public.libraries.txt. Since they are intended to
be exposed to public, their ABI stability is guaranteed (by definition,
though it is up to the vendor to actually guarantee it).
This change provides a way to make a vendor lib as public by defining a
module of type 'vendor_public_library' with a map file that enumerates
public symbols that are publicized:
cc_library {
name: "libvendor",
proprietary: true,
...
}
vendor_public_library {
name: "libvendor",
symbol_file: "libvendor.map.txt",
}
This defines a stub library module named libvendor.vendorpublic from the
map file. `shared_libs: ["libvendor"]` is redirected to the stub library
when it is from the outside of the vendor partition.
Bug: 74275385
Test: m -j
Test: cc_test.go passes
Merged-In: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
Change-Id: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
(cherry picked from commit 374510bcb6a565902f8b8ea71045eb1f6ef095e1)
Snap for 4686875 from be6b6a63f85ab6a883a97bb393bcfbcd4e53a494 to pi-release
Change-Id: I647359b7047440c601d2e438d5044be30b4b64a8
Change-Id: I647359b7047440c601d2e438d5044be30b4b64a8
Merge "Fix data race on cfiExportsMap" into pi-dev
Fix data race on cfiExportsMap
cfiExportsMap was reinitialized for every module, which caused
data races. Create the path from the string on each use
instead.
Bug: 77234104
Test: m nothing with race detector turned on
Change-Id: Ibca3149dcbe8a9d4d9f7ec6dd0b164697e7ae5cd
Merged-In: Ibca3149dcbe8a9d4d9f7ec6dd0b164697e7ae5cd
(cherry picked from commit 1218a19f0d2217500a1efa5fffde7465df2e4419)
cfiExportsMap was reinitialized for every module, which caused
data races. Create the path from the string on each use
instead.
Bug: 77234104
Test: m nothing with race detector turned on
Change-Id: Ibca3149dcbe8a9d4d9f7ec6dd0b164697e7ae5cd
Merged-In: Ibca3149dcbe8a9d4d9f7ec6dd0b164697e7ae5cd
(cherry picked from commit 1218a19f0d2217500a1efa5fffde7465df2e4419)
Merge "Fix the flaky build breakage for droiddoc target." into pi-dev
Set __ANDROID_API__ for vendor modules to vndk version.
When building vendor modules with BOARD_VNDK_VERSION=current, the
API of the vendor modules will be current PLATFORM_VNDK_VERSION.
__ANDROID_API_FUTURE__ will be used as before if the version is a
CODENAME.
If BOARD_VNDK_VERSION is not "current", that means the VNDK version
of the vendor modules is BOARD_VNDK_VERSION.
Bug: 74833244
Test: Build and check boot.
Change-Id: I383c76a36101e39c70575b463880b52d3e9d90bb
Merged-In: I383c76a36101e39c70575b463880b52d3e9d90bb
(cherry picked from commit 732aa6afdf57ccd2a007a6ca444b3b6592de34de)
When building vendor modules with BOARD_VNDK_VERSION=current, the
API of the vendor modules will be current PLATFORM_VNDK_VERSION.
__ANDROID_API_FUTURE__ will be used as before if the version is a
CODENAME.
If BOARD_VNDK_VERSION is not "current", that means the VNDK version
of the vendor modules is BOARD_VNDK_VERSION.
Bug: 74833244
Test: Build and check boot.
Change-Id: I383c76a36101e39c70575b463880b52d3e9d90bb
Merged-In: I383c76a36101e39c70575b463880b52d3e9d90bb
(cherry picked from commit 732aa6afdf57ccd2a007a6ca444b3b6592de34de)
Fix the flaky build breakage for droiddoc target.
ExpandSourcesSubDir was calling SourceFileProducer.Srcs(), and then
doing:
moduleSrcs = append(moduleSrcs[:j], moduleSrcs[j+1:]...)
This modifies the backing store of the slice, which may affect the
original data stored in the SourceFileProducer. Make all Srcs
implementations return slice that points to a copy of the backing
array.
Test: m out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp
Bug: b/76179848 b/76397326
Change-Id: I2432ce196984814daafc5aa9a2746e81de74494c
Merged-In: I2432ce196984814daafc5aa9a2746e81de74494c
(cherry picked from commit e42777a05a1f4bdde22b0dce03f3361e52e2dbae)
ExpandSourcesSubDir was calling SourceFileProducer.Srcs(), and then
doing:
moduleSrcs = append(moduleSrcs[:j], moduleSrcs[j+1:]...)
This modifies the backing store of the slice, which may affect the
original data stored in the SourceFileProducer. Make all Srcs
implementations return slice that points to a copy of the backing
array.
Test: m out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp
Bug: b/76179848 b/76397326
Change-Id: I2432ce196984814daafc5aa9a2746e81de74494c
Merged-In: I2432ce196984814daafc5aa9a2746e81de74494c
(cherry picked from commit e42777a05a1f4bdde22b0dce03f3361e52e2dbae)
Fix omission of llndk libraries during abi dump creation.
We omit vendor unavailable modules. This should not apply to llndk
libraries since currently, we do abi checks on their system variants.
Bug: 77101345
Test: m -j libc creates libc.so.lsdump
Test: m -j libjpeg.vendor creates libjpeg.so.lsdump
Test: m -j external/cblas still does not create libblas.so.lsdump
Merged-In: I5522c1cd471bfba8a1f632270ab2f167b4b17117
Change-Id: I5522c1cd471bfba8a1f632270ab2f167b4b17117
(cherry picked from commit fa920fabdae4c7ec4a4625614878ec86415e42c7)
We omit vendor unavailable modules. This should not apply to llndk
libraries since currently, we do abi checks on their system variants.
Bug: 77101345
Test: m -j libc creates libc.so.lsdump
Test: m -j libjpeg.vendor creates libjpeg.so.lsdump
Test: m -j external/cblas still does not create libblas.so.lsdump
Merged-In: I5522c1cd471bfba8a1f632270ab2f167b4b17117
Change-Id: I5522c1cd471bfba8a1f632270ab2f167b4b17117
(cherry picked from commit fa920fabdae4c7ec4a4625614878ec86415e42c7)
Merge "Make arm_on_x86 symmetric" into pi-dev
Merge "Add trace flag for cpp/Java AIDL generation." into pi-dev