Commit graph

38737 commits

Author SHA1 Message Date
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
79839d94c1 Merge "Revert "Preopt APEX system server jars."" 2021-09-15 14:31:42 +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
83d07a4c41 Merge "Expand handling of unconverted deps in bp2build" 2021-09-15 13:49:48 +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
adfade58a9 Merge "Bp2build: handle embedded structs as blueprint" 2021-09-15 12:39:29 +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
709f02707d Merge "Add system/sepolicy/apex to bp2build allowlist" 2021-09-15 08:10:14 +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
7b32612dc4 Merge "update build rules to use /data/local/tests/unrestricted" 2021-09-15 00:22:43 +00:00
Treehugger Robot
db3ff57368 Merge "Add {.aar} support for android_library" 2021-09-15 00:04:42 +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
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
Liz Kammer
32a0339340 Bp2build: handle embedded structs as blueprint
For structs that are embedded, Blueprint does not nest under the
embedded name, flattening them into the original struct for blueprint
files (e.g.
9fd2ed93df:proptools/unpack_test.go;l=402-431;drc=3adb2409648d6f8b25354ac47f083dae87731f10).
We should do the same for bp2build.

This will also allow us to embed structs for bp2build conversion
allowing more reuse.

Test: go test bp2build tests
Change-Id: I9ce088462adaf59bffa80bea76cd488e31f98e9d
2021-09-14 14:41:36 -04:00
Guang Zhu
83150667ae update build rules to use /data/local/tests/unrestricted
... for native tests. This new location has the appropriate
settings for debuggerd to generate valid backtraces in case
of test binary crash.

Bug: 167308193
Bug: 199904562
Test: compile
Change-Id: Ic106011a79f0aec86896b305616cf5590ab2eb2d
2021-09-14 10:56:47 -07:00
Treehugger Robot
309a1acb27 Merge "Improve the error when srcs field has the wrong type." 2021-09-14 17:55:33 +00:00
Paul Duffin
e3d1ae48e5 Avoid direct access to Native_bridge_supported property
Bug: 195754365
Test: m nothing
Change-Id: If7557187400be36b6c36116c61634449da6529a3
2021-09-14 17:26:14 +01:00
Paul Duffin
f7b3d0d317 Rename SdkMemberTypeDependencyTag to SdkMemberDependencyTag
Bug: 195754365
Test: m nothing
Change-Id: Id4ef6f8be54c60a1f269d7e7c46a8dcb715fcca4
2021-09-14 17:26:14 +01:00
Alan Viverette
b89663b7d9 Merge "Patch "Add support for --optional-uses-libs to pom2bp" to match master" 2021-09-14 15:04:28 +00:00
Rob Seymour
f6c37cc87d Merge "Add module based host-tools snapshot" 2021-09-14 14:47:03 +00:00
Martin Stjernholm
25a69de8de Improve the error when srcs field has the wrong type.
In particular it's useful to print the module, since the panic is
delayed from the init call.

#codehealth

Test: m nothing
Change-Id: Ia91127be83d8a9ce08cf0c08bc3f13fce7be14af
2021-09-14 00:33:47 +01:00
Christopher Ferris
8e5feaa1df Make the script python3.
Test: Ran the python version of the script and the python3 version
Test: and verified the output is the same. This is for all three
Test: outputs (html, text, xml).
Test: Builds without an error.
Change-Id: I344504a4351c14e00caeb109c5507a60fb6be05a
2021-09-13 14:54:01 -07:00
Rob Seymour
925aa09ea1 Add module based host-tools snapshot
Add new module:
host_snapshot {
    name: "host-snapshot"
    deps: [
      (list of host tools)
    ],
    ...
}

Package host tools using android.PackagingBase to capture host tools and transitive packaging data.
Add JSON meta data to snapshot that allows snapshot to be installed via development/vendor_snapshot/update.py

Add support to generate a fake host snapshot of all host modules that is used to detect required
modules via development/vendor_snapshot/update.py.

Bug: 192556798
Bug: 194799048
Bug: 192896149
Test: m HOST_FAKE_SNAPSHOT_ENABLE=true host-fake-snapshot dist -- check snapshot exists in dist

Change-Id: I849c4db801cd858408f6fe6a3ce69262a23a5be9
2021-09-13 21:29:14 +00:00
Liz Kammer
04e0a1551d Merge "Split local/absolute include into attributes" 2021-09-13 21:21:09 +00:00
Alan Viverette
bcbfc5f53c Patch "Add support for --optional-uses-libs to pom2bp" to match master
Cherry pick that was originally submitted was not up-to-date.

Change-Id: Ia599ea294926666cddfd84f8c2a3e22e7e7c0434
2021-09-13 19:28:35 +00:00
Treehugger Robot
7bb0238418 Merge "Change default to require licenses property." 2021-09-13 19:25:57 +00:00
Yi Kong
861441fa36 Merge "Remove unused-but-set-{variable,parameter} from ClangUnknownCflags" 2021-09-13 18:54:15 +00:00
Treehugger Robot
6e09abdf5c Merge "Update clang version used for bindgen to r433403" 2021-09-13 18:07:44 +00:00
Christian Wailes
c3cb99e61b Merge "Update the Rust prebuilt version number to 1.55.0" 2021-09-13 16:39:37 +00:00
Chris Wailes
d23f0d07e1 Update the Rust prebuilt version number to 1.55.0
Bug: 199547393
Test: m rust
Change-Id: I05831a107b46019205c0a7d530b6f2a3b1beba75
2021-09-13 16:38:27 +00:00
Sasha Smundak
d7d07ad0b4 Share version settings with product config makefile.
Generate version settings from build/make/core/version_defaults.mk.
The generated settings are then loaded into the launcher code and passed
to the environment setup code.

Bug: 198995713
Test: internal
Change-Id: I66131d2c5b232784a9ff0bba9fbd5db62302aaba
2021-09-13 09:23:05 -07:00
Liz Kammer
35687bc77a Split local/absolute include into attributes
Previously these were expanded into copts, requiring making all includes
absolute and duplicating includes to account for potentially generated
files. We now can handle both of these properly on the Bazel side, so
let's clean up build files a bit.

Test: bp2build.sh
Change-Id: I6c6160738cd6c269408c6c7a37010654d84f3c9d
2021-09-13 12:49:42 +00:00
Liz Kammer
d11eeb8f77 Merge "Cleanup bp2build tests to reduce repetition" 2021-09-13 12:22:57 +00:00
Liz Kammer
15c90f5fe1 Merge "bp2build: Split export_{includes,system_includes}" 2021-09-13 12:22:19 +00:00
Yi Kong
a1ebc2d072 Remove unused-but-set-{variable,parameter} from ClangUnknownCflags
These warnings are now implemented by Clang.

Change-Id: I78d04216da0ca3d1db616c7b658ca6075b20e7f6
Test: presubmit
Bug: 197230471
2021-09-13 06:25:41 +00:00
Spandan Das
eabda9708a Add Property.Type to bpdocs template
This field was missing for Property objects that have non-empty inner
Property objects

Bug: 172797653
Test: m soong_docs
Change-Id: Iee9c66f8b85d68a6b5bf18fd9787143191c4f002
2021-09-12 18:40:37 +00:00
Yi Kong
ef99688cff Update clang version used for bindgen to r433403
Bug: 197230471
Test: presubmit
Change-Id: If8885beb979492c0a0c6cc4e310a9e09fd86da7b
2021-09-12 15:22:28 +08:00
Treehugger Robot
07e7294a75 Merge "Don't use bugprone-easily-swappable-parameters for global tidy builds either" 2021-09-11 10:20:40 +00:00
Stephen Hines
4b721450c8 Don't use bugprone-easily-swappable-parameters for global tidy builds either
We turned this off in local tidy flags, but didn't disable it on global
tidy builds. Let's remove this for now, since the upkeep cost is large
on it, and it also is currently crashing in some cases.

Bug: http://b/199534745
Bug: http://b/194865868
Test: WITH_TIDY=1 m
Change-Id: Ife39ab4949c5baf825efff66326b276c6a2a59f4
2021-09-11 01:14:36 -07:00
Treehugger Robot
c521d5717d Merge "Add support for --optional-uses-libs to pom2bp" 2021-09-10 20:15:35 +00:00
Colin Cross
65e8f6d765 Merge "Make rust builds hermetic" 2021-09-10 19:51:20 +00:00
Chih-hung Hsieh
aaa4c07f21 Merge "Pass TIDY_TIMEOUT to clang-tidy" 2021-09-10 19:36:29 +00:00