Commit graph

47580 commits

Author SHA1 Message Date
Treehugger Robot
54da56d074 Merge "Export htmlnotice, xmlnotice, and textnotice." am: c7bf27ba7a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976067

Change-Id: I8af530424f85017d37272c65e95e096242748973
2022-02-08 06:05:57 +00:00
Treehugger Robot
c7bf27ba7a Merge "Export htmlnotice, xmlnotice, and textnotice." 2022-02-08 05:52:14 +00:00
Treehugger Robot
ccf8597e8a Merge "Disable tidy default DeprecatedOrUnsafeBufferHandling check" am: cf637f101c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976066

Change-Id: Icdde9e0d5820fc7f45d3e2165b151f40774af987
2022-02-08 03:48:48 +00:00
Treehugger Robot
cf637f101c Merge "Disable tidy default DeprecatedOrUnsafeBufferHandling check" 2022-02-08 03:30:31 +00:00
Jooyung Han
601cb3422d Merge changes I11693286,I8d79a434 am: 472be14f26
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1972300

Change-Id: Ic6352169bdd3883d1f8646816dd51fc31e68f269
2022-02-08 01:21:16 +00:00
Jooyung Han
472be14f26 Merge changes I11693286,I8d79a434
* changes:
  VNDK libs use "unique" APEX variants
  use_vndk_as_stable APEX shouldn't include VNDK lib
2022-02-08 01:03:41 +00:00
Treehugger Robot
4c8f8b8c00 Merge "Close opened paths" am: 217a70e713
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1972548

Change-Id: I9976b7ad0c2bbf00e3ed8c7d2e72ffd2c1eb636d
2022-02-08 00:56:53 +00:00
Chih-Hung Hsieh
9bcce2ef3a Disable tidy default DeprecatedOrUnsafeBufferHandling check
This will suppress warning like:
system/chre/chpp/app.c:637:3: warning: Call to function 'memset' is insecure
as it does not provide security checks introduced in the C11 standard.
Replace with analogous functions that support length arguments or provides
boundary checks such as 'memset_s' in case of C11
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

Test: WITH_TIDY=1 CLANG_ANALYZER_CHECKS=1 make tidy-system-chre-chpp_subset
Change-Id: I87a7bba31aa10260fc408317a8cd54bf80c03152
2022-02-07 16:44:13 -08:00
Treehugger Robot
217a70e713 Merge "Close opened paths" 2022-02-08 00:33:04 +00:00
Treehugger Robot
3baafe54cb Merge "Use soong's finder to find included makefiles in mk2rbc" am: eae56c8a52
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1962180

Change-Id: I964fa2c1fe7b79133b30d9ea801b39f339c1ab60
2022-02-07 22:32:57 +00:00
Treehugger Robot
eae56c8a52 Merge "Use soong's finder to find included makefiles in mk2rbc" 2022-02-07 22:20:46 +00:00
Treehugger Robot
5e73b06ea2 Merge "Close more files." am: 56f3510cd2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1975187

Change-Id: I3602a83708dafadced820db77beef12dc2e71f1a
2022-02-07 22:09:20 +00:00
Treehugger Robot
1b5ecbe412 Merge "Add logging of file resource limits in Soong" am: 1aa1f1aa95
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1975186

Change-Id: I571bc03719fb29f12fa4c3b51ba0e056338e0313
2022-02-07 22:09:02 +00:00
Treehugger Robot
56f3510cd2 Merge "Close more files." 2022-02-07 21:52:24 +00:00
Treehugger Robot
1aa1f1aa95 Merge "Add logging of file resource limits in Soong" 2022-02-07 21:49:56 +00:00
Cole Faust
8d47c48082 Use soong's finder to find included makefiles in mk2rbc
Having soong generate a list of makefiles for mk2rbc
to look through is much faster than having mk2rbc search
itself. Profiling the readLinesFromeFile() function that
reads the list of makefiles shows it takes on the order
of 200 microseconds, much faster than the ~5 seconds
it takes for mk2rbc to search the tree itself.

This CL also allows include statements that are prefixed
with a variable. The concern with this was that there
would be a lot of load statemnts emitted for generic
include statements, causing the generated code to look
ugly, and converting and loading all those files could
cause performance issues. On the performance issues
front, there's already a check that it doesn't result
in over 150 potentially included files. We can lower
that number if necessary, but it's probably good for now.
On the generated code front, while it's true that it's
ugly, it's better to have working but ugly generated
code than refusing to generate anything working at all.

To ensure the soong finder step isn't slowed down due
to having to find a bunch of new makefiles, I profiled
the combination of newSourceFinder and FindSources in main.go:

Baseline incremental:
338.011634ms
340.853335ms
348.541762ms
333.229644ms
349.124824ms

Baseline clean:
1.003836419s
1.006203912s
996.193648ms
1.031005604s
1.03691152s

Modified incremental:
349.029285ms
349.264496ms
351.774948ms
337.63187ms
359.425306ms

Modified clean:
1.028238704s
1.053103506s
1.032757506s
1.016631201s
1.04288108s

So we can see the times are barely affected by this change.

Fixes: 213508006
Test: go test
Change-Id: Iab18bfb127ba3b7e63f2c01f69064805a8398764
2022-02-07 11:41:28 -08:00
Liz Kammer
a754178d4f Add logging of file resource limits in Soong
Test: m nothing and verify in logs
Change-Id: I4b51089ce1d222927a180b260fb9bc0e3b77c468
2022-02-07 13:38:52 -05:00
Liz Kammer
7fe2400039 Close more files.
Test: m nothing
Change-Id: I4914337feb4ee2499c270b8504a097a2fd597ab3
2022-02-07 13:18:15 -05:00
Paul Duffin
ab9e6fe18f Merge "Add support for excluding libraries from class loader contexts" am: e95d77b964
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1971343

Change-Id: I32610e4f518feb3d1727b68b6249a3a50c3c6fd2
2022-02-07 18:10:40 +00:00
Paul Duffin
e95d77b964 Merge "Add support for excluding libraries from class loader contexts" 2022-02-07 17:52:27 +00:00
Treehugger Robot
f0fcf896f9 Merge "Update error messages for failed globs." am: c01e074fef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1973544

Change-Id: I73d481f03f51bebc04fc5d785a7fea821d1e3784
2022-02-07 17:41:37 +00:00
Treehugger Robot
c01e074fef Merge "Update error messages for failed globs." 2022-02-07 17:24:23 +00:00
Elliott Hughes
188a5f90d8 Merge "Disable BTI for now." am: b039496446
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1969222

Change-Id: Ibe76896bc4fbb50a1178f06c4aca56255d532b52
2022-02-07 17:17:46 +00:00
Elliott Hughes
b039496446 Merge "Disable BTI for now." 2022-02-07 17:02:56 +00:00
Treehugger Robot
fd08d7e9a5 Merge "Allow installing boot images outside of APEX for prebuilt." am: 210957500c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1964908

Change-Id: Iaa94a53e524e046b1c03a1db808cdff29da13152
2022-02-07 16:11:23 +00:00
Treehugger Robot
210957500c Merge "Allow installing boot images outside of APEX for prebuilt." 2022-02-07 15:58:36 +00:00
Liz Kammer
b7da8e4d54 Merge "Disable targets broken on host due to missing deps" am: 2d29982265
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1972761

Change-Id: I700b453c69a9271fa86cf6248cf1f4c860867421
2022-02-07 15:30:03 +00:00
Liz Kammer
0fe123dcdf Close opened paths
Test: m nothing
Change-Id: I7fcc8e2fdbca1cd231ff1e72b02156f12078072b
2022-02-07 10:17:35 -05:00
Liz Kammer
2d29982265 Merge "Disable targets broken on host due to missing deps" 2022-02-07 15:16:10 +00:00
Paul Duffin
0653057603 Add support for excluding libraries from class loader contexts
A number of tests in the cts/tests/signature/api-check check for the
accessibility of classes from the android.test.base,
android.test.runner and android.test.mock libraries. Some tests expect
to find the classes other do not. Unfortunately, the tests use
libraries, specifically compatibility-device-util-axt, that depend on
the android.test... libraries which causes Soong to implicitly add
<uses-library> entries to the manifest so that they will be accessible
at runtime. That causes the tests that do not expect to find the
classes to fail.

Bug: 209607558
Test: m nothing
Change-Id: I54c194ab23d5a70df790ece3fe98f2b3d6a1c1f6
2022-02-07 14:57:53 +00:00
Liz Kammer
0ea7998208 Update error messages for failed globs.
Currently error messages appear like:
&fs.PathError{Op:"open", Path:"..." Err:0x18}
which make them difficult to parse.

Test: CI
Change-Id: I18da18abc43230d0ea37d166179d07e585077f51
2022-02-07 08:56:47 -05:00
Ramji Jiyani
819a7dbf94 Merge "system_dlkm: Add in list of partitions to clean" am: 47cb940902
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1973346

Change-Id: I36fd24a733c26fed1b62dd2d158b3247f15f6b62
2022-02-05 02:49:23 +00:00
Ramji Jiyani
47cb940902 Merge "system_dlkm: Add in list of partitions to clean" 2022-02-05 02:33:11 +00:00
Treehugger Robot
1cc8b23a02 Merge "Remove unnecessary --warn-shared-textrel flags." am: 56fc48c482
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1973342

Change-Id: Ifcf2580f4627e84911cd4cbcd476a66a050cd022
2022-02-05 00:14:56 +00:00
Treehugger Robot
56fc48c482 Merge "Remove unnecessary --warn-shared-textrel flags." 2022-02-04 23:58:41 +00:00
Ramji Jiyani
f0afc9539c system_dlkm: Add in list of partitions to clean
CI builds are doing m installclean between them;
which is not causing the system_dlkm to clean
it's build.prop and it is stuck to the first CI
build when feature landed causing ota signing
test to fail.

Local reproduction using:
m installclean && m -j96 && m dist
validate_target_files out/dist/*target_files-*.zip

Bug: 217507332
Test: Local verification, TH & Forrest
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I97f2011a61252d3cb798af0fab99221b754328ca
2022-02-04 23:12:00 +00:00
Bob Badour
6076882950 Export htmlnotice, xmlnotice, and textnotice.
Bug: 151177513
Bug: 210912771

Test: m all dist
Test: flash; About Phone -> Legal Information -> Third-party licenses

Change-Id: I9b9e3a67230dae6236ee5c5d6dc6edbc23c5a91d
2022-02-04 11:39:26 -08:00
Sam Delmerico
c9c5269342 Merge "add target_compatible_with stanza for host targets" am: 75664acd70
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1966480

Change-Id: I317035307deef6c79fac903c8d9c14e82b5874cf
2022-02-04 19:33:52 +00:00
Sam Delmerico
75664acd70 Merge "add target_compatible_with stanza for host targets" 2022-02-04 19:15:04 +00:00
Stephen Hines
a66590a98d Remove unnecessary --warn-shared-textrel flags.
This flag has never done anything for ld.lld, since it has this behavior
by default (and actually can't turn it off either). It's now being
removed as a valid flag from ld.lld, so it's time for Android to drop
the unnecessary flags. See https://reviews.llvm.org/D118942.

Test: builds
Change-Id: I22c344b7a55e275c1fbd5fef25f85e97a39de5c4
2022-02-04 11:02:17 -08:00
Liz Kammer
a20b7a72ab Disable targets broken on host due to missing deps
Test: bp2build.sh
Change-Id: I8617c97954deaa985a1ff67cf4ca4d97207f6913
2022-02-04 13:08:03 -05:00
Liz Kammer
a26a05e7cd Merge "Allowlist additional com.android.runtime blockers" am: cc1a2062f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1965179

Change-Id: I72bb4c433910c459751da6b4795aa1bbe17c3a2d
2022-02-04 14:32:47 +00:00
Liz Kammer
cc1a2062f0 Merge "Allowlist additional com.android.runtime blockers" 2022-02-04 14:17:32 +00:00
Chih-Hung Hsieh
176015cae6 Disable gnu-designator warnings. am: 9df9dd4d13
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1971467

Change-Id: I5b08c75931d0c7f31eef5c04ac0133720ea81c9e
2022-02-04 12:41:46 +00:00
Chih-Hung Hsieh
9df9dd4d13 Disable gnu-designator warnings.
Bug: 217613071
Test: make
Change-Id: I51a6afdf6d4b1549d2e3b65168c3cce52d8e197d
2022-02-04 00:30:20 -08:00
Jooyung Han
91f9203af4 VNDK libs use "unique" APEX variants
In case there are two vendor apexes(one with "use_vndk_as_stable:true",
and the other with "use_vndk_as_stable:false") a VNDK lib used by both
will have "APEX" variant and the former APEX will use "apex" variation.

For example,

 apex1(use_vndk_as_stable) -> foo -> libvndk
 apex2 -> bar -> libvndk

Since foo, bar and libvndk are mutated into two APEX variations("",
"apex10000"), foo will use the apex variation of libvndk.

To fix this, VNDK libs can use "unique" APEX variations. Then, in the
above example, foo will have "myapex1" variation and libvndk will have
two APEX variations("" and "apex2"). So foo will link to ""(non-APEX)
variation as fallback.

Bug: 216847402
Test: m nothing (soong tests)
Change-Id: I116932860ef79e22dc338a58b251e3ca693ab4f3
2022-02-04 13:07:14 +09:00
Jooyung Han
c5a967630e use_vndk_as_stable APEX shouldn't include VNDK lib
Even though a vendor APEX sets use_vndk_as_stable:true it was possible
to include a VNDK lib by directly depending on it with
native_shared_libs.

But it's contradictory to have a VNDK lib while declaring not to include
VNDK libs. It was missing since pruning dependencies on VNDK libs was
done only for transitive deps.

Added a check to reject this.

Bug: 216847402
Test: m nothing(running soong tests)
Change-Id: I8d79a434b1bfe8e563cf8968fa76830b0e582f66
2022-02-04 13:07:11 +09:00
Romain Jobredeaux
abf2323829 Merge "Use common java library attributes for android_app bp2build converter." am: 99a81c8dfd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1969119

Change-Id: I124df7f67ba7066b73bd3bc3c234e5c1b78aec07
2022-02-03 21:29:01 +00:00
Romain Jobredeaux
99a81c8dfd Merge "Use common java library attributes for android_app bp2build converter." 2022-02-03 21:09:26 +00:00
Sam Delmerico
75539d62ae add target_compatible_with stanza for host targets
Soong modules that are specific for the host platform (e.g.
java_library_host, cc_binary_host, java_genrule_host, etc.) should
not be built on the target platform (Android), so we add a
target_compatible_with attribute to skip this type of module on an
Android target build.

Bug: 215229742
Test: go test ./bp2build
Change-Id: Ifb76ef4e0dc4cb3adb6a64b5c375ce36f7973e48
2022-02-03 19:25:12 +00:00