Commit Graph

41219 Commits

Author SHA1 Message Date
Paul Duffin b99e587b53 Merge "Move hidden API index file rule to platform_bootclasspath" am: a4b0d08b83 am: 7c03047b40 am: 3d82eade0b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674031

Change-Id: Ic8c404fde66d962f167f432322b13892a2260e7a
2021-04-15 11:22:37 +00:00
Jooyung Han d0b3d926ca Merge changes from topic "linkerconfig" am: 1f105f1338 am: d2da4c0e0c am: 167d7f127e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675470

Change-Id: Ic2e5911abe1b98055c889215f66452c3d725324b
2021-04-15 11:21:39 +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
Paul Duffin a9a8e07643 Merge "Move hidden API metadata file rule to platform_bootclasspath" am: fd105d469c am: c552799891
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674033

Change-Id: I8eee029810dffcc3f9c0c2f69419713f84ed2144
2021-04-15 10:54:33 +00:00
Paul Duffin 86963f54bc Merge "Move handling of prebuilt hiddenapi-index.csv to hiddenapi singleton" am: e2243eac3a am: 0b48ba43c4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674032

Change-Id: I119f06b49f3653298a5fb4439e3a632cf1ea027c
2021-04-15 10:54:13 +00:00
Paul Duffin 3d82eade0b Merge "Move hidden API index file rule to platform_bootclasspath" am: a4b0d08b83 am: 7c03047b40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674031

Change-Id: I16b705f3690a259ececa010388dd37e973d1d201
2021-04-15 10:54:02 +00:00
Jooyung Han 167d7f127e Merge changes from topic "linkerconfig" am: 1f105f1338 am: d2da4c0e0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675470

Change-Id: Ib2102513eaff3bddcdab9e8eed2a339bacf32699
2021-04-15 10:53:33 +00:00
Paul Duffin c552799891 Merge "Move hidden API metadata file rule to platform_bootclasspath" am: fd105d469c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674033

Change-Id: I6e93df1e344f7fbd9e1c286231ff9d5435595d81
2021-04-15 10:12:03 +00:00
Paul Duffin 0b48ba43c4 Merge "Move handling of prebuilt hiddenapi-index.csv to hiddenapi singleton" am: e2243eac3a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674032

Change-Id: I406b0388693a8e0dd155c49d68a00e830f9c6781
2021-04-15 10:11:55 +00:00
Paul Duffin 7c03047b40 Merge "Move hidden API index file rule to platform_bootclasspath" am: a4b0d08b83
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674031

Change-Id: I56975b04e1061ce984c361cc2c0473278104efac
2021-04-15 10:11:06 +00:00
Jooyung Han d2da4c0e0c Merge changes from topic "linkerconfig" am: 1f105f1338
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675470

Change-Id: I213d0934633706852669c074ddfd7d7c858a11c8
2021-04-15 10:08:31 +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
Lukacs T. Berki a6110524ac Speed up Soong integration tests. am: 686965baeb am: 741156319a am: c8b9cbbfbe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675872

Change-Id: I504c9cd538b8bef67a3141f2330ede4090500851
2021-04-15 09:11:08 +00:00
Treehugger Robot 9560f3e20b Merge "Add prebuilt_root module" am: 017a1bb7c9 am: 3ca173bcd1 am: 560b2ade74
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663965

Change-Id: I0b0a4f40212ccefb65d4251b9a22157ca261d9a2
2021-04-15 09:11:02 +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 c8b9cbbfbe Speed up Soong integration tests. am: 686965baeb am: 741156319a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675872

Change-Id: I5d3cf3fe3f75767b78469e080e27ebe47e54f496
2021-04-15 07:37:13 +00:00
Treehugger Robot 560b2ade74 Merge "Add prebuilt_root module" am: 017a1bb7c9 am: 3ca173bcd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663965

Change-Id: I0886d4cd36c972f7139b6ac4c30e7f2445b5c154
2021-04-15 07:37:06 +00:00
Treehugger Robot 8c7ceeccdd Merge "Transform paths to headers in include dirs to take package boundaries into account." am: b06a4bd400 am: 42599cfc57 am: 36c57bdfb3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1673638

Change-Id: I8a1ec7755fdafe6c8eb71ccb3765bb9e44c8fd72
2021-04-15 07:20:30 +00:00
Treehugger Robot 3c58641466 Merge changes from topic "userdebug_plat_sepolicy.cil_Android.bp" am: 638830a5a0 am: d8a1386fba am: 7d5dc83e3b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674328

Change-Id: Ic6146823d24ddbfcc7706d33ee2d17bad9471325
2021-04-15 07:20:23 +00:00
Inseob Kim 1e9e06373e Add path tests for ramdisk am: d9580b84a2 am: df6f8f8fa8 am: 5271dce3dd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674327

Change-Id: I9b199042d08b0e6022c7e2a281e622ec2b87b420
2021-04-15 07:20:19 +00:00
Lukacs T. Berki 741156319a Speed up Soong integration tests. am: 686965baeb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675872

Change-Id: Idd4b6d7e4c453fe7c62b8a78461aa0b90644f0b8
2021-04-15 07:15:07 +00:00
Treehugger Robot 3ca173bcd1 Merge "Add prebuilt_root module" am: 017a1bb7c9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663965

Change-Id: I67b46d0de174cab21a1feebb90e5aacd4fcc54fa
2021-04-15 06:51:26 +00: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
Treehugger Robot 36c57bdfb3 Merge "Transform paths to headers in include dirs to take package boundaries into account." am: b06a4bd400 am: 42599cfc57
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1673638

Change-Id: I738f4a9bb96ef16e27a1f2c5335488540814fcc0
2021-04-15 06:30:53 +00:00
Treehugger Robot 7d5dc83e3b Merge changes from topic "userdebug_plat_sepolicy.cil_Android.bp" am: 638830a5a0 am: d8a1386fba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674328

Change-Id: I9c5ab13c7bf8beb6f5a3dc3bfdad738c196975bd
2021-04-15 06:30:47 +00:00
Inseob Kim 5271dce3dd Add path tests for ramdisk am: d9580b84a2 am: df6f8f8fa8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674327

Change-Id: Iec929aa7a3f0b52254a9730b9e30d44b2e708cbc
2021-04-15 06:30:43 +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 42599cfc57 Merge "Transform paths to headers in include dirs to take package boundaries into account." am: b06a4bd400
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1673638

Change-Id: I642c73b4f008b75907f1ad6c700226e18ab7be08
2021-04-15 06:10:31 +00:00
Treehugger Robot 507c35d88f Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." am: d820c37425 am: 6ff0d4084e am: 4182f482f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672705

Change-Id: I4c10f9ccf8cbaae2dc0e3b953e7c4db0368f073a
2021-04-15 05:50:56 +00:00
Treehugger Robot d8a1386fba Merge changes from topic "userdebug_plat_sepolicy.cil_Android.bp" am: 638830a5a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674328

Change-Id: I1433033b6be9ca1bf81f283df01be3a0384bd8ce
2021-04-15 05:45:12 +00:00
Inseob Kim df6f8f8fa8 Add path tests for ramdisk am: d9580b84a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674327

Change-Id: I128281177de9109e7e47fb78689377296134b860
2021-04-15 05:44:25 +00: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
Treehugger Robot 4182f482f4 Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." am: d820c37425 am: 6ff0d4084e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672705

Change-Id: I7d7e9705f3ca41b245603a36677a219a96acbb02
2021-04-15 05:21:00 +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 6ff0d4084e Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." am: d820c37425
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672705

Change-Id: Iaaf3bc97fb9d337eb0fc258b4278a3d120965512
2021-04-15 04:42:26 +00:00
Treehugger Robot e22e9c13b1 Merge "Truncate vbmeta to 64KB" am: ccaf57c65a am: 392bf674e7 am: a9dac13ab3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675465

Change-Id: I74c33c8201fa3445fe8f3bfed34453eb872e35df
2021-04-15 04:21:09 +00:00
LuK1337 955d0e72f2 Make sure prebuilt modules are exported before attempting to use them am: fb545bf2f3 am: fa52ea69bf am: 2e434b4f70
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1545468

Change-Id: Ic4ecbedbe6c11992232ea3981b002de4d988bf2b
2021-04-15 04:21:00 +00:00
Treehugger Robot d820c37425 Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." 2021-04-15 03:49:38 +00:00
Treehugger Robot a9dac13ab3 Merge "Truncate vbmeta to 64KB" am: ccaf57c65a am: 392bf674e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675465

Change-Id: Ie8af2a64718421f97d01c5396a3c9a74e34ebe46
2021-04-15 03:30:53 +00:00