Commit graph

34968 commits

Author SHA1 Message Date
Treehugger Robot
96d2fbe9d9 Merge "Remove obsolete comment on PrebuiltPostDepsMutator" am: d411f069ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1650858

Change-Id: I583d2c166427e8230e676b95c12aebd03acc6c27
2021-03-25 20:08:50 +00:00
Treehugger Robot
d411f069ff Merge "Remove obsolete comment on PrebuiltPostDepsMutator" 2021-03-25 19:37:51 +00:00
Paul Duffin
8313fb112c Merge "Filter duplicate modules in platform_compat_config_singleton" am: f329307878
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652267

Change-Id: I850c1a2bd54411a6c90d507b050a5466becab111
2021-03-25 18:21:13 +00:00
Paul Duffin
a48aed59ee Merge "Disallow non-existent paths in sdk package" am: 863ecfb7ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647171

Change-Id: I03a4fa86c9f85fc8f89dc688573450f65f2fcbba
2021-03-25 18:21:04 +00:00
Paul Duffin
0024043b00 Merge "Improve sdk snapshot testing" am: cf0bc53bc3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647170

Change-Id: I77e0e5501ba6bc510f39b454ba7a71fb24d3cc3d
2021-03-25 18:20:55 +00:00
Paul Duffin
166ae29441 Merge "Fix TestDroiddoc's reliance on absolute paths" am: 6c968b1f0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652617

Change-Id: I48cd4a6a6d2a50a1b756c59bbdcf4ead8bc2dccf
2021-03-25 18:20:46 +00:00
Paul Duffin
f1cf5308f9 Merge "Add Path.RelativeToTop" am: 301deecd6c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652616

Change-Id: I194fc8c451e39d06bab40db3f0c12f1b1170776b
2021-03-25 18:20:37 +00:00
Pirama Arumuga Nainar
a65c8e8172 Merge "[pgo] Do not explicitly link profile runtime" am: 4c0b11a16e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1651751

Change-Id: Ia3c2d72cf450e1a86671940a198afac669bad45a
2021-03-25 18:20:27 +00:00
Roland Levillain
1cb436ebf0 Merge "Fix a typo in the definition of varApexNames in java/dexpreopt_bootjars.go." am: 737ad608ab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652467

Change-Id: I41c0e1ac6ba7737b8fa237be1c58dca87093003c
2021-03-25 18:19:07 +00:00
Paul Duffin
f329307878 Merge "Filter duplicate modules in platform_compat_config_singleton" 2021-03-25 18:09:38 +00:00
Paul Duffin
863ecfb7ba Merge "Disallow non-existent paths in sdk package" 2021-03-25 18:09:06 +00:00
Paul Duffin
cf0bc53bc3 Merge "Improve sdk snapshot testing" 2021-03-25 18:08:26 +00:00
Paul Duffin
6c968b1f0f Merge "Fix TestDroiddoc's reliance on absolute paths" 2021-03-25 18:02:26 +00:00
Paul Duffin
301deecd6c Merge "Add Path.RelativeToTop" 2021-03-25 18:01:31 +00:00
Pirama Arumuga Nainar
4c0b11a16e Merge "[pgo] Do not explicitly link profile runtime" 2021-03-25 17:57:49 +00:00
Roland Levillain
737ad608ab Merge "Fix a typo in the definition of varApexNames in java/dexpreopt_bootjars.go." 2021-03-25 17:25:44 +00:00
Jingwen Chen
3b8237f945 Merge "bp2build: add a per-module denylist." am: 6400f20430
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652238

Change-Id: I659b327ff1f4eed86b9151dfcda94a9d93ef34e1
2021-03-25 15:10:18 +00:00
Paul Duffin
d92c7a13ed Merge "Remove config from basePath" am: 618eeff010
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652615

Change-Id: I10dc32d568e6812dd714000fd79bfc4b1e4edf5f
2021-03-25 15:10:08 +00:00
Paul Duffin
000fe1cfe5 Merge changes I12e1854c,I08f7dba4 am: 85484e344a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652614

Change-Id: I95aba831638f6b195b0e1006f721a4054bebfde5
2021-03-25 15:09:36 +00:00
Jingwen Chen
6400f20430 Merge "bp2build: add a per-module denylist." 2021-03-25 15:02:57 +00:00
Paul Duffin
618eeff010 Merge "Remove config from basePath" 2021-03-25 14:45:43 +00:00
Paul Duffin
85484e344a Merge changes I12e1854c,I08f7dba4
* changes:
  Add buildDir to WritablePath implementations
  Add srcDir to SourcePath
2021-03-25 14:44:51 +00:00
Paul Duffin
4dd6cdb3bc Fix TestDroiddoc's reliance on absolute paths
TestDroiddoc compares the value returned by OutputFiles(""), which will
usually be absolute paths including the temporary buildDir, against
paths returned from TestingBuildParam.RelativeToTop(), which does not
currently change the Path contents and so will include absolute
temporary paths. However, a follow up change to this will make the
TestingBuildParam.RelativeToTop() also change the Path contents at
which point this test would be comparing relative to absolute paths.

So, this change makes sure that they are all converted to relative to
top paths before comparison.

Bug: 183650682
Test: m droid
Change-Id: Ia4478f527af27a920945f5849525e5031cc5b8b6
2021-03-25 13:14:37 +00:00
Paul Duffin
85d8f0dcd9 Add Path.RelativeToTop
Makes Path.RelativeToTop the source of truth as to what `relative to
top` means.

Uses it in PathRelativeToTop so that it will be tested by the existing
tests that use AssertPathRelativeToTop.

Also adds RelativeToTop() to WritablePaths and Paths.

Bug: 183650682
Test: m droid
Change-Id: I88dc56afd1314e51b4e41795a2448cab4ce8a899
2021-03-25 13:14:37 +00:00
Paul Duffin
bb9ff5108b Filter duplicate modules in platform_compat_config_singleton
Previously, unpacking a snapshot containing a
prebuilt_platform_compat_config into a source build would cause build
failure because of duplicate ids because the singleton would collate
ids from both prebuilts (versioned and unversioned) and source.

This change filters out versioned prebuilts and only uses prebuilts
that are preferred and source modules that have not been replaced by a
prebuilt.

Bug: 182402754
Test: m nothing
Change-Id: Idacbb34444e5156370df70bf88c6e8a7e2d67890
2021-03-25 12:53:25 +00:00
Paul Duffin
db462dd987 Disallow non-existent paths in sdk package
Test behavior was changed a while ago so that tests by default ignore
non-existent source paths (unless they explicitly check for/rely on
them). Prior to that CheckSnapshot() could detect when files were
missing from the snapshot but it no longer can.

This change disallows non-existent source files in all the sdk tests
which means that they are disallowed when processing the snapshots as
they use the same preparers as were used to process the sources.

This caused a test failure which has been temporarily ignored and has
a TODO and bug associated with it.

Bug: 183184375
Test: m nothing
Change-Id: I969d8515d20ef5ae515f2b5f93d8ed4e4f8ede75
2021-03-25 12:53:22 +00:00
Paul Duffin
1822a0a371 Improve sdk snapshot testing
The sdk produces snapshots that are expected to be unpacked in one of
the Android repos. Often that can lead to issues due to conflicts
between the source and prebuilts. This change attempts to avoid those
conflicts by testing the different ways that those files can be used.

With the existing test to cover adding the snapshot
This change will cause the sdk tests to check the following:
1) Snapshot on its own (already done).
2) Snapshot plus original source where the original source is
   preferred.
3) Snapshot plus original source where the snapshot is preferred.

It also adds the ability for tests to provide their own custom checkers
to verify the result of each of the previous tests.

This change reveals a number of bugs already present. Rather than
attempt to fix them this change adds the ability to specify error
handlers for the two cases that mix source and snapshot to allow those
errors to be temporarily ignored while allowing the majority of the
tests to benefit from this improvement. Each of those failures has a
TODO and bug associated with it.

Bug: 183184375
Test: m nothing
Change-Id: I105233195074dbe7a6422b6dfc5486e74398ea15
2021-03-25 12:50:18 +00:00
Ulyana Trafimovich
29dae7ed73 Merge "Allow using updatable boot jars in dexpreopt (but don't use them yet)." am: 2258cbbe42
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647188

Change-Id: I7097c866c3dd01fa8e19c8aa74c4b74c1e78538b
2021-03-25 10:48:01 +00:00
Ulyana Trafimovich
2258cbbe42 Merge "Allow using updatable boot jars in dexpreopt (but don't use them yet)." 2021-03-25 10:13:45 +00:00
Jingwen Chen
5d72cba25c bp2build: add a per-module denylist.
This speeds up development of experimental converters.

Test: TH
Change-Id: I1623d3dbf63c8ed777646d64560d77b38edf9213
2021-03-25 09:29:26 +00:00
Paul Duffin
ed3f3fc4f7 Merge "Cleanup some issues left over from previous reviews" am: 2b1d2b6e4d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1651487

Change-Id: I30866d664063f5a682312ef6631b2b7f457f03a0
2021-03-25 09:23:49 +00:00
Paul Duffin
4a08263f48 Merge "Convert test that disallows non existent paths to use fixtures" am: e742ee14f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647169

Change-Id: Icd8fa81faa7c0e62a33d3baeaa0368a18e3917ad
2021-03-25 09:23:40 +00:00
Treehugger Robot
660e778db6 Merge "Enable safe ICF for all devices" am: f7e79a591c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649333

Change-Id: I15ef7c4835348f90cb86d30987713327fdec0c84
2021-03-25 09:21:31 +00:00
Paul Duffin
74abc5d4ee Remove config from basePath
Bug: 183650682
Test: m droid
Change-Id: I60eb2b8ed0317e874ecdafd5cb37d7c997d41bb8
2021-03-25 09:18:29 +00:00
Paul Duffin
d65c58b204 Add buildDir to WritablePath implementations
First, the buildDir() method was renamed to getBuildDir() to avoid
clashing with the buildDir field.

Then, a buildDir was added to both `OutputPath` and `InstallPath` but
not to `PhonyPath` as it does not contain any path components. Instead
the `PhonyPath.getBuildDir()` was changed to simply return "".

Bug: 183650682
Test: m droid
Change-Id: I12e1854c829b980c5c01205753c62c00dc0a4774
2021-03-25 09:18:29 +00:00
Paul Duffin
580efc8716 Add srcDir to SourcePath
Bug: 183650682
Test: m droid
Change-Id: I08f7dba449538d289a6c4d6b5325c1a833cff834
2021-03-25 09:18:29 +00:00
Paul Duffin
2b1d2b6e4d Merge "Cleanup some issues left over from previous reviews" 2021-03-25 09:16:40 +00:00
Paul Duffin
e742ee14f8 Merge "Convert test that disallows non existent paths to use fixtures" 2021-03-25 09:16:20 +00:00
Treehugger Robot
f7e79a591c Merge "Enable safe ICF for all devices" 2021-03-25 08:59:00 +00:00
Jingwen Chen
1763a4add1 Merge "Revert "Add bp2build support for cc_library_static."" am: 8b086655cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652233

Change-Id: I2839b7035eab47feb05634421d0dd1e8265d107f
2021-03-25 06:28:37 +00:00
Rupert Shuttleworth
76d01a0522 Merge "Add bp2build support for cc_library_static." am: d3e10104b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1594371

Change-Id: I85b57630efd5ecf8ad3b32941e094591621a2eed
2021-03-25 06:28:03 +00:00
Jingwen Chen
8b086655cd Merge "Revert "Add bp2build support for cc_library_static."" 2021-03-25 06:14:03 +00:00
Jingwen Chen
f9410540a8 Revert "Add bp2build support for cc_library_static."
Revert submission 1594391-bp2build-cc_library_static

Reason for revert: Broke the build on aosp-master
Reverted Changes:
Ib16ccf31a:Add cc_library_static macro to help with bp2build ...
I37c856be2:Add bp2build support for cc_library_static.

Change-Id: Ie94d5bc6da81758cd4e0461c08a810a29643c971
2021-03-25 06:11:59 +00:00
Rupert Shuttleworth
d3e10104b0 Merge "Add bp2build support for cc_library_static." 2021-03-25 05:39:39 +00:00
Paul Duffin
15204cf1ea Merge "Cleanup usages of Dex2oatDepTag" am: 958408d921
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652452

Change-Id: I6eea8ea370adf745908b9e8b5d669eb182c92c1c
2021-03-24 22:34:02 +00:00
Jingwen Chen
cf615d8640 Merge "bp2build: add allowlist for package-level conversions." am: 95c6eb3959
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625820

Change-Id: Ic4d3be3dfe3bb312b3c4bdca0289ef3fc3ef81d9
2021-03-24 22:33:25 +00:00
Paul Duffin
3cb2c06b44 Cleanup some issues left over from previous reviews
Bug: 183235980
Test: m nothing
Change-Id: I187765c56b889445de3a4729405ee745e5f73729
2021-03-24 22:08:05 +00:00
Paul Duffin
76e5c8a37f Convert test that disallows non existent paths to use fixtures
This change needed to add some additional files to the registered
files for PrepareForTestWithJavaDefaultModules because otherwise they
would fail when "TestAllowNonExistentPaths = false". Those files were
being added by the TestJavaLintRequiresCustomLintFileToExist (albeit in
some cases in different locations to that required by the default
modules but as the files are needed by the modules defined in
PrepareForTestWithJavaDefaultModules they should be defined in it.

A couple of other places also provided some files so moving them into
PrepareForTestWithJavaDefaultModules caused some conflicts which needed
to be resolved.

Bug: 183184375
Test: m nothing
Change-Id: I76ce9f1673c1c1c4000635b76b8377d582224bf1
2021-03-24 22:08:05 +00:00
Paul Duffin
958408d921 Merge "Cleanup usages of Dex2oatDepTag" 2021-03-24 22:04:58 +00:00
Jingwen Chen
95c6eb3959 Merge "bp2build: add allowlist for package-level conversions." 2021-03-24 21:38:07 +00:00