Commit graph

47417 commits

Author SHA1 Message Date
Liz Kammer
da0b38772d Merge "Create subdir for cc rules." 2022-02-10 14:16:07 +00:00
Nicolas Geoffray
2b2d9392fc Merge "Revert "Switch to clang-r445002"" 2022-02-10 14:15:46 +00:00
Nicolas Geoffray
83b2b326b7 Revert "Switch to clang-r445002"
This reverts commit d950ab8bb3.

Reason for revert: Breaks Java math tests
Test: atest libcore.java.math.RunCSVTestsStrict

Change-Id: Ief6d0422fda991616afa59f5ce419aee5ac26a58
2022-02-10 09:58:50 +00:00
Cole Faust
3cb45a5f4a Merge "Update warning message" 2022-02-10 02:13:54 +00:00
Treehugger Robot
26cb965d2f Merge "In Soong, set max files soft limit to hard limit" 2022-02-09 23:16:10 +00:00
Treehugger Robot
9deb87e8e2 Merge "Escape cc ldflags in bp2build conversion" 2022-02-09 23:05:01 +00:00
Pirama Arumuga Nainar
111817435a Merge "Switch to clang-r445002" 2022-02-09 18:55:08 +00:00
Liz Kammer
4ae119c14c In Soong, set max files soft limit to hard limit
Test: m nothing
Change-Id: I4f45ebcf8c7b74315c371012603aeb7c541ae336
2022-02-09 13:16:23 -05:00
Treehugger Robot
948c340160 Merge "enable auto_service_plugin bazel build" 2022-02-09 17:48:49 +00:00
Steven Moreland
0a8dd14614 Merge "bpf: support installing to vendor" 2022-02-09 17:28:16 +00:00
Treehugger Robot
5974423b06 Merge "Add package for printing starlark formatted data" 2022-02-09 04:48:33 +00:00
Steven Moreland
606c5e9e99 bpf: support installing to vendor
Bug: 140330870
Test: use bpf{} to install bpf program to vendor and have it
  successfully loaded and installed by Android's bpfloader.

Change-Id: If0aac3098e39498f0238516ec839b6ac910cc61e
2022-02-09 00:45:02 +00:00
Liz Kammer
72beb34609 Add package for printing starlark formatted data
Bug: 216168792
Test: build/bazel/ci/bp2build.sh
Change-Id: I3a06b19396f7ffe1c638042cda7e731dd840f1d6
2022-02-08 17:32:28 -05:00
Chih-hung Hsieh
def9bf2c1c Merge "Use only single dash for tidy flags" 2022-02-08 22:13:47 +00:00
Cole Faust
f4e72cf642 Update warning message
As requested on aosp/1975486

Fixes: 217248902
Test: Presubmits
Change-Id: I14e65722d8ab96125827d34e8501b4a518a27b57
2022-02-08 13:10:26 -08:00
Treehugger Robot
3e7f5c411d Merge "Use -fno-sanitize-link-runtime for bionic sanitizers" 2022-02-08 20:33:43 +00:00
Treehugger Robot
cb1703d8b1 Merge "Link to documentation about variables in include statements" 2022-02-08 20:04:57 +00:00
Aditya Belsare
43832f6136 Merge "Add cert_validator to allowed rust paths" 2022-02-08 19:40:13 +00:00
Cole Faust
076b9c26e9 Merge "Remove --root, require the cwd to be the root" 2022-02-08 18:34:27 +00:00
Yu Liu
febce2dfa7 Merge "Support bssl hash injection for libcrypto." 2022-02-08 16:59:34 +00:00
Jingwen Chen
db07f002b8 Merge "Omit musl related cc_genrules from bp2build." 2022-02-08 07:43:51 +00:00
Aditya Belsare
c0bd27b3b0 Add cert_validator to allowed rust paths
Test: m libcert_request_validator works

Change-Id: I40b8027e98a775dc1b9d3a8ab4431c12d6088c12
2022-02-08 07:32:31 +00:00
Treehugger Robot
c7bf27ba7a Merge "Export htmlnotice, xmlnotice, and textnotice." 2022-02-08 05:52:14 +00:00
Jingwen Chen
f6b4cd4bcd Omit musl related cc_genrules from bp2build.
These trigger a few failure modes (duplicate genrule srcs, failure in
matching config conditions, depending on unconverted soong_zip host
tool).

Test: CI
Bug: 218405924
Change-Id: I15c119803a057e94ef6a941df3b58103d42eb4e4
2022-02-08 04:47:48 +00:00
Treehugger Robot
cf637f101c Merge "Disable tidy default DeprecatedOrUnsafeBufferHandling check" 2022-02-08 03:30:31 +00:00
Colin Cross
234b01de96 Use -fno-sanitize-link-runtime for bionic sanitizers
Currently when using sanitizers and building for the device
the -fsanitize= argument is not passed to the linker so that the
linker won't add the runtimes, which have already been added
as explicit dependencies.  Pass -fno-sanitize-link-runtime instead
in case the linker has other behaviors when passed -fsanitize=
besides adding the runtimes.  Also check for bionic instead of host
so that linux bionic gets the same linker behavior as bionic for
the device.

Test: m USE_HOST_MUSL=true host-native
Test: m checkbuild
Change-Id: I0f2966e2fd4ae8adc5cb21eb116c349bcc0c668f
2022-02-08 01:35:23 +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
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
eae56c8a52 Merge "Use soong's finder to find included makefiles in mk2rbc" 2022-02-07 22:20:46 +00:00
Yu Liu
75be7b94d6 Support bssl hash injection for libcrypto.
Bug: 215541108
Test: Build libcrypto with Bazel and verify the hash injected, add unit
test
Change-Id: I0375307aab0b1e60a8be298d680e1e0af1ebb454

Change-Id: I9133ce398e2024fe7834a292bf2f5ba3222d630b
2022-02-07 14:15:42 -08: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
7dbdfac3cc Link to documentation about variables in include statements
As requested in aosp/1962181

Fixes: 217248902
Test: Presubmits
Change-Id: Ib0f99a4b86999782bfcf3ccf89375a929cf5127f
2022-02-07 12:31:20 -08:00
Cole Faust
9b6111aaed Remove --root, require the cwd to be the root
This allows us to use relative paths everywhere.
It also produces more accurate emulation of TOPDIR,
which should be an empty string.

Bug: 213508006
Test: go test
Change-Id: Ie4e357687486e84e9f4aad0f6776d8feb2b9fc63
2022-02-07 11:45:01 -08: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
e95d77b964 Merge "Add support for excluding libraries from class loader contexts" 2022-02-07 17:52:27 +00:00
Treehugger Robot
c01e074fef Merge "Update error messages for failed globs." 2022-02-07 17:24:23 +00:00
Elliott Hughes
b039496446 Merge "Disable BTI for now." 2022-02-07 17:02:56 +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
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
Chih-Hung Hsieh
63d59eb77c Use only single dash for tidy flags
* Work around RBE preprocessor bug, which rejects double dash flags.

Bug: 217778010
Test: make tidy-soong_subset
Change-Id: Ic7c0a95ae7afefb49cc9d124fd3c9f38fe2e0f56
2022-02-04 20:34:27 -08:00
Ramji Jiyani
47cb940902 Merge "system_dlkm: Add in list of partitions to clean" 2022-02-05 02:33:11 +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