Commit graph

35122 commits

Author SHA1 Message Date
Treehugger Robot
d419826d8b Merge "ApiLevel of "" and "core_platform" is FutureApiLevel" 2021-04-16 23:35:42 +00:00
Paul Duffin
53e5f2a996 Merge "Migrate sdk tests away from checkAndroidBpContents" 2021-04-16 21:50:00 +00:00
Liz Kammer
ebf17ee04a Merge "Split bazel -path functions and clarify docs" 2021-04-16 20:38:43 +00:00
Treehugger Robot
744fb40e5f Merge "Denylist two targets that fail for non-x86_64" 2021-04-16 19:56:56 +00:00
Paul Duffin
e1381887ae Migrate sdk tests away from checkAndroidBpContents
Replaces a single call to checkAndroidBpContents(...) with separate
calls to check the versioned and unversioned Android.bp files.

Test: m nothing
Bug: 179354495
Change-Id: I270bf73909958d97b2f298e8d7f6d10a1f75ae71
2021-04-16 18:48:20 +01:00
Pirama Arumuga Nainar
27b5e614c8 Merge "Switch to clang r416183b 12.0.5." 2021-04-16 16:39:34 +00:00
Liz Kammer
cefa3c75be Denylist two targets that fail for non-x86_64
Test: demo.sh full
Fixes: 185582610

Change-Id: I620029eaaa7dc46d2434c382867b08eacbd9eb91
2021-04-16 11:51:06 -04:00
Treehugger Robot
3eb2312db6 Merge "Clean up package names." 2021-04-16 13:46:22 +00:00
Treehugger Robot
0b21bf60b6 Merge "Document stubs in cc_library." 2021-04-16 11:57:32 +00:00
Jooyung Han
9dac6d6c51 Merge "Add filesystem_test.go" 2021-04-16 10:48:37 +00:00
Lukács T. Berki
86b38024c5 Merge "Colorize the name of the test to be run." 2021-04-16 05:55:05 +00:00
Jooyung Han
9706cbc1e9 Add filesystem_test.go
It has only one test function as a starting point.

Bug: n/a
Test: m (soong tests)
Change-Id: I785b096805014a40dfd600f7baaf884f4016c23c
2021-04-16 13:20:02 +09:00
Jeongik Cha
06d6373bbe Merge "Made ManifestPath OptionalPath instead of Path" 2021-04-16 03:40:51 +00:00
Treehugger Robot
53932eca91 Merge "Fix discordance between marshall/unmarshall for ArchType" 2021-04-16 03:36:29 +00:00
Jiyong Park
7b4fb51919 Merge changes Ib07d4410,I0b306292
* changes:
  ApexInfo doesn't pass MinSdkVersion as string, but as ApiLevel
  Remove nativeApiLevelFromUserWithDefault
2021-04-15 23:21:55 +00:00
Treehugger Robot
7548b1ad05 Merge "Remove draft API support." 2021-04-15 22:58:15 +00:00
Pirama Arumuga Nainar
8a71786b52 Switch to clang r416183b 12.0.5.
Bug: http://b/182416735
Test: Treehugger

Change-Id: Ibc26561baaec925c2c05ae710de24aaaab18bef5
2021-04-15 20:22:01 +00:00
Dan Albert
192131e36b Merge "Update stub definition docs." 2021-04-15 19:59:43 +00:00
Bob Badour
414719e915 Clean up package names.
Use license name unless package name is given.

Change the package name for the default android license to Android.

Test: m all
Change-Id: I0049b08fc4955a838e33c8bcfed104dbbf8ec7b1
2021-04-15 12:43:39 -07:00
Thiébaud Weksteen
45c647d4dc Merge changes I59439b77,I7dbaf8be
* changes:
  bloaty: measure stripped Rust binaries
  rust: do not strip static library
2021-04-15 18:46:32 +00:00
Liz Kammer
620dea6720 Split bazel -path functions and clarify docs
Test: go test
Change-Id: I62f58998fc7d52c67ed5acfdb8230d404b2a5472
2021-04-15 13:00:42 -04:00
Colin Cross
9e7cea2c0b Merge "Add test for globs on noop incremental builds" 2021-04-15 16:42:08 +00:00
Treehugger Robot
107f92efbe Merge "Handle boot jars on /system_ext correctly." 2021-04-15 16:30:03 +00:00
Lukacs T. Berki
7a51907346 Colorize the name of the test to be run.
Test: Presubmits.
Change-Id: Ie1335f9fb91c199874e37d74d0853e8f441cc294
2021-04-15 18:18:45 +02:00
satayev
76f88384c4 Merge "Generate classpaths.proto config for *CLASSPATH variables." 2021-04-15 16:07:13 +00:00
Paul Duffin
d9d1102b35 Merge "Rename hidden API types ..Augmentation.. to ..FlagFile.." 2021-04-15 15:29:18 +00:00
Paul Duffin
bca75b1f77 Merge "Generalize hiddenAPIAugmentationInfo to make it easier to use" 2021-04-15 15:29:07 +00:00
Ulya Trafimovich
e736e13a8d Handle boot jars on /system_ext correctly.
When Soong looks for boot jars among all modules, it applies certain
constraints to each module that looks like a boot jar (e.g. that it
comes from the right apex or platform). Previously these constraints did
not handle boot jars on /system_ext correctly (they were handled like
apex jars, while they should be handled like platform jars).

Bug: 154976937
Test: m nothing (the modified Soong test would fail previously)
Change-Id: I0746a2fd276ab5ef0400340c5b61cf26c2570e5a
2021-04-15 15:07:06 +01:00
Liz Kammer
bc080da38f Merge "Add test case for too many splits" 2021-04-15 13:40:42 +00:00
Lukács T. Berki
a52ae26e91 Merge "Make bp2build be more correct." 2021-04-15 13:32:30 +00:00
Nikita Ioffe
5b94c8c007 Merge changes I83828f58,I1179235e
* changes:
  Generate hashtree for compressed apexes
  Don't compress apexes produced by apex_test module
2021-04-15 11:40:43 +00:00
Lukacs T. Berki
d518e1a407 Make bp2build be more correct.
It now handles adding .bp files and changing globs.

In order to do this, depfiles are now written separately from RunBlueprint.

This is necessary due to the confluence of a number of seemingly
unrelated factors:

1. The glob filelist dependencies are discovered in globSingleton
2. Singletons need to be registered because otherwise singleton module
   types panic
3. Singletons don't work because they require mutators bp2build does not
   run

Due to (1), we would need to run the glob singleton. However, due to (2)
and (3), we can't run singletons and have to run Blueprint with
StopBeforeGeneratingBuildActions, which is when the build actions
writing glob files would be generated. So what happens is:

1. When bp2build is run, the glob singleton is disabled
2. At the end of bp2build, the list of glob files is artifically added
   to the depfile of the workspace marker file
3. When build.ninja is generated, the Ninja file containing the glob
   list file is written by the now-active glob singleton

Test: Presubmits.
Change-Id: I3c5898d8c57c554a93520276c64a952afc912dbe
2021-04-15 13:06:16 +02:00
Pedro Loureiro
53d69eb028 Merge "Introduce NewApi lint checks" 2021-04-15 11:04:47 +00:00
Lukács T. Berki
3d76d5d6b8 Merge "Allow running bp2build as part of a regular build." 2021-04-15 11:03:51 +00:00
Thiébaud Weksteen
e4dd14b25f bloaty: measure stripped Rust binaries
Modify bloaty's MeasureSizeForPath to allow a module to provide multiple
paths. This is used to measure both unstripped and stripped
libraries/binaries. Add unit test to ensure correct measurements are
generated for Rust.

Test: m out/soong/binary_sizes.pb.gz
Change-Id: I59439b77dbf1cf5ad71e1c02996a6a90938536b4
2021-04-15 12:02:51 +02:00
Paul Duffin
4616977948 Rename hidden API types ..Augmentation.. to ..FlagFile..
Augmentation was too abstract this makes it clearer.

Bug: 177892522
Test: m nothinge
Change-Id: I60ad005e68d9e15b01bcb46bc6a9b7f84d8bfd43
2021-04-15 10:45:39 +01:00
Paul Duffin
e3dc6608cb Generalize hiddenAPIAugmentationInfo to make it easier to use
Previously, each category of flag file had its own property in the
hiddenAPIAugmentationInfo struct that required a lot of repetition
to use. This change moves the flag file specific handling into a
new hiddenAPIFlagFileCategory struct which allows use of the
hiddenAPIAugmentationInfo struct to be parameterized.

Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
      by this change
Change-Id: I4413134c0c9382139bef3813f847e453f426692c
2021-04-15 10:45:39 +01:00
Paul Duffin
fd105d469c Merge "Move hidden API metadata file rule to platform_bootclasspath" 2021-04-15 09:41:44 +00:00
Paul Duffin
e2243eac3a Merge "Move handling of prebuilt hiddenapi-index.csv to hiddenapi singleton" 2021-04-15 09:41:31 +00:00
Paul Duffin
a4b0d08b83 Merge "Move hidden API index file rule to platform_bootclasspath" 2021-04-15 09:40:37 +00:00
Jooyung Han
1f105f1338 Merge changes from topic "linkerconfig"
* changes:
  Add 'merge' command to conv_linker_config
  make linker_config OutputFileProducer
  Allow uninstallable linker_config to be packaged
2021-04-15 08:49:25 +00:00
Jiyong Park
c702204306 ApiLevel of "" and "core_platform" is FutureApiLevel
If sdk_version is set to "", it means the module is built with the
in-development version of the platform APIs. "core_platform" means the
in-development version of the core Java APIs. In both cases, the API
level (i.e. which version to use) is the in-development version.

Bug:  1663140
Test: m

Change-Id: Ia184190341223e9ac12710a8bb3a25004fd4f539
2021-04-15 16:53:23 +09:00
Lukacs T. Berki
686965baeb Speed up Soong integration tests.
This is done by running a build before the first test case, tarring up
$TOP (including out/) then untarring it for every test case instead of
rebuilding soong_build each time.

The speedup is approximately 2x.

Also add some cute ANSI escape sequences and delineation of individual
test cases.

Test: The aforementioned integration tests.
Change-Id: I6a98660cfe6a40bcaa978e8d7544cdffad86a7fa
2021-04-15 08:47:39 +02:00
Lukacs T. Berki
f8e2428c5d Allow running bp2build as part of a regular build.
This is done by setting the INTEGRATED_BP2BUILD environment variable
when invoking the build.

Even though the name of the marker file insinuates that a Bazel
workspace is already created, this is not the case yet.

An issue that remains is that a .d file is not written for the marker
file so it won't be rebuilt if a .bp file changes. Fixing this requires
delicate surgery because writing the .d file is the result of delicate
interplay between Soong and Blueprint.

There are also a number of semi-related fixes:

- The name of soong.environment.{used,available} is now on the command
  line of soong_build (soong_docs is still special cased because its
  command line in the Ninja file is taken from the os.Args of
  soong_build so it's not trivial to remove the --{available,used}_env
  from it
- bp2build writes a separate soong.environment.used file
- I had to call SetAllowMissingDependencies() separately when creating
  the android.Context for bp2build so that bp2build runs in the
  integration tests (it was not obvious how not to do this)
- Fixed a number of integration tests where a command with an expected
  exit code of 1 was used as the last one in a test case, thereby
  breaking the test suite

Test: Presubmits.
Change-Id: Ibeb61c26022cf801dcb98505b4039151b3409873
2021-04-15 08:46:07 +02:00
Treehugger Robot
017a1bb7c9 Merge "Add prebuilt_root module" 2021-04-15 06:31:53 +00:00
Jiyong Park
4eab21d5a2 ApexInfo doesn't pass MinSdkVersion as string, but as ApiLevel
ApexInfo is not part of the properties struct. It can handle structs
having private fields.

Bug: 1663140
Test: m
Change-Id: Ib07d4410f0ce187c9de347da34b84b814b2eb537
2021-04-15 15:17:54 +09:00
Treehugger Robot
b06a4bd400 Merge "Transform paths to headers in include dirs to take package boundaries into account." 2021-04-15 05:42:40 +00:00
Treehugger Robot
638830a5a0 Merge changes from topic "userdebug_plat_sepolicy.cil_Android.bp"
* changes:
  Add debug ramdisk variant
  Add path tests for ramdisk
2021-04-15 05:22:35 +00:00
Jiyong Park
ee9b117038 Remove nativeApiLevelFromUserWithDefault
... in favor of proptools.StringDefault

Bug: 1663140
Test: m
Change-Id: I0b3062921b25179cd1bf53856973fb67fe5cfc05
2021-04-15 14:00:00 +09:00
Treehugger Robot
d820c37425 Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." 2021-04-15 03:49:38 +00:00