Commit graph

32460 commits

Author SHA1 Message Date
Ivan Lozano
6cd99e6ab4 Add Rust fuzzing support.
Add a rust_fuzz module which builds a libfuzzer binary that enabes
asan+sancov. This relies on the libfuzzer-sys crate.

Bug: 147140513
Test: Local rust_fuzz example builds, fuzzes with asan+sancov.
Change-Id: I57db3b8d25869791824ccfab768d13b0bb9d42fa
2021-01-25 11:11:10 -05:00
Jingwen Chen
f98384ad80 Merge "bp2build: rename variables for readability." 2021-01-25 14:01:38 +00:00
Riddle Hsu
f17b07fc52 Merge "Revert "Automated NDK API coverage used by Mainline modules build integration."" 2021-01-25 06:15:29 +00:00
Jingwen Chen
4e4756d720 bp2build: rename variables for readability.
Test: go test
Change-Id: I103bbed32844bf7d24c63e7d908630294f7ab20a
2021-01-24 21:13:56 -05:00
Riddle Hsu
556b2ad77e Revert "Automated NDK API coverage used by Mainline modules build integration."
This reverts commit 87ff51db84.

Reason for revert: build breakage b/178327796

Change-Id: I51c56938540794097eda579ebe47fa5c0a4d8c12
2021-01-25 01:44:34 +00:00
Treehugger Robot
f9be4e07e1 Merge "Moving $OUT/vendor-ramdisk-debug.cpio.lz4 to intermediate dir" 2021-01-24 14:53:43 +00:00
Jingwen Chen
32b4ece0c3 bp2build: automatically convert all filegroups.
See build_conversion_test.go for expected outputs.

Test: build_conversion_test.go
Test: GENERATE_BAZEL_FILES=true m nothing &&
./build/bazel/scripts/bp2build-sync.sh write && bazel build
//bionic/libc/tools/...
Test: bazel query //... --config=queryview

Change-Id: I3c54b96c0812f1ea4ab2c95da1bff3d7c5cc4006
2021-01-23 02:26:20 -05:00
Jingwen Chen
fc1ad29e0a Merge "bp2build: framework for generating BazelTargetModules." 2021-01-23 06:39:37 +00:00
Justin Yun
e09ac17466 Check vndk-private with the IsVndkPrivate()
*_available will not provide if a module is VNDK-private or not.
Fixed it by using IsVndkPrivate() with private() interface.

By allowing exclude_from_vendor_snapshot for vendor_available
modules, available() interface is no longer required. Tests are
updated for exclude_from_vendor_snapshot on vendor_available modules.

Bug: 175768895
Test: m nothing
Change-Id: I9ff85256170d59b378a4c354d5c007cfbeacabc5
2021-01-23 01:11:58 +00:00
Colin Cross
9b564c5a22 Merge "Fix mismatch between cc and python for windows prefer32" 2021-01-22 23:34:00 +00:00
Sophie Zheng
0bf77198b5 Merge "Automated NDK API coverage used by Mainline modules build integration." 2021-01-22 22:15:21 +00:00
Dan Willemsen
ba680de96e Merge "Add Mac 11.1 SDK to the allowlist" 2021-01-22 19:05:09 +00:00
Ivan Lozano
71fd1fedc1 Merge "rust: Depend on CC a shared library's TOC, not .so" 2021-01-22 18:57:38 +00:00
Paul Duffin
98325717b1 Merge "Switch dex_bootjars to a singleton module" 2021-01-22 17:42:54 +00:00
Paul Duffin
8479ea296d Merge "Allow createGlobalSoongConfig() to be used from tests" 2021-01-22 17:42:00 +00:00
Paul Duffin
c44075b710 Merge "Add java.RegisterRequiredBuildComponentsForTest function" 2021-01-22 17:41:02 +00:00
Ivan Lozano
ec6e9910e6 rust: Depend on CC a shared library's TOC, not .so
CC libraries generate TOC files which contain the list of exported
symbols. By depending on the TOC file instead of the .so, changes to
shared library dependencies will not result in rebuilding Rust
dependencies as long as the exported symbols remain unchanged. This
should improve incremental build times during development.

This also includes a minor fix where exported linkObjects should be
deduplicated to avoid the same object being included many times.

Bug: 173619911
Test: m libkeystore2; modify a bionic file; m libkeystore2
      doesn't rebuild the rust target.
Change-Id: I6383217c125bf8dd7125a5e013a78754cac4edf2
2021-01-22 11:41:33 -05:00
Hai Zhang
dbc79a737c Merge "Add new dependencies for moving role into module." 2021-01-22 15:30:51 +00:00
Hai Zhang
e9b778fb90 Merge "Add framework-permission-s java_sdk_library." 2021-01-22 14:12:01 +00:00
Liz Kammer
70b1714ca6 Merge "Add conditions_default for soong config variables." 2021-01-22 13:35:30 +00:00
Hai Zhang
496baeec09 Add new dependencies for moving role into module.
Bug: 173606718
Test: build
Test: manually verify role related functionality works
Change-Id: Iba390110453a8e4e24df554901ceadfb2e94ee2a
2021-01-22 11:42:00 +00:00
Hai Zhang
6ff02b2d00 Add framework-permission-s java_sdk_library.
This will host the moved framework classes for role.

Bug: 158736025
Test: build
Change-Id: I567bc46dda319b82e4c165ad89e1636e339f1753
2021-01-22 11:35:49 +00:00
Anton Hansson
4de3c42c73 Merge "Add a better error message for missing api files" 2021-01-22 10:31:15 +00:00
ChengYou Ho
4b197e110b Create Weaver aidl interface
Bug: 176107318
Change-Id: Ia4b628edf1ef51c71af7078818c0adf2a4183d03
2021-01-22 06:34:22 +00:00
Daniel Cardenas
3e2760a539 Merge changes from topic "revert_vendor"
* changes:
  Revert "Speed up vendor snapshot header globs"
  Revert "Truncate vendor snapshot header glob list after filtering it"
2021-01-22 05:12:51 +00:00
Yo Chiang
ef45753438 Merge "Remove GKI artifacts on installclean" 2021-01-22 04:52:03 +00:00
Jingwen Chen
7385067640 bp2build: framework for generating BazelTargetModules.
This CL creates the framework necessary for generating
BazelTargetModules from regular Soong Android modules.
BazelTargetModules are code-generated into Bazel targets in BUILD files.

See the follow-up CL for examples of creating filegroup/genrule
BazelTargetModules.

Test: GENERATE_BAZEL_FILES=true m nothing # creates out/soong/bp2build
with no BUILD files, because there are no BazelTargetModules in the
module graph.

Change-Id: I33a96365bd439043b13af6db9e439592e9983188
2021-01-21 22:46:11 -05:00
Dan Willemsen
5191b00369 Add Mac 11.1 SDK to the allowlist
Historically we've only had to add one major release a year to the Mac
SDK allowlist, but this year the versioning scheme changed and 11.1 is a
minor update to 11 (instead of 10.x.1 like in years past). Unfortunately
the Xcode tools don't let you just specify '11' like they did with
'10.x', so this is more complicated to fix in a scalable way.

Test: build with xcode 12.3 and macOS SDK 11.1
Change-Id: I2e88e9289727261389a863e7147a0b146ec5148a
2021-01-21 14:56:39 -08:00
Christopher Di Bella
490b9d7931 Merge "adds new warnings to Android build (1/2)" 2021-01-21 22:24:51 +00:00
Evgenii Stepanov
298bafdde9 Merge "Support memtag_heap in SANITIZE_TARGET_DIAG, fix cc_test interation." 2021-01-21 20:32:19 +00:00
Sally Yuen
c2aff9e9fd Revert "Speed up vendor snapshot header globs"
This reverts commit 0f93e5b9fb.

Reason for revert: causing extra soong regenerations

Change-Id: I4ed2e5c82dfe3e99fbb9590b80f92c79a27e8025
2021-01-21 20:17:33 +00:00
Sally Yuen
758140ceae Revert "Truncate vendor snapshot header glob list after filtering it"
This reverts commit 3a62a9cc2b.

Reason for revert:  causing extra soong regenerations

Change-Id: I4ceb5334634613a00ac9c312b75c623a8aced8ab
2021-01-21 20:17:07 +00:00
Liz Kammer
432bd598ae Add conditions_default for soong config variables.
Each variable can specify a conditions_default for properties to be used
when the variable is not set, not set to a true value (for bools), or is
set to a value that is not present in the module (for strings).

Test: m nothing
Test: go test soong tests
Change-Id: I76ec026da2369b407f0f530f77760f530e7958fc
2021-01-21 14:25:20 -05:00
sophiez
87ff51db84 Automated NDK API coverage used by Mainline modules build integration.
Add gen_ndk_usedby_apex.sh script to generate NDK API list used by Mainlain modules when modules get build.

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only

Change-Id: Ib1b2f0dd2f9ae85b1545c6cc5bb4c5bbdfac1c15
2021-01-21 18:08:50 +00:00
Bob Badour
73056ea9f8 Add legacy_permissive license kind.
Missed a license kind needed for the large-scale-change. It didn't turn
up in testing until all the --override and --filter flags were
determined.

See: http://go/android-license-checking-v2-lsc

Bug: 151953481
Bug: 151177513
Bug: 67772237

Change-Id: Ic6b5f11717e88504e09d4817e9952d3ed1132b93
2021-01-21 17:58:55 +00:00
Christopher Di Bella
23a991c04e adds new warnings to Android build (1/2)
The following warnings have been turned on, and turned on as errors:

-Wbool-operation
-Wimplicit-int-float-conversion
-Wint-in-bool-context
-Wstring-compare
-Wstring-plus-int
-Wxor-used-as-pow

Test: no extra tests necessary

Change-Id: Ic8ab26de9e5323e9b81ad79eef787abfb264848c
2021-01-21 17:53:42 +00:00
Paul Duffin
1ab6186e91 Switch dex_bootjars to a singleton module
The main difference between a singleton and a singleton module that
affects this change is that the latter requires a module to be defined
in order for the singleton to be instantiated. This change defines the
module in both the tests and the standard build.

Bug: 177892522
Test: m droid
Change-Id: Id6669835cf3a2ab7359fa53047eb9042992a9362
2021-01-21 16:49:34 +00:00
Jiyong Park
1de5a578d2 Merge changes from topic "future_symbol"
* changes:
  API availability should be checked using __builtin_available
  __ANDROID_API__ tracks min_sdk_version
2021-01-21 16:33:05 +00:00
Yo Chiang
d813f12473 Remove GKI artifacts on installclean
Bug: 177495407
Test: m installclean && GKI prebuilts under OUT dir are removed
Change-Id: I05f888376c7f2b253e9966c1a652063a6c4760d9
2021-01-22 00:16:47 +08:00
Paul Duffin
9f04524673 Allow createGlobalSoongConfig() to be used from tests
Previously, the createGlobalSoongConfig() function was explicitly
prevented from being used in tests because it would fail. However, it
turns out that is no longer the case and it does now work.

That allows the following changes to be made:
* Tests no longer need to use GlobalSoongConfigForTests() to
  prepopulate the cache.
* GlobalSoongConfigForTests() is only needed in the dexpreopt
  package.

Bug: 177892522
Test: m nothing
Change-Id: Ifcbb1a44254c5d2d10c1d02ab23227488d1d1ed1
2021-01-21 15:44:30 +00:00
Hyundo Moon
2b7d4e1ba4 Merge "Allow service-media-s in apex" 2021-01-21 15:00:13 +00:00
Treehugger Robot
d684e04247 Merge "LOCAL_REQUIRED_MODULES from apex has ":32" or ":64" suffix" 2021-01-21 14:34:37 +00:00
Paul Duffin
c059c8c9a0 Add java.RegisterRequiredBuildComponentsForTest function
Insulate tests that exercise code in the java package from having to
register the build components provided by the java package by providing
a single function that registers them all. This follows the pattern
currently used in the cc and rust packages.

This change is in preparation for switching the dex_bootjars singleton
from a singleton, which does not require a module definition in order
to be instantiated, to a singleton module which does. That will require
adding a module definition into java.GatherRequiredDepsForTest() and
this change ensures that the required components will have been
registered in every test.

Bug: 177892522
Test: m nothing
Change-Id: I6475db8240894947dd07c89a940a3e4f201aa598
2021-01-21 11:47:32 +00:00
Inseob Kim
ec7cab81f9 Merge "Truncate vendor snapshot header glob list after filtering it" 2021-01-21 06:32:49 +00:00
Hyundo Moon
8bee1b00ea Allow service-media-s in apex
Bug: 175511943
Test: Builds successfully
Change-Id: I5d76087d3c537205e8b8ca837c13ca1aeb641b4c
2021-01-21 02:21:23 +00:00
Colin Cross
3a62a9cc2b Truncate vendor snapshot header glob list after filtering it
Test: m checkbuild
Change-Id: I4847bff5c03844194a9a80e8cb24a60694db6208
2021-01-21 00:46:46 +00:00
Inseob Kim
ab15f9644b Merge "Speed up vendor snapshot header globs" 2021-01-21 00:37:19 +00:00
Jiyong Park
636b767835 Merge changes Ifa1ed8de,I969bf4a2
* changes:
  Sign android_filesystem with avbtool
  Refactor filesystem.go to make it easy to build prop file
2021-01-21 00:21:24 +00:00
Evgenii Stepanov
04896cae35 Support memtag_heap in SANITIZE_TARGET_DIAG, fix cc_test interation.
cc_test without sanitize:memtag_heap acts as if it has implicit
sanitize{memtag_heap:true, diag:{memtag_heap:true}}. This is unaffected
by SANITIZE_TARGET.

Refactor the test to cover all permutations.

Change memtag include lists to act similar to SANITIZE_TARGET_DIAG: the
the sync include list upgrades async targets to sync, unless diag is
explicitly set to false in the target definition.

Bug: b/135772972
Test: cc_test.go

Change-Id: I6a969f2f5804cd5f47fc4e93a20e3b99ea5fa111
2021-01-20 22:27:45 +00:00
Colin Cross
0cec312660 Move reflect.ValueOf out of product variable loop
Calling reflect.ValueOf for every variable for every module was
using ~3 seconds of CPU time on my AOSP builds.

Test: m checkbuild
Change-Id: Idf459ad8ddf5e07f6c0df0e58e2442aaa6ab3342
2021-01-20 19:32:42 +00:00