Commit Graph

46175 Commits

Author SHA1 Message Date
Treehugger Robot
b1a12462a9 Merge "Share cFlags, tidyFlags, etc. in a module" 2021-09-16 02:20:25 +00:00
Paul Duffin
5554ca9d07 Rename nativeLibInfoProperties.archType to archSubDir am: 96f1832762 am: 9f266a87a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826227

Change-Id: Ifc020e69c047ba6e30b16a33ad08f572effa82ee
2021-09-16 00:24:19 +00:00
Paul Duffin
9f266a87a8 Rename nativeLibInfoProperties.archType to archSubDir am: 96f1832762
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826227

Change-Id: If868e6df94bbb3d25d2a6a30dc0bb34ef9773c88
2021-09-16 00:09:24 +00:00
Martin Stjernholm
b1e61cb8bc Remove fallback code path for missing BCP fragments that is no longer
necessary.

#codehealth

Test: m nothing
Bug: 179354495
Change-Id: Iaddf163e69b52cef82d522311e81bef9bdb4aa8d
2021-09-16 00:55:53 +01:00
Chih-Hung Hsieh
b8082295b6 Share cFlags, tidyFlags, etc. in a module
* In builder.go, share common flags in a module.
  * This replaces the sharing of cflags/cppflags/asflags in cc.go.
  * A unit test in apex_test.go now fails and is commented out.
    It is a failing test hidden by old optimization in cc.go.
* In module.go, expand the reference variable $someflags<n>,
  or ${someflags<n>} to keep many existing unit tests work as is.
* The build.ninja size was reduced from 8.1GB to 6.2GB,
  for aosp_arm64-eng WITH_TIDY=1 USE_RBE=true,
  and from 7.5GB to 5.6GB when USE_RBE is 0.
  Content of build.ninja is also more readable and searchable.
  Read/write build.ninja times are also reduced,
  depending on disk I/O speed.

Test: make WITH_TIDY=1
Change-Id: I17f96adf4844136d52e5d40f57a19d9e290162b7
2021-09-15 16:05:41 -07:00
Paul Duffin
96f1832762 Rename nativeLibInfoProperties.archType to archSubDir
Previously, the archType field was a string not an android.ArchType and
was used as the subdirectory into which arch specific files were
copied. This renames the field to archSubDir and clarifies the usage.

Bug: 195754365
Test: m nothing
Change-Id: Id4d6de12b40ee21e41bcd8b96a0ff04eaf615a80
2021-09-15 17:59:14 +01:00
Adrian Roos
abda2b7474 Merge "Revert "Preopt APEX system server jars."" am: 79839d94c1 am: 755a09490f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1827535

Change-Id: Iedd4451747168a23a0d39f07eb75a20def89bc6d
2021-09-15 15:08:57 +00:00
Adrian Roos
755a09490f Merge "Revert "Preopt APEX system server jars."" am: 79839d94c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1827535

Change-Id: I2281010a93a89b69b859272627c7eac0d7e6d3ed
2021-09-15 14:53:58 +00:00
Adrian Roos
79839d94c1 Merge "Revert "Preopt APEX system server jars."" 2021-09-15 14:31:42 +00:00
Liz Kammer
e477d67f50 Merge "Expand handling of unconverted deps in bp2build" am: 83d07a4c41 am: a191dc0520
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1811096

Change-Id: I240d79257cdf4d0fad468f9ef51560d0ed8636da
2021-09-15 14:18:26 +00:00
Adrian Roos
92346c4832 Revert "Preopt APEX system server jars."
This reverts commit ca9bc98e0c.

Reason for revert: breaks build
Bug: 200024131

Change-Id: Ide07b4c4d267370ae31107b1598b2f878c701282
2021-09-15 14:11:07 +00:00
Liz Kammer
a191dc0520 Merge "Expand handling of unconverted deps in bp2build" am: 83d07a4c41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1811096

Change-Id: Ib53f05fd0b7bbfdc7256abaf7b5d8eef7722f848
2021-09-15 14:03:58 +00:00
Paul Duffin
517e3e9673 Merge "Avoid direct access to Native_bridge_supported property" am: 5ef58a302f am: 9771209aee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826226

Change-Id: If8c4cc0709258983dfd88201aeee155ff3c92425
2021-09-15 13:59:25 +00:00
Paul Duffin
b4e6408f03 Merge "Rename SdkMemberTypeDependencyTag to SdkMemberDependencyTag" am: c2c7f3e49b am: 063ad070c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826225

Change-Id: I4a5ba8b506a45b2774034d6ea9327472f5026ec3
2021-09-15 13:59:19 +00:00
Liz Kammer
83d07a4c41 Merge "Expand handling of unconverted deps in bp2build" 2021-09-15 13:49:48 +00:00
Paul Duffin
9771209aee Merge "Avoid direct access to Native_bridge_supported property" am: 5ef58a302f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826226

Change-Id: I472f1af991cd6a04ed42d5cc1b0dbca28ce5b699
2021-09-15 13:44:10 +00:00
Paul Duffin
063ad070c0 Merge "Rename SdkMemberTypeDependencyTag to SdkMemberDependencyTag" am: c2c7f3e49b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826225

Change-Id: I304997b8488094a28ef8b75baaf0d9c4341b1512
2021-09-15 13:44:01 +00:00
Paul Duffin
5ef58a302f Merge "Avoid direct access to Native_bridge_supported property" 2021-09-15 13:29:32 +00:00
Paul Duffin
c2c7f3e49b Merge "Rename SdkMemberTypeDependencyTag to SdkMemberDependencyTag" 2021-09-15 13:29:23 +00:00
Liz Kammer
a31ff68c4a Merge "Bp2build: handle embedded structs as blueprint" am: adfade58a9 am: cfbad2bb31
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826433

Change-Id: Iaf63b13709fe06cc437e872d5ab33f9d5fe9d690
2021-09-15 13:05:54 +00:00
Liz Kammer
cfbad2bb31 Merge "Bp2build: handle embedded structs as blueprint" am: adfade58a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826433

Change-Id: Ief7a8edb7e82e537a657d9d74f122b1db0629471
2021-09-15 12:53:18 +00:00
Liz Kammer
adfade58a9 Merge "Bp2build: handle embedded structs as blueprint" 2021-09-15 12:39:29 +00:00
Jiakai Zhang
6ff963aacb Preopt APEX system server jars. am: ca9bc98e0c am: 83d0d8ac1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1821984

Change-Id: Id4a6e38a8756aae03fd007eaa8274cf77c5780bc
2021-09-15 11:02:00 +00:00
Jiakai Zhang
83d0d8ac1c Preopt APEX system server jars. am: ca9bc98e0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1821984

Change-Id: If42b905c0636b10881b372efafd3e2f9bc84923c
2021-09-15 10:48:53 +00:00
Jiakai Zhang
02669e8a30 Preopt system server jars with updatable bootclasspath.
Previously, we preopt system server jars without updatable bootclasspath
in the build system so that the artifacts can keep valid after a
mainline update. Things have been changed after then. We now re-compile
system server jars on the user's device after a mainline update
(b/189467174), so we no longer need the artifacts generated at build
time to keep valid. Therefore, we can preopt system server jars with
updatable bootclasspath to achieve better performance.

Bug: 199573699
Test: m services
Test: manual - 1. Build a system image and flash it into a device.
  2. adb root && adb shell grep "services" /proc/`adb shell pidof system_server`/maps
  3. See "/system/framework/oat/x86_64/services.{odex,vdex,art} in the
  output.
  4. adb logcat -d odrefresh:D odsign:D "*:S"
  5. See "odrefresh said artifacts are VALID" and no dex2oat invocation
  in the output.

Change-Id: I9c94a54aa15c46708067f4bc89ff05bc7af32a7b
2021-09-15 09:01:07 +00:00
Jiakai Zhang
ca9bc98e0c Preopt APEX system server jars.
The path to the artifacts will in the form of
/system/framework/oat/<arch>/<encoded-jar-path>@classes.{odex,vdex,art},
where <encoded-jar-path> is the path to the jar file with "/" replaced
by "@". For example,
/system/framework/oat/x86_64/apex@com.android.art@javalib@service-art.jar@classes.odex

There will be a follow-up CL to update ART runtime to recognize
artifacts in that path.

Test: m com.android.art
Bug: 194150908
Change-Id: Ic89fd63c4b1cd565684cead83fc91dae3bc97a4c
2021-09-15 09:01:07 +00:00
Jiakai Zhang
204356f3b5 Preopt APEX system server jars from prebuilts.
Similar to the previous CL, but for jars from prebuilts.

Test: manual - 1. Patch aosp/1818020 and aosp/1810840.
  2. m SOONG_CONFIG_art_module_source_build=false com.android.art
Bug: 194150908
Change-Id: Idc0c73a78045a602ad3a91cb5071d291bd611015
2021-09-15 09:01:07 +00:00
Treehugger Robot
c9205db966 Merge "Add system/sepolicy/apex to bp2build allowlist" am: 709f02707d am: 780f559584
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826628

Change-Id: Ib1ce19047afb812c21757eaad89a65c614c3744f
2021-09-15 08:39:29 +00:00
Treehugger Robot
780f559584 Merge "Add system/sepolicy/apex to bp2build allowlist" am: 709f02707d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826628

Change-Id: If90417ce5553bac5acaf448987a661b757665d5f
2021-09-15 08:24:02 +00:00
Treehugger Robot
709f02707d Merge "Add system/sepolicy/apex to bp2build allowlist" 2021-09-15 08:10:14 +00:00
Treehugger Robot
b2e53db028 Merge "Fix panic when a module has an invalid output path" am: cf6749630a am: 32e5355bab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826960

Change-Id: I5daad76b1f084938a86c74e316f2adeeb7df2fe1
2021-09-15 04:50:55 +00:00
Treehugger Robot
32e5355bab Merge "Fix panic when a module has an invalid output path" am: cf6749630a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826960

Change-Id: I972bbb9b99121e1ee4ffb33c0278f239dd61db8f
2021-09-15 04:37:54 +00:00
Treehugger Robot
cf6749630a Merge "Fix panic when a module has an invalid output path" 2021-09-15 04:23:13 +00:00
Inseob Kim
a10ef270eb Add more sepolicy variables to soong_config
Bug: 33691272
Test: m selinux_policy on sc-dev
Change-Id: I4a7288d5f4ff99233fbdb56a8fd92da2d6f2ef7d
2021-09-15 03:04:53 +00:00
Cole Faust
64cb7c964a Fix panic when a module has an invalid output path
dep.OutputFile().Path() can panic if the OutputFile
is invalid, so move more of the code into the check
for validity. This changes the go crash into a
build error.

Bug: 158624492
Test: Apply the patchset 1 of ag/11815659, lunch aosp_x86_64-eng, m
Change-Id: Ic8a728be1b570ac73be7b2b9461676f9fd99c266
2021-09-14 17:35:19 -07:00
Guang Zhu
736654b861 Merge "update build rules to use /data/local/tests/unrestricted" am: 7b32612dc4 am: da4d36227f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826231

Change-Id: I7f69d11f6ca9ef9aa6ae4c4b1fe4d98e1d77b528
2021-09-15 00:35:01 +00:00
Treehugger Robot
7181c70efb Merge "Add {.aar} support for android_library" am: db3ff57368 am: 7b3130a459
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826617

Change-Id: I4a36a0cf422a476c4a80b47c14ecf4c2e7cd630a
2021-09-15 00:34:53 +00:00
Guang Zhu
da4d36227f Merge "update build rules to use /data/local/tests/unrestricted" am: 7b32612dc4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826231

Change-Id: I96945a717032ade148ac6b70ba5a8b02730d43a5
2021-09-15 00:23:32 +00:00
Treehugger Robot
7b3130a459 Merge "Add {.aar} support for android_library" am: db3ff57368
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826617

Change-Id: I2404648a8bdea49d13f2c747a75b82002ee172b5
2021-09-15 00:23:18 +00:00
Guang Zhu
7b32612dc4 Merge "update build rules to use /data/local/tests/unrestricted" 2021-09-15 00:22:43 +00:00
Cole Faust
06103c45c5 Fix m product-graph am: 521e951ad4 am: ec84292f1b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826630

Change-Id: I81a5f27e68b6c54af7016d71c7c627184f0ea6d5
2021-09-15 00:13:46 +00:00
Treehugger Robot
db3ff57368 Merge "Add {.aar} support for android_library" 2021-09-15 00:04:42 +00:00
Cole Faust
ec84292f1b Fix m product-graph am: 521e951ad4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826630

Change-Id: I5ce93b1a1d70ad7578069621f5a773ba45615f8e
2021-09-14 23:59:16 +00:00
Cole Faust
521e951ad4 Fix m product-graph
`m product-graph` runs a "non-full" build, which skips
some steps to improve performance. One of the steps
it skips is making a .installable_files file. Soong
reads this file and removes any files that were removed
from the list in this file. It errored out if the file
didn't exist. Make soong less strict about the presence
of this file, because if it doesn't exist, there shouldn't
be any installed files to remove either.

Fixes: 168105598
Test: rm -rf out/, m product-graph
Change-Id: I366f7b09d87911f9660d4e08c2d2f097cc04800f
2021-09-14 15:09:42 -07:00
Liz Kammer
37997c404b Add system/sepolicy/apex to bp2build allowlist
Technically, tzdata apex depends on
//system/sepolicy/apex:com.android.tzdata-file_contexts. Builds suceeded
regardless due to bp2build generating a filegroup for all files in a
directory.

This also requires an update to the check in apex/builder.go to address
the fact that outputs (including filegroups) from Bazel in mixed builds
will be in a Bazel out subdirectory. This change also corrects a
potential bug that would not support all subdirectories under
system/sepolicy as golang's path.Match does not treat ** as recursive.

Test: go test apex tests
Test: build/bazel/ci/mixed_droid.sh
Change-Id: I1076d60cf271e4cdd1ea990156ab0a39fcfa6535
2021-09-14 18:00:22 -04:00
Christopher Ferris
64d26813f6 Merge "Make the script python3." am: 2551d2539e am: 5bae558aad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1817676

Change-Id: Ia8b60f62f33ab3f592b36f31431e9dbd75350145
2021-09-14 21:35:00 +00:00
Christopher Ferris
5bae558aad Merge "Make the script python3." am: 2551d2539e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1817676

Change-Id: Ifb6823c57310fee5b1f2c49c54989195890e4ebf
2021-09-14 21:25:55 +00:00
Christopher Ferris
2551d2539e Merge "Make the script python3." 2021-09-14 21:03:01 +00:00
Saeid Farivar Asanjan
1fca301bd2 Add {.aar} support for android_library
Change-Id: I2c392d3dfc545c23495b03d0f236680fd59e1401
2021-09-14 21:02:43 +00:00
Liz Kammer
6eff323206 Expand handling of unconverted deps in bp2build
Support three options for converting modules with unconverted
dependencies
1. (default) Warn when converting a module if it has unconverted deps.
2. Error when encountering a module with unconverted deps. (not hooked
up yet)

Test: build/bazel/ci/bp2build.sh
Test: build/bazel/ci/mixed_libc.sh
Test: BP2BUILD_ERROR_UNCONVERTED=1 build/bazel/ci/bp2build.sh with
      unconverted deps -- get appropriate error
Bug: 181155349
Change-Id: Ifaabf0cd2e43e963366dc137159c705294165c3d
2021-09-14 19:55:55 +00:00