Commit graph

4922 commits

Author SHA1 Message Date
Paul Duffin
74bd800c1b Merge "Allow namespace config to be tested properly" am: 73d394dec2 am: 38a5a9e80e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2292017

Change-Id: I6e071ee574a1b268fc262a68a278cb2f7398bd67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 15:04:48 +00:00
Paul Duffin
73d394dec2 Merge "Allow namespace config to be tested properly" 2022-11-14 14:08:40 +00:00
Kevin Dagostino
6413e4c5d6 Add tools/asuite/atest/ to keep existing BUILD file list am: 92f33d91f3 am: feec939161
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2283141

Change-Id: I04f9dffc506ffe3ba473897c8ab5399f88170086
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-13 07:24:38 +00:00
Kevin Dagostino
92f33d91f3 Add tools/asuite/atest/ to keep existing BUILD file list
Test:  b build tools/asuite/... && b cquery tools/asuite/...
--output=files

Change-Id: I2696327a60e770d0929ccc1baa3b4af703a2269d
2022-11-12 04:43:17 +00:00
Vinh Tran
fbab01aaff Merge "Remove AfdoAdditionalProfileDirs product variable" am: 59834cc56d am: a5dc2c61f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2280499

Change-Id: Ic6f8f37580a190372779ba27511ff4afd879dfc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 14:27:31 +00:00
Vinh Tran
7a8362c252 Remove AfdoAdditionalProfileDirs product variable
AfdoAdditionalProfileDirs is unconnected to build/make/core/soong_config.mk and is currently unused. Removing AfdoAdditionalProfileDirs will cut down on complexity when we migrate the support of auto-fdo profiles to Bazel cc rules.

b/258684450 proposes an alternative to support the use cases that were meant to be supported by AfdoAdditionalProfileDirs.

Test: existing go tests
Bug: 253540178
Change-Id: I024e48598a560717a1d6c19b16bde3fe65ff1961
2022-11-11 03:29:31 +00:00
Liz Kammer
c9a5956299 Merge "Increase testing of request_type" am: dbb9fe8e92 am: 210a0fec14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2295498

Change-Id: Ie83e70ebdef3638b4636045606b044db3768b7c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 14:26:18 +00:00
Liz Kammer
dbb9fe8e92 Merge "Increase testing of request_type" 2022-11-10 13:30:58 +00:00
Sam Delmerico
bd9dd9cbd4 add --norun_validations to bazel build action am: 658a4da53b am: 129ca36465
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2285613

Change-Id: Ic35af1b5af657834b4482630f0c43ad7e43b1871
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 02:02:38 +00:00
Sam Delmerico
129ca36465 add --norun_validations to bazel build action am: 658a4da53b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2285613

Change-Id: I6ad7d6283203adfc33484989cbcd7b023904fafe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 01:32:52 +00:00
Treehugger Robot
01dd619766 Merge changes from topic "clang-tidy-mixed-builds"
* changes:
  add tidy files to mixed builds
  add --norun_validations to bazel build action
2022-11-10 01:00:15 +00:00
Treehugger Robot
e7c27be299 Merge "Add com.android.tzdata to AOSP staging allowlist." am: b7c01a261d am: af11f89f41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2294457

Change-Id: I2a8fe6b8ab88ba30348654c0899f8c017c297f44
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 20:50:59 +00:00
Liz Kammer
1b7ed9bcbc Increase testing of request_type
Test: go test soong tests
Change-Id: Iacb773a91a4cc097320f06ea1d1669c5923f8076
2022-11-09 11:22:11 -05:00
Jingwen Chen
264f631a6c bazel apex: Add mixed builds support for <module>_using.xml file. am: 1ec7785ec5 am: 112492c0ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2290033

Change-Id: I3e2cf964542dbfe25fe02337cd0922dfabf525e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 10:22:27 +00:00
Jingwen Chen
dece457443 Add com.android.tzdata to AOSP staging allowlist.
Test: presubmits
Change-Id: I7d9edb56273375579edf3b8a5466570df6073668
2022-11-09 09:30:03 +00:00
Jingwen Chen
1ec7785ec5 bazel apex: Add mixed builds support for <module>_using.xml file.
This file contains the java APIs parsed by the 'dexdeps' tool within the gen_java_usedby_apex.sh.

Bug: 239084755
Fixes: 239084755
Test: presubmits
Change-Id: Ia271783a6be3ea3a343481306cde1aaba2166e88
2022-11-09 06:30:03 +00:00
Romain Jobredeaux
f2e561a1de Merge "Sort allowlist ascii-betically" am: 64340c0539 am: 8f837dd07a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2289840

Change-Id: Iedc083919f8242fd357236bee4dca2836c4c9f2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 22:59:00 +00:00
Romain Jobredeaux
64340c0539 Merge "Sort allowlist ascii-betically" 2022-11-08 21:57:45 +00:00
Paul Duffin
3f7bf9fa0d Allow namespace config to be tested properly
Previously, the NewTextContext created a context that always called
NewNameResolver with a export filter that always returned true.

This change fixes that by:
1. Changing NewNameResolver to take a Config parameter instead of a
   filter parameter and pushing the code to create the filter from the
   Config from newNameResolver() in cmd/soong_build/main.go into the
   NewNameResolver function.

2. Extracting a newTestContextForFixture that does not create a
   NameResolver or set it on the context. That avoids creating a
   NameResolver before the test has prepared the config.

3. Modify the fixture to create and set the NameResolver in the Context
   after the config has been prepared by the test.

4. Added test to verify that it all works.

Bug: 234825639
Test: m nothing
Change-Id: Ie4b13f18093dc01a0ab65a9ecfd143585d843b55
2022-11-08 17:38:56 +00:00
Chris Parsons
9ae89243b5 Refactor "staging dep on prod" allowlist dep am: 66fc74509f am: 0adc255647
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2288153

Change-Id: Iaf0a7986117efba27acfca543434bf55442af690
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 17:07:42 +00:00
Chris Parsons
66fc74509f Refactor "staging dep on prod" allowlist dep
This allows branch-specific plugins to more easily add modules to
staging or prod mode allowlists (they need not separately ensure that
staging mode is a superset of prod mode)

Bug: 254447469
Test: TH
Test: Verified that adding tzdata modules via plugin (not part of
this CL) causes many outputs under bazel-out directories

Change-Id: I5d543e262a42cce324c59e3f9880b57ca209c13c
2022-11-08 05:54:19 +00:00
Jingwen Chen
c56789eaee Merge "Call rm -rf in mixed build build statement preamble." am: 1214001184 am: 6fbdd21df0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2290034

Change-Id: I5014cda9bb3b7bd202daa5fe123a79992f392175
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 00:23:38 +00:00
Jingwen Chen
1214001184 Merge "Call rm -rf in mixed build build statement preamble." 2022-11-07 23:03:43 +00:00
Liz Kammer
564a28313d Merge "Add apex_test for mixed builds" am: f1c70ed5ad am: 22f7ad00ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2288161

Change-Id: Ib075a6e3c8ab03d3ab197574f89a198a297ccfc7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-07 22:56:10 +00:00
Liz Kammer
f1c70ed5ad Merge "Add apex_test for mixed builds" 2022-11-07 21:56:02 +00:00
Sam Delmerico
658a4da53b add --norun_validations to bazel build action
Validation actions were being run before the build environment was set
up and causing build errors. Turn off validation actions in this phase
because they will be run later in the Ninja invocation.

Bug: 195029134
Test: build/bazel/ci/mixed_libc.sh
Test: verify that Ninja build file contains commands to generate tidy
  files that are generated by these validation actions
Test: delete a tidy file in mixed builds mode, and verify that it is
  rebuilt
Change-Id: I371572d5662913c5637e39c8894eeb6ee53d00ac
2022-11-07 15:58:19 -05:00
Paul Duffin
88d96be91a Avoid loss of ninja_deps events am: 780a185ede am: bd0b8f72c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2287715

Change-Id: I7f5be19e1c4cb3d85c1acacf47e6bae32a9da956
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-07 19:16:50 +00:00
Romain Jobredeaux
77488afdc1 Sort allowlist ascii-betically
Change-Id: I49b62fdc2446bd0a88305ce1243c80cc8b7bc680
2022-11-07 16:56:12 +00:00
Liz Kammer
0e255ef6e6 Add apex_test for mixed builds
Test: go test soong tests
Change-Id: I33327e1fe7d6a4bbf32890d9fbd5453c28a9c5b1
2022-11-07 11:11:37 -05:00
Jingwen Chen
f3b1ec39eb Call rm -rf in mixed build build statement preamble.
https://android-review.git.corp.google.com/q/topic:bazel_using_txt added
a tree artifact output for an action. This CL adds "-r" to the rm calls
to support deleting the old tree artifact outputs.

Test: presubmits
Fixes: 257956807
Change-Id: Ia44b1bef4f8031fe75a239fb162972e8827e3c19
2022-11-07 15:10:04 +00:00
Paul Duffin
780a185ede Avoid loss of ninja_deps events
Previously, writeDepFile was passed a copy of the main EventHandler to
which it then added an event. Adding an event requires appending
information to slices in the EventHandler structure. As the slices are
a copy the addition only affects the copy and are not present in the
EventHandler which is written out as part of the metrics.

This change fixes that by passing a pointer to an EventHandler into
writeDepFile. For consistency it also replaces a few other uses of
EventHandler with *EventHandler instead.

Bug: 257590265
Test: m nothing
      # Check generated text metrics to make sure they don't contain ninja_deps.
      # Apply this change.
      m nothing
      # Check generated text metrics to make sure they do contain  ninja_deps.
Change-Id: I0fa0f2b08844cb7c7b4e99b37602703deb43ad20
2022-11-07 14:12:11 +00:00
Treehugger Robot
853775f23c Merge "Rename ApexCqueryInfo to ApexInfo" am: d6dec6f51e am: 0b320cfe37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2288160

Change-Id: I6046ba4b8ece0f31fad1155ba2af9aa1f82de3b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-05 02:01:08 +00:00
Treehugger Robot
223fd02f39 Merge "Add missing t.Helper() to androidmk functions" am: 17d0a8509b am: 410ca59d64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2288159

Change-Id: I02f4316a2429837434c8e5911502ba4d6267669d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-05 02:01:00 +00:00
Treehugger Robot
d6dec6f51e Merge "Rename ApexCqueryInfo to ApexInfo" 2022-11-05 00:36:45 +00:00
Treehugger Robot
17d0a8509b Merge "Add missing t.Helper() to androidmk functions" 2022-11-05 00:34:42 +00:00
Treehugger Robot
b722151544 Merge "Make PackageVarContext implement PathGlobContext" am: 979c953ac0 am: 24ac949eba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2285524

Change-Id: Id8be5ba19fd69128a54db15280168650b668e380
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 22:44:45 +00:00
Treehugger Robot
979c953ac0 Merge "Make PackageVarContext implement PathGlobContext" 2022-11-04 20:50:04 +00:00
Liz Kammer
be6a712767 Rename ApexCqueryInfo to ApexInfo
cquery is redundant given this is in the cquery package.

Test: go test soong tests
Change-Id: Ib38794b712f548129eec964b8fd85bf8401a5f86
2022-11-04 16:24:37 -04:00
Liz Kammer
6be6906429 Add missing t.Helper() to androidmk functions
Test: go test soong tests
Change-Id: I534aef51afa91a0942f58b3987e9c1cb3f3c75cb
2022-11-04 16:24:32 -04:00
Colin Cross
662d61430f Make PackageVarContext implement PathGlobContext
Make PackageVarContext implement PathGlobContext by implementing
GlobWithDeps.  This will allow calls to ExistentPathForSource
inside a VariableFunc to use optimized glob dependencies instead of
falling back to AddNinjaFileDeps, which is resulting in extra
dependencies from soong_build on top level directories, triggering
extra Soong regenerations.

Remove the fallback path in ExistentPathForSource by making it take
a PathGlobContext, which is now a superset of PathContext.

Rewrite TestNinjaDeps to not rely on the unoptimized glob dependencies
in VariableFuncs and instead call ctx.Config().AddNinjaFileDeps
directly.

Bug: 257079828
Test: test_create_global_include_directory
Change-Id: I48cf189157d78b9252d339dbc9baeb27e4694807
2022-11-04 09:04:02 -07:00
Usta (Tsering) Shrestha
de430d1d4d Merge "add test for ShouldKeepExistingBuldFileForDir()" am: 9478303673 am: 6d7aded12e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2283373

Change-Id: Ibcd32ff90dec16cddf822cf2a7aaf351dee5ff11
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 03:56:58 +00:00
Usta (Tsering) Shrestha
9478303673 Merge "add test for ShouldKeepExistingBuldFileForDir()" 2022-11-03 02:44:08 +00:00
Ibrahim Kanouche
72f4247f43 Merge "Export SBOM utility to make" am: 2d1eb1238d am: 8cd8989284
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2283139

Change-Id: Id1148e354a82cd9e3b005ced7d0070e5a4a7d01b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 01:00:03 +00:00
Ibrahim Kanouche
2d1eb1238d Merge "Export SBOM utility to make" 2022-11-03 00:03:21 +00:00
Usta Shrestha
342f28f9bf add test for ShouldKeepExistingBuldFileForDir()
Bug: N/A
Test: Added
Change-Id: I15dc543f65bffdd745ecfe5c8fe521723eeffbc0
2022-11-02 17:21:41 -04:00
Ibrahim Kanouche
5797d8c7f5 Export SBOM utility to make
Bug: 257094286

Test: m compliance_sbom
Change-Id: I2a8de6350c3a5b24cd3b3fd03312955ce1a3dba9
2022-11-02 19:17:30 +00:00
Cole Faust
aea1011a24 Merge "Revert^4 "Prevent unspecified values in soong_config_string_variables"" am: acf417b085 am: a7ed7193ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2280937

Change-Id: I493c3ea79ccf6b7ec925863bfc160d47c43993c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-02 18:10:26 +00:00
Cole Faust
acf417b085 Merge "Revert^4 "Prevent unspecified values in soong_config_string_variables"" 2022-11-02 16:56:45 +00:00
Steve Elliott
8a35f07280 Add kotlinx.coroutines to "neverallow" allowlist am: 8053f82697
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/20224345

Change-Id: I95d2ea15334461c52491f2df8d092fc7576b2c12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-01 21:23:59 +00:00
Cole Faust
b0a91330bb Revert^4 "Prevent unspecified values in soong_config_string_variables"
This reverts commit b7b2e12475.

Reason for revert: Issues on -plus-aosp branches have been fixed

Change-Id: Ie2f7ce45502b999280e099d9c0f9d0f7d6b7ba08
2022-11-01 17:10:23 +00:00