Commit graph

1679 commits

Author SHA1 Message Date
Elliott Hughes
707142007b Microoptimize package name extraction.
Since there's only one, and it appears early, we can stop when we find
it rather than trawl through megabytes of localized strings we don't
need to see.

Bug: https://github.com/onetrueawk/awk/issues/199#issuecomment-1756885708
Test: treehugger
Change-Id: If4d7c63da7df76c23fca417a4b727189f79e3ce6
2023-10-11 22:56:22 +00:00
Cole Faust
206971459d Fix $(PROGUARD_DICT_ZIP) builds
Previously, when building the proguard dict zip, we got a lot of
warnings like these, and the files were always rebuilt:

```
[ 39% 9/23] Copy symbols with mapping: out/target/common/obj/APPS/HTMLViewer_intermediates/proguard_dictionary
ninja: Missing `restat`? An output file is older than the most recent input:
 output: out/target/common/obj/APPS/HTMLViewer_intermediates/proguard_dictionary.textproto
  input: out/soong/.intermediates/packages/apps/HTMLViewer/HTMLViewer/android_common/e10894d3da5db41239526c9048962355/proguard_dictionary
```

For some reason kati wasn't adding `restat=true` on these ninja rules.
Adding $(4) to KATI_RESTAT fixes it for some reason.

Test: m dist repeatedly doesn't give the restat warnings
Change-Id: Ie02526b3ab127f42bdc2db350d2dc468e7888fe2
2023-09-06 18:13:27 -07:00
Cole Faust
c67e769b8c Install LOCAL_SOONG_INSTALL_SYMLINKS even if LOCAL_SOONG_INSTALLED_MODULE isn't set
LOCAL_SOONG_INSTALL_SYMLINKS can now be set by the install_symlink
module type. The install_symlink module type doesn't set
LOCAL_SOONG_INSTALLED_MODULE because make tries to copy that file
around, which doesn't work with a symlink.

Bug: 205632228
Test: built and ran the emulator observed the /system/bin/hwservicemanager symlink is still there
Change-Id: I1ec355b5ae057d0b7fe167674d70da6a4d03f6b5
2023-09-05 14:16:38 -07:00
Cole Faust
b35231ece0 Build the proguard dict zip without PACKAGING intermediates
Before, as each module was built, it would dump its proguard-related
files into the PACKAGING folder. Then the rule for the final distable
zip would zip up this whole folder. This means that if you built a
module that was not part of the system, and then rebuilt the final
zip, it would erronously include more proguard files than necessary.
This problem was worked around by relying on CI to run `m installclean`
every time.

Now, the zip proguard files always include the same information.

This also makes it so that when you build a module, its proguard files
are not copied to the PACKAGING folder, making builds that don't
build the final proguard zips slightly faster.

Bug: 205632228
Test: diff'd proguard-dict.zip, proguard-dict-mapping.textproto, and proguard-usage.zip before/after this cl on sdk_phone_x86_64. They have diffs, but only in the order of files / lines.

Change-Id: I98c02e1eb117c337ba9b98f04ad486597eb9bb86
2023-08-30 17:17:19 -07:00
Cole Faust
8e4024c872 Rename some variables in definitions.mk
Sublime text has an issue with their syntax highlighting, where it
looks for \s*define\b to indicate the start of a define block.
We had some variables that started with "define-", which match this
regex, which causes Sublime to be confused about where the defines
start and end. Rename the variables to work around this issue.

Test: m nothing
Change-Id: I997929606e2b0a8b086ad3b67a7ce1b5e99a7385
2023-08-14 15:28:05 -07:00
Devin Moore
c33aec868b Let assemble_vintf create the output fragments
Instead of checking, then copying the fragments into the out directory,
we pass in the output file and let assemble_vintf create the output
file.

Test: m
Bug: 290265210
Change-Id: I65c2ee826de73b805b48dc95f20c2405250587f8
2023-07-31 16:10:59 +00:00
Treehugger Robot
08d991834d Merge "Support transitive resource packages from Soong" into main 2023-07-26 00:34:57 +00:00
Colin Cross
d9d5c2a95e Support transitive resource packages from Soong
Soong is improving resource handling by not squashing resources from
all dependencies into every android_library.  This causes problems
when the android_library is exported to Make, as Make is still using
the old squashing behavior.

Add a file to every static java library that lists the resource packages
of its transitive dependencies.  For modules defined in Andorid.mk files
leave the file empty, but for Soong modules populate it with the list
of transtiive dependencies.  Pass the contents all of the files from
direct dependencies to aapt2 link to include any transitive dependencies.

Bug: 284023594
Test: m Dialer
Change-Id: I4e8ace497d701a9645a62dd5a6ac12e9a6830dcf
Merged-In: I4e8ace497d701a9645a62dd5a6ac12e9a6830dcf
2023-07-25 21:30:38 +00:00
Elliott Hughes
97ad120adb Switch from minigzip to gzip.
Bug: http://b/288169261
Test: treehugger
Change-Id: I404cbcb850734ed8291c2215a4329fb372806d63
2023-06-27 15:39:05 -07:00
Treehugger Robot
913c41caf5 Merge "Use Z_BEST_COMPRESSION for compress-package" 2023-06-13 10:09:54 +00:00
Bob Badour
2191b9db82 Note ability to annotate dependencies.
Test: m droid dist
Change-Id: If3a0d032caf7801196117d7c4d4d21cb67c826bf
2023-05-16 10:52:12 -07:00
Gregory Montoir
91721868ec Use Z_BEST_COMPRESSION for compress-package
Saves a few extra KBs with LOCAL_COMPRESSED_MODULE

Bug: 191841942
Bug: 282617419
Test: boot && apks uncompressed
Change-Id: I1a8c6cdfc194b68b2f2c9fb398851a7a4b7440bf
2023-05-15 06:25:57 +00:00
Cole Faust
ab4f856bbc Remove gpl_source.tgz
This file was an archive of all the gpl files that could be found
in the source tree. Because it looks for gpl files using $(wildcard),
kati had to rerun the wildcards every single build to see if they had
changed. These GPL wildcards made up 30294 of 63996 wildcards present
on aosp-master. Removing these wildcards saves (aosp/internal) ~0.2/~0.1
seconds from every build, and ~0.4/~0.6 seconds from the wildcard
checking portion of kati. (The whole build sees <0.4s/0.6s of
improvement because it's parallelized with the shell checking, but
improvements here mean that we can now improve the shell commands as
well and get more fruitful results)

We don't actually use gpl_source.tgz anywhere, so we can just remove it.

Bug: 282079550
Test: m nothing
Change-Id: I77141dbb39b2d8ebd96bc258fe7dbdff5a372977
2023-05-11 18:00:38 -07:00
Joe Onorato
735320a9d7 Merge "Save approx 18GB of RAM by not having a bazillion copies of the same modules names" 2023-04-24 21:06:57 +00:00
Joe Onorato
9ba2f4d022 Save approx 18GB of RAM by not having a bazillion copies of the same modules names
Bug: 278864904
Test: treehugger, m, manual inspection
Change-Id: Ib564b3edf4a0523fc8231b8e57a5ba9c42a73294
2023-04-24 01:11:40 -07:00
Inseob Kim
168ab6af74 Remove lunch target from appcompat log
This is to reduce build rule divergence among targets. We only need the
path under PRODUCT_OUT.

Bug: 277662244
Test: build and boot
Change-Id: Ica8776d1779c47305c3c74015be2b3597cbdf95c
2023-04-18 14:02:52 +09:00
Bob Badour
0bd9a626bd Increase dump-words-to-file capacity
Test: m droid dsit
Change-Id: I092e032a8d8f943dbb2eddd4bb7c57df40bbcfba
2023-03-24 13:12:45 -07:00
Bob Badour
e5b7a4205e Fix copy+paste error
Fix declare-copy-target-license-metadata

Test: m droid reportmissinglicenses

Change-Id: I5c8ee1109f9b83232bf66218d44ed05f97377a98
2022-12-01 17:56:33 -08:00
Colin Cross
af7ac3986e Add basic musl support to make
There are still devices that set BUILD_BROKEN_USES_BUILD_HOST_* and
build host modules in Make.  Add basic support for building against
libc_musl in Make when USE_HOST_MUSL is set.

Bug: 258535366
Test: build a host tool defined in Android.mk file in internal branch
Change-Id: I9150be749bbeaac2ac5a33b2cf915004aa3033df
2022-11-09 16:40:25 -08:00
Cole Faust
6a75c4f782 Delete java-layers.py
There are no usages of LOCAL_JAVA_LAYERS_FILE,
and java-layers.py was written in python 2.

Bug: 203436762
Test: Presubmits
Change-Id: I1be0f2547757a853e20811f28529479487037e94
2022-10-24 18:15:54 -07:00
Bob Badour
4f4c75fba9 Add module name argument to build_license_metadata.
Test: m droid dist

Change-Id: I40b9f403a3d17cc202844f4cebf336de40e5defe
2022-10-13 13:50:35 -07:00
Bob Badour
54b325df14 Normalize target path for license dependencies.
If not normalized the same as declare-license-metadata, two rules get
generated instead of one rule with both license text and deps.

Test: m droid dist

Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=sdk TARGET_BUILD_VARIANT=userdebug sdk dist sdk_repo

Change-Id: I3a8f2d3825c8c0183049fa12b14ace9b54066a01
Merged-in: I3a8f2d3825c8c0183049fa12b14ace9b54066a01
2022-09-13 17:21:40 +00:00
Bob Badour
28078172fe Put host license metadata in OUT_DIR.
Test: m droid dist

Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=sdk TARGET_BUILD_VARIANT=userdebug sdk dist sdk_repo

Change-Id: I9f5d9c1b70eb8469031d49818c32770dcf34fad2
Merged-in: I9f5d9c1b70eb8469031d49818c32770dcf34fad2
2022-09-13 17:20:20 +00:00
Yihan Dong
9b75c9ee1a Assign each xts test package a copy license metadata
Use a copy license metadata instead of module_license_metadata to make each xts test package names shown in the final xts notice file.

Test: m gts reportmissinglicenses
Bug: 245474938
Change-Id: Ic5e28763bc4e8448d3e04a80e89db147387164a6
2022-09-07 08:12:37 +00:00
Greg Kaiser
85518aceab Add project specific definitions.mk files
Just like we do with build/tasks/*.mk, we also look for project
specific definitions.mk files.

Test: TreeHugger
Bug: 243024627
Change-Id: I7f07546582eb02bba245a1f927a11efc1ddc3c6f
2022-08-18 12:22:15 -07:00
Treehugger Robot
79e45e727a Merge "Append built and installed when copying metadata." am: 3fe9459268
Original change: https://android-review.googlesource.com/c/platform/build/+/2169434

Change-Id: Ib2e6411981a213d7e477e105d8efd6783c346f07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 17:47:13 +00:00
Bob Badour
04fbe29669 Append built and installed when copying metadata.
Soong doesn't always have the built and installed available.

Bug: 239638693

Test: m droid dist

Change-Id: Id18201da488e3b16d60957c9a298a52345595c5b
2022-07-29 17:16:25 -07:00
Anton Hansson
ce02daa32b Merge "Fix typo" am: 0f079826a1 am: a00e17c412
Original change: https://android-review.googlesource.com/c/platform/build/+/2129256

Change-Id: I560cbea327b27a96639d1b7a49a6d149da0cad58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 13:46:30 +00:00
jiajia tang
7c8dd8c3d4 Fix typo
As title

Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I40b155ceed8e88fecf25da5dd13a2fb146faf263
2022-06-21 00:21:45 +00:00
Treehugger Robot
67fa5b53f4 Merge "Revert "Revert "Revert "Revert "Create lists of projects to share per dist target""""" am: 6f30351970 am: 7660d6a3a7
Original change: https://android-review.googlesource.com/c/platform/build/+/2124807

Change-Id: I0b6ebdce2ed8243bfed7c7ef1f19e37ceebaf367
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 17:01:46 +00:00
Bob Badour
d227fac95b Revert "Revert "Revert "Revert "Create lists of projects to share per dist target""""
This reverts commit 398bd87950.

Reason for revert: Rolling forward again without 'all' target.

Bug: 151177513
Bug: 210912771
Bug: 235333302
Bug: 232138105

Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_coral_hwasan TARGET_BUILD_VARIANT=userdebug droid dist with-license platform_tests continuous_instrumentation_tests continuous_native_tests

Test: tapas google-tradefed-all && m dist

Change-Id: I1e5f5639ebf1fa61060124a5183f6f0a2ece04b5
2022-06-14 11:33:54 -07:00
Treehugger Robot
e759d23d01 Merge "Revert "Revert "Revert "Create lists of projects to share per dist target"""" am: 6ebfaa453b am: 388494bd87
Original change: https://android-review.googlesource.com/c/platform/build/+/2124432

Change-Id: Iccbe21894f0f7d1098f87f9f512fe5226a0eb67a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 09:48:18 +00:00
Bob Badour
398bd87950 Revert "Revert "Revert "Create lists of projects to share per dist target"""
This reverts commit 82040d9882.

Reason for revert: Advised to switch to using TARGET_BUILD_APPS

Change-Id: If56a1fceb5da66b90b7b0ec2275ec429661515b4
2022-06-14 00:03:23 +00:00
Treehugger Robot
32fcbf59bb Merge "Revert "Revert "Create lists of projects to share per dist target""" am: e25ddc0453 am: f4cf61e9b8
Original change: https://android-review.googlesource.com/c/platform/build/+/2066749

Change-Id: Ib304d6442d31e4bc70b4a1a0a6fdea3ea7e2a2d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 20:30:49 +00:00
Bob Badour
82040d9882 Revert "Revert "Create lists of projects to share per dist target""
This reverts commit 59e4951021.

Reason for revert: Attempt to roll forward again.

Test: m droid dist reportmissinglicenses

Change-Id: Ibf5a9869d03726e279fb23bf68ca66547b972138
2022-06-08 18:49:20 -07:00
Treehugger Robot
f6acd8f004 Merge "Create license metadata for copied targets." am: 1f0c3583a6 am: 62f582272d
Original change: https://android-review.googlesource.com/c/platform/build/+/2109383

Change-Id: Ia76ed06e5021d530bcba851df619048edede15f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 03:39:57 +00:00
Bob Badour
ba3372439f Create license metadata for copied targets.
Bug: 213388645

Test: m cts dist reportmissinglicenses
Change-Id: I43043e5e7b80d9f3210d6498c215846aec761add
2022-06-02 15:43:08 -07:00
Colin Cross
67e5e7f150 Merge "Remove HOST_DALVIK_*" am: 544aedda27 am: 265c1cc9a3
Original change: https://android-review.googlesource.com/c/platform/build/+/2059991

Change-Id: I2ab5dfd7d579f9b141c4e6022f40034a1c6ccfaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 16:54:18 +00:00
Colin Cross
a9203e6d87 Remove HOST_DALVIK_*
There are no more BUILD_HOST_DALVIK_* modules, remove the host dalvik
support.  The equivalent support in Soong just copies the device dex
file to the host dalvik location.

Test: m checkbuild
Change-Id: I4bcf916518317b28d3217994b2fe9ee95d7f50d6
2022-05-11 08:17:45 -07:00
Treehugger Robot
bbc004ce98 Merge "Replace DEX_FLAGS by flags for D8 and R8." am: b27140daa0 am: dbcc7e454b
Original change: https://android-review.googlesource.com/c/platform/build/+/2059747

Change-Id: I3f3dcc83ffae4c3e9c837693784c74872e991ff6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:05:04 +00:00
Ian Zerny
8deeb2b64e Replace DEX_FLAGS by flags for D8 and R8.
Bug: b/227746536
Test: manual
Change-Id: Ic3cb8feb7a09d690ecd309162236e49a8d1e52c6
2022-04-25 11:02:41 +02:00
Treehugger Robot
0afb5008fd Merge "Use the new R8/D8_FLAGS vars" am: 8ecc6369f0 am: 24d5aac91d
Original change: https://android-review.googlesource.com/c/platform/build/+/2070111

Change-Id: I25b9bf3c2e54b0f0140c6cd935a63f5704304c8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 07:49:48 +00:00
Jared Duke
1410f684f6 Use the new R8/D8_FLAGS vars
Propagate the new D8/R8 JVM flags vars that were formerly combined in
DEX_FLAGS.

Bug: 205303544
Test: time m
Change-Id: Ifc6051cd9422b3f5c52322833d9a7f5e8263f857
2022-04-21 18:24:55 +00:00
Bob Badour
e0013ca046 Merge "Revert "Create lists of projects to share per dist target"" am: f4ad50eeb6 am: 7b536df914 am: 10c3f0496b
Original change: https://android-review.googlesource.com/c/platform/build/+/2065621

Change-Id: I8a0377f718b43aae89e1ccf6066c590b57b99afb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 18:23:54 +00:00
Bob Badour
59e4951021 Revert "Create lists of projects to share per dist target"
This reverts commit 1fd4bda634.

Reason for revert: Causes flaky build breakages

Bug: 229319921

Change-Id: I82e660e95c8d4d72b88d2de58d82e0d4be901869
2022-04-15 17:29:26 +00:00
Treehugger Robot
9bad3e7e91 Merge "Create lists of projects to share per dist target" am: 746806b3bb am: 8a4f747caf am: 87a7663b8d
Original change: https://android-review.googlesource.com/c/platform/build/+/2064290

Change-Id: I0e5ee56ac9ea244ef90d78e60a5717325f3cac9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 23:20:46 +00:00
Bob Badour
1fd4bda634 Create lists of projects to share per dist target
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses
Change-Id: I23ee3a983c205ee2a62e47edc2039b7cc713c420
2022-04-13 11:27:59 -07:00
Treehugger Robot
d816479292 Merge "Remove unused combine-notice-files macro." am: 2f6aa08f69 am: 5324ea0ca6 am: 2de37f9424
Original change: https://android-review.googlesource.com/c/platform/build/+/2055032

Change-Id: I2751ba90417c8960ab5539f2fe181c66b4c69b15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-11 20:43:39 +00:00
Bob Badour
6259a09b7a Remove unused combine-notice-files macro.
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m cts reportmissinglicenses
Test: m droid reportmissinglicenses
Change-Id: I4cddf9a381a1258bdc2b1b42be72c447df10d234
2022-04-07 22:04:03 -07:00
Colin Cross
e03e64a4c9 Merge "Revert "Revert "Produce mappings of hashes to elf symbols and r8 dictionaries""" am: d8cf9a5a30 am: 9bb87d3f51 am: e64f092723
Original change: https://android-review.googlesource.com/c/platform/build/+/2056437

Change-Id: Ibfb3b0f9bc648ef0d68e93841daf65b2a788a4b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 22:47:57 +00:00