Commit graph

47510 commits

Author SHA1 Message Date
Colin Cross
aff21fbf3c Track transitive packaged license deps of containers
Containers generally package the transitive installable
dependencies of their direct dependencies, track them as license
deps.

Bug: 207445310
Test: m checkbuild
Change-Id: Ic8640152cee0e0cfec5e85a1649a8adfd29d517a
2022-01-28 15:42:01 -08:00
Treehugger Robot
7afffe6af0 Merge "Allow UWB to use Rust in reference HAL" 2022-01-28 22:08:36 +00:00
Treehugger Robot
52ef4c3373 Merge "Limit JIT tier for javac" 2022-01-28 21:59:05 +00:00
Bob Badour
45923719be Make the Apache 2.0 text available to packages.
It might be useful to associate other library names than "Android"
with the Apache 2.0 license text.

Test: m nothing
Change-Id: I3ccbd9ca77f330bb81bf2bf4ec53cfb873befe8b
2022-01-28 12:55:32 -08:00
Cole Faust
71514c07d2 Remove variableDefinedExpr
VariableDefinedExpr was under-developed, and would not
take into account if a variable was from the globals
or product config dictionary.

It also always emitted `g.get("VARIABLE") != None`, which
is not correct behavior. In this example makefile:

```
MY_VAR :=

ifdef MY_VAR
$(info MY_VAR is defined)
else
$(info MY_VAR is not defined)
endif

ifdef MY_UNDEFINED_VAR
$(info MY_UNDEFINED_VAR is defined)
else
$(info MY_UNDEFINED_VAR is not defined)
endif

MY_VAR ?= true
MY_UNDEFINED_VAR ?= true


$(info MY_VAR after ?= is $(MY_VAR))
$(info MY_UNDEFINED_VAR after ?= is $(MY_UNDEFINED_VAR))


.PHONY: all
all:
	@:
```

We get the output:

MY_VAR is not defined
MY_UNDEFINED_VAR is not defined
MY_VAR after ?= is
MY_UNDEFINED_VAR after ?= is true

So we can see that even if a variable was set, it's considered
not defined if it was set to an empty value. However, ?= works
differently, and does require the != None, so that was left
as is.

Just use a variableRefExpr and rely on the fact
that variables will be truthy if they're defined.

Fixes: 216700361
Test: go test
Change-Id: If8944da2579e8658e3fc4f666b1f3b2815f8c8b1
2022-01-28 19:47:34 +00:00
Jared Duke
0849c14aea Limit JIT tier for javac
javac is generally a short-lived JVM invocation that doesn't greatly
benefit from deep JIT tiering. As such, favor faster startup time
by limiting to tier 1 JIT for javac execution. This should greatly
reduce overall CPU usage from Java compilation for an arbitrary
Android build (~20%), and deliver a small but modest improvement in
overall Java build times (~5%).

Representative incremental build times with this change:
  * real 18m3.507s
  * user 563m4.838s
and without:
  * real 19m11.909s
  * user 751m27.790s

Follow-up changes will apply similar flags for other short-lived JVM
build commands.

Bug: 205303544
Test: m
Change-Id: Ic6315b976063f4330902930a6cf5e5cb394c554c
2022-01-28 11:39:47 -08:00
Sam Gilbert
e607988f01 Adding metalava team to OWNERS to be able to disable metalava checks that will break platform build.
Change-Id: Ic560361afc8d982422beef33049278bf480e3964
2022-01-28 18:34:08 +00:00
Jiakai Zhang
e6e90db00a Allow installing boot images outside of APEX for prebuilt.
This change is similar to aosp/1947127, but for prebuilts.

After this change, if `bootImageConfig.installDirOnDevice` is set to a
path outside of the APEX, the build system will build a boot image from
the dex files and the profile extracted from the prebuilt APEX.
Otherwise, it keeps the current behavior: extracting the boot image from
the prebuilt APEX.

This is a no-op change. Current behavior is not affected.

Bug: 211973309
Test: m nothing
Test: -
  On internal master:
  1. Patch aosp/1947128.
  2. Patch ag/16743847 and ag/16746804.
  3. m SOONG_CONFIG_art_module_source_build=false com.google.android.art
  4. See the boot image being installed in `/system/framework/<arch>`.
Change-Id: I24ca525309fecaf3ab7a67960fbf118cd00ecd1d
2022-01-28 15:08:06 +00:00
Keyi Gui
0107901dec Merge "Add new file name to output inputs/outputs of actions of modules into a new file when m json-module-graph is executed." 2022-01-28 14:39:31 +00:00
Pedro Loureiro
e4c255cb04 Merge "Add special case for test-only module in configuredJars method" 2022-01-28 09:50:36 +00:00
kgui
67007248a5 Add new file name to output inputs/outputs of actions of modules into a new file when m json-module-graph is executed.
And also delete the logic in droidstubs to output JSONDataActions.

Test: local.

Change-Id: Ib5d6f1f69c16c41f128e481131775c7699f96464
2022-01-28 13:52:50 +08:00
Treehugger Robot
c7afdefa26 Merge "Add option to generate BTF debug info for bpf programs" 2022-01-28 01:51:05 +00:00
Jiakai Zhang
87847baf41 Remove the primary boot image from the ART APEX.
Move to `/system/framework`.

Bug: 211973309
Test: m
Change-Id: I80ffd9160654a2de96038250b9e9a28ecdba0a81
2022-01-27 23:17:24 +00:00
Chih-hung Hsieh
7892c6d76d Merge "Add tidy.md document" 2022-01-27 23:07:25 +00:00
Treehugger Robot
cd22b62add Merge "Revert "Reland "Enable hwasan use after scope detection.""" 2022-01-27 22:54:24 +00:00
Treehugger Robot
428d5ad909 Merge changes I728208ed,Ifdb50809
* changes:
  [cc] Add per-file OWNERS for cc/coverage.go
  [cc/coverage] Override/disable -Wframe-larger-than
2022-01-27 22:17:29 +00:00
Treehugger Robot
6bf833f428 Merge changes from topic "musl_rust"
* changes:
  Support building rust modules against musl libc
  Support genrules as CrtBegin and CrtEnd in rust
  Support multiple crtbegin and crtend dependencies
2022-01-27 21:39:18 +00:00
Connor O'Brien
2573965c5e Add option to generate BTF debug info for bpf programs
Add "btf" option that generates BTF debug info to support easier map
inspection. This is accomplished by passing the "-g" flag to clang
when compiling the BPF program.

The "-g" option also generates a number of DWARF debug sections which
are not necessary for loading BTF information, so strip these to avoid
increasing file size unnecessarily. bpfloader currently only supports
BTF info for maps, not programs, so we also strip the .BTF.ext section
containing program BTF info.

Bug: 203823368
Test: libbpf_load_test
Test: verify time_in_state.o includes .BTF section iff "btf: true" is
set
Test: verify time_in_state.o still loads if BTF is enabled
Change-Id: Ica25b253bace59d04130b0210350188399889bbe
Signed-off-by: Connor O'Brien <connoro@google.com>
2022-01-27 12:00:45 -08:00
Chih-Hung Hsieh
22c27e8458 Add tidy.md document
Test: make
Change-Id: Ic2198532be4135401faffdda34d0e108c57b241c
2022-01-27 11:02:17 -08:00
Pirama Arumuga Nainar
0d7d3e1647 [cc] Add per-file OWNERS for cc/coverage.go
Test: N/A
Change-Id: I728208ed9ef10e032fd12e495ba67121e4c849e5
2022-01-27 10:49:13 -08:00
Pirama Arumuga Nainar
f776c8c47c [cc/coverage] Override/disable -Wframe-larger-than
We can expect frame size increase with coverage instrumentation.

Test: N/A
Change-Id: Ifdb50809c83939ded5a26804aa0ae9404eb1a107
2022-01-27 10:47:55 -08:00
Pirama Arumuga Nainar
1785fcb171 Merge "[rust/coverage] Remove obsolete WAR to pass -z,start-stop-gc" 2022-01-27 18:37:40 +00:00
Pirama Arumuga Nainar
7ac26891cf Merge "[docs] Add README for native code coverage" 2022-01-27 18:29:12 +00:00
Liz Kammer
2b376bca00 Create subdir for cc rules.
Test: mixed_libc.sh
Change-Id: I7f43f283f40ad6236dcedfccae175a007ea252d2
2022-01-27 11:16:34 -05:00
Trevor Radcliffe
13ae63c7e3 Merge "Remove res and assets in androidmk if default" 2022-01-27 14:53:14 +00:00
Sam Delmerico
2882dcb74b Merge "product variables are consumed via soong injection" 2022-01-27 14:31:08 +00:00
Sam Delmerico
af20c7cad1 Merge "build device binary for java_test_host" 2022-01-27 14:30:39 +00:00
Pirama Arumuga Nainar
2b34678ce2 [docs] Add README for native code coverage
Publish internal doc at go/android-native-coverage-local-workflow to
AOSP so it's available publicly.

Also add OWNERS for this file.

Test: N/A
Change-Id: I8d25e840b83294e90743d1cb8ff8d86a4579e34a
2022-01-27 05:16:45 +00:00
Yi Kong
a86875eefb Merge "Add tests for afdo.go" 2022-01-27 04:27:28 +00:00
Florian Mayer
fd337b3963 Revert "Reland "Enable hwasan use after scope detection.""
This reverts commit 0edaddf2ce.

Reason for revert: b/http://b/214007768

Change-Id: I60a2e3a5386601992fcb5632c142dd28bdb611b2
2022-01-27 03:31:28 +00:00
Kousik Kumar
3ff037e3d9 Move env var config loading to be within the config package.
When the environment variable config file is loaded after config object
is initialized, we  end up loading the USE_RBE variable in the config
file after the code to start reproxy process is run. This causes a
problem when USE_RBE variable itself is set in the config files. To
avoid this, I've moved the config file loading code to be within the
config package, this makes the main.go file cleaner too.

Test:
Ran a build with USE_RBE:true set in the config json file. The build
fails without this change and succeeds with this change.

Bug: b/209486170
Change-Id: Iab3957b64f4b5456a861057d16ad318f4f78e0cb
2022-01-26 18:40:43 -05:00
Pirama Arumuga Nainar
668da23096 [rust/coverage] Remove obsolete WAR to pass -z,start-stop-gc
Bug: http://b/199203503

Rust's llvm-project source now includes  https://reviews.llvm.org/D97448
and we no longer need this workaround.

Test: m unicode-xid_test_src_lib and verify __llvm_prf_data section is
      present.
Change-Id: I0387bd3af8bfc765f3aba3b309bfbc7ef49d565d
2022-01-26 21:39:49 +00:00
Sam Delmerico
b3342ce580 build device binary for java_test_host
This commit adds support for a java_host_test that requires a target
binary to run. If the binary has host and target variants and is added
as a dependency in the `data` attribute, then the host variant is used.
Instead, we need a way to force the use of the target variant.

Bug: 182919153
Test: add code from aosp/1647282/1 && atest AuthFsHostTest
Change-Id: I68a6259b41a5e6809e1b82eec3122ffdf5067f56
2022-01-26 19:57:27 +00:00
Sam Delmerico
5c32bbf910 product variables are consumed via soong injection
Currently the list of product variables and whether they are arch-variant is
hard-coded. Instead, we can generate this data from the Soong Product_variables
struct and use soong_injection to consume it in Bazel.

Bug: 209801976
Test: m bp2build && build/bazel/ci/mixed_libc.sh
Change-Id: I8a91030950407a10832765f15eb010899d73da26
2022-01-26 19:26:09 +00:00
Liz Kammer
91ee673ccd Merge "Reverse order of tag and android module checks" 2022-01-26 18:53:40 +00:00
Pedro Loureiro
561c7765de Add special case for test-only module in configuredJars method
Same pattern used for com.android.sdkext / test_framework-sdkextensions

Test: m nothing
Test: also tried this with related CLs that make use of this
functionality

Bug: 195732042
Change-Id: I5adfb0e8650e2e262bf646e56b29965798d0a42f
2022-01-26 18:48:07 +00:00
Treehugger Robot
2d305010af Merge "[cc/tidy] Disable cert-err33-c" 2022-01-26 10:34:58 +00:00
Yi Kong
d5954a2a92 Add tests for afdo.go
Bug: 79161490
Test: presubmit
Change-Id: I686b5226aad5011ab30a0a105f8c7866cd610502
2022-01-26 17:46:33 +08:00
Yi Kong
3440d0d474 Merge "Sampling PGO deprecation" 2022-01-26 05:43:42 +00:00
Wei Li
a61dbd457e Merge "Add bp2build support for property "compressible" of apex module." 2022-01-26 01:37:09 +00:00
Treehugger Robot
f73658bdc6 Merge "[NFCI] Change llvm-ar '-format' to be '--format'." 2022-01-26 00:53:36 +00:00
Pirama Arumuga Nainar
5fc137b63b [cc/tidy] Disable cert-err33-c
Bug: http://b/216364337

This check warns when return values of standard-library functions
(including fprintf, snprintf) are not checked. Some of these warnings
turn to error when tidy_checks_as_errors in Android.bp.

Disable this for now and follow-up after compiler update to disable or
fix individual instances.

Test: Build with new compiler
Change-Id: I5af89b3f9cea4961c69708c51d22c510d478405b
2022-01-25 15:45:06 -08:00
Trevor Radcliffe
82cf9a7d4b Remove res and assets in androidmk if default
Test: new tests in androidmk_test and bpfix_test. Ran against file.
Fixes: 209019903
Change-Id: I5fc9005302c006b3205b4cbd04cef7c2aca40bc8
2022-01-25 23:10:21 +00:00
Matthew Maurer
2f90708221 Allow UWB to use Rust in reference HAL
Bug: 216358770
Change-Id: If0be032a248f6258232e2e47c489983b5416c536
2022-01-25 22:40:12 +00:00
Wei Li
f034cb4d7b Add bp2build support for property "compressible" of apex module.
Bug: 214466457
Bug: 207551677
Test: b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Test: b test //build/bazel/tests/apex:build.bazel.examples.apex.minimal_apex
Test: b test //build/bazel/tests/apex:build.bazel.examples.apex.minimal_capex

Change-Id: I6bf12c1b0c52d4486968bb430a67a3c3110766db
2022-01-25 19:42:43 +00:00
Mitch Phillips
ed0dd76eaa [NFCI] Change llvm-ar '-format' to be '--format'.
Upcoming versions of the toolchain (at least when I was locally testing)
drop support for the single-dashed argument type. Fixing this ahead of
time as to hopefully avoid the toolchain-release-blocking bug in future
:).

Bug: N/A
Test: Build the platform.
Change-Id: Ia2c6dcb19556f1979f9a6ecfd3a0ec58fb73e36e
2022-01-25 10:35:50 -08:00
Yi Kong
470f76f589 Sampling PGO deprecation
Everything is now switched over to AFDO, let's deprecate sampling PGO.

Keep the code around for a little while longer in case anything needs to
revert back.

Test: presubmit
Change-Id: Ibd838bbd0e1157343fcdc2eca40de5b99126fe6f
2022-01-26 02:34:34 +08:00
Jooyung Han
620dc3f4f9 Merge "Linkerconfig with namespace contribution" 2022-01-25 16:01:31 +00:00
Treehugger Robot
efdc4f4d42 Merge "Allow static binaries to enable AFDO" 2022-01-25 08:35:03 +00:00
Jooyung Han
e5b0a0a4a0 Linkerconfig with namespace contribution
APEX can contribute search paths to linker namespaces.

Bug: 216208308
Test: linkerconfig_diff_test
Change-Id: I3f9b85d7a491b9ac841b0e454c707b4d6c150654
2022-01-25 17:13:15 +09:00