Commit graph

10 commits

Author SHA1 Message Date
Colin Cross
710c3cb5fb Remove code related to unused LOCAL_* variables
LOCAL_JETIFIER_ENABLED, LOCAL_NO_PIC, LOCAL_PREBUILT_STRIP_COMMENTS,
LOCAL_RMTYPEDEFS, and *.vts sources are never used.  Remove them
and the code related to them.

Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I2ca9e674602057cc163b8bc28b0c57a0b7cc4361
2023-11-02 10:45:33 -07:00
Ulya Trafimovich
6ef5779c98 Don't expect all Java modules to have a manifest.
Some libraries that go through manifest_check do not have a manifest or
APK, so there is nothing to check LOCAL_USES_LIBRARIES and
LOCAL_OPTIONAL_USES_LIBRARIES against. Handle it as if the manifest had
zero <uses-library> tags: don't fail the build unless the module has
non-empty LOCAL_USES_LIBRARIES or LOCAL_OPTIONAL_USES_LIBRARIES.

Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m
Change-Id: I4b1317cfbd93cb6129caba51b56081307a564442
2021-04-13 12:42:44 +01:00
Ulya Trafimovich
2bf587713b Consolidate manifest_check for different module types.
Move manifest_check (a.k.a. verify_uses_libraries check) from makefiles
for specific module types to common makefile dex_preopt_odex_install.mk,
which is included by all Java modules that may require dexpreopt. If a
modules locally disables dexpreopt, it still goes through manifest_check
(unless dexpreopt is globally disabled or the module has no Java code).

This CL allows to have manifest_check and dexpreopt in the same makefile
(which is needed for a follow-up CL that will reuse dexpreopt variables
for manifest_check).

Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m
Change-Id: Ia217cfc247ae43d8fc716bfc1fe9dcce1d00aa7f
2021-03-19 11:00:51 +00:00
Jeongik Cha
d05b57a362 Introduce TARGET_BUILD_UNBUNDLED_IMAGE
- TARGET_BUILD_UNBUNDLED_IMAGE is similar to TARGET_BUILD_APPS, but
its targets are the unbundled partitions instead of apps.
- Rename TARGET_BUILD_APPS_USE_PREBUILT_SDK to TARGET_BUILD_USE_PREBUILT_SDKS
because it is used even without TARGET_BUILD_APPS.
-Instead of TARGET_BUILD_APPS, use TARGET_BUILD_USE_PREBUILT_SDKS
to build java modules with prebuilt sdks, and propagate to Soong.

Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: Ie096212ccbcca0018baae55e106af693b002c9e5
2020-08-03 15:47:09 +09:00
Colin Cross
c27d795b63 Use unzip -DD
We put reproducible timestamps in zip files so that the artifacts
are consistent, but that leads to old timestamps in the output
directory if they are unzipped as part of the build.  Use
unzip -DD when unzipping to update the timestamps.

Bug: 161015009
Test: touch -d 2020-01-01 ref; find $OUT/system -not -newer ref
Change-Id: I6f08ba8695d90a8225cfc04e679755e6296deed0
2020-07-12 05:38:03 +00:00
Ulya Trafimovich
4c69c2ff72 Use two-column format for PRODUCT_BOOT_JARS components.
The first component is the apex name, or a special name "platform"
if the boot jar is a platform jar rather than a part of some apex.
This is a prerequisite change for moving core-icu4j to a separate
com.android.i18n apex.

Old one-column format is still supported, but all unqualified
components of PRODUCT_BOOT_JARS get "platform:" prepended to them
after reading the product makefiles.

Test: aosp_walleye-userdebug boots
Bug: 138994281
Change-Id: I0f79c7d10477880ca65354251a5d1ca0b7ce79ab
2020-04-30 17:16:29 +01:00
Nicolas Geoffray
2ca0e49f61 Remove support for stripping dex.
Stripping is incompatible with ART module updatability.

Bug: 65154345
Bug: 138851227

Test: build and observe no change in output (stripping is not used by
default).

Change-Id: Ic2d9738ef393814c3af3cad116071f7b5938aa84
2019-10-21 09:36:45 +01:00
patricktu
379f7f0ef6 AIDEGen: Collect the classes.jar of the prebuilt modules into module-info.json
Current information is not enough if the prebuilt modules are depend on
AAR libs Therefore, AIDEGen has to collect the classes.jar of the
prebuilt modules from build system.

Build module-info.json without this change:
Build time: 1m55.001s
File size: 14,918,354 Bytes

Build module-info.json with this change:
Build time: 1m56.292s
File size: 15,577,031 Bytes

Bug: 132768299
Test: 1. Checkout the internal master branch
      2. Patch this CL
      3. m -j out/target/product/generic_x86_64/module-info.json
      4. Open the module-info.json
      5. For verifying soong_java_prebuilt.mk, check the classes.jar of
         module prebuilt-google-play-* exists.
         e.g.
         "prebuilt-google-play-...": {
              ...
              "classes_jar": [
	      	"out/target/common/obj/JAVA_LIBRARIES/
		 prebuilt-google-..._intermediates/classes.jar"
	      ]
         }
      5. For verifying java_prebuilt_internal.mk, check the classes.jar
         of module ink exists.
         e.g.
	 "ink": {
	     ...
	     "classes_jar": [
	     	"out/target/common/obj/JAVA_LIBRARIES/ink_intermediates/
		 classes.jar"
	     ]
	 }

Change-Id: I09518c92260db47d2686493fa13951f316159d13
2019-06-14 10:47:18 +08:00
Colin Cross
e6210f6eb2 Remove AAPT1 support
AAPT2 is used everywhere now, remove support for AAPT1.  Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).

Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
Merged-In: I2ff768897360ff866dbae5562455bab22be270f7
2019-04-17 16:50:30 -07:00
Jaewoong Jung
f22997ead4 prebuilt_internal.mk refactoring.
Add cc_prebuilt_internal.mk and java_prebuilt_internal.mk. Now all
buisiness logic lives in individual per-class prebuilt mk files.

Fixes: 128609813
Test: Built and flashed a Pixel device image + TreeHugger
Change-Id: I3827f990642bb7587dc682d1a382b3a1ce22fe66
2019-03-26 15:29:20 -07:00