Commit graph

64236 commits

Author SHA1 Message Date
Cole Faust
eb644cfb34 Break constant information out of product vars
We don't want rules to load the product variables directly, because
then they won't be able to transition on them.

Break constant information that is safe to load outside of the
product vars file, so that we can make the product vars file have
more restricted visibility later.

Bug: 269577299
Test: m nothing
Change-Id: I848bff33e4f5798f51296ea3a2600615cab36985
2023-04-11 15:38:43 -07:00
Jooyung Han
33a25c1a0d Merge "Run apex_sepolicy_tests" 2023-04-10 02:36:35 +00:00
Spandan Das
38c39aff61 Merge "Update min_sdk_version used in TestSymlinksFromApexToSystem" 2023-04-07 21:06:56 +00:00
Spandan Das
1a92db5b88 Update min_sdk_version used in TestSymlinksFromApexToSystem
Updatable apexes should set a min_sdk_version that is not current. This
enforcement does not exist today, but will soon be added to the build
system. In preparation for that, cleanup the min_sdk_version property
used in this unit test.

Test: go test ./apex
Bug: 221087384

Change-Id: Idabc4c6f20e134b38ed0ae3ce68f6b7d54d7a13c
2023-04-07 16:13:22 +00:00
Treehugger Robot
f2abc7b92d Merge "Remove diff excludes for partition compatibility symlink files in SBOM integration test." 2023-04-07 02:45:46 +00:00
Jooyung Han
01f5d6553a Run apex_sepolicy_tests
.. as a validation for apex.

apex_sepolicy_tests checks the contents of the apex against
precompilec_sepolicy. This is to avoid common mistakes in file_contexts.
For example, etc/vintf directory should be read-able by servicemanager.

Bug: 267269895
Test: m com.google.cf.wifi (with wrong file_contexts entry)
Change-Id: Ic363345df43e5b2108b07de787f5f6817bbe6af4
2023-04-07 10:11:27 +09:00
Treehugger Robot
b4949c2b4f Merge "Revert "Revert "Fix NDK library sysroot arrangement.""" 2023-04-06 20:46:41 +00:00
Wei Li
7c1e7f0563 Remove diff excludes for partition compatibility symlink files in SBOM integration test.
Bug: 272358980
Test: CIs
Change-Id: I5436c77d6a63942771422a17a8b4876b6c81150a
2023-04-06 08:36:01 -07:00
Jihoon Kang
7bfe443875 Merge "Export defaultJavaLibraryName() identifier" 2023-04-06 04:40:16 +00:00
Treehugger Robot
dfa0a761f2 Merge "Clean old symlink forests" 2023-04-06 01:28:33 +00:00
Jihoon Kang
3bfba4c723 Merge "Update java_api_library in testing modules" 2023-04-05 23:27:50 +00:00
Jihoon Kang
5b065bbd1d Export defaultJavaLibraryName() identifier
Modify the visibility of defaultJavaLibraryName() to export it so that
it can be accessed from another package. This is essential for use case
when identical JavaApiLibraryName() has to be returned regardless of
config.

Test: m
Change-Id: Iefa1b3eb18a0d2717284608c825f488e7ae73df0
2023-04-05 21:15:17 +00:00
Treehugger Robot
dd5653bbf0 Merge "Fix issue merging bp2build files with handcrafted ones" 2023-04-05 20:32:14 +00:00
Cole Faust
5db92090e1 Clean old symlink forests
There was an incrementality bug in the symlink forest generation that
was recently fixed. However, if the appropriate files don't get touched,
the issue will remain. Add a mechanism to clean old symlink forests
so that when we fix incrementality bugs we can ensure they don't remain
in any old out directories.

Bug: 276349152
Test: Presubmits
Change-Id: I36664dfb0ca7227e3e1f89de859ebccb808c5f15
2023-04-05 11:44:49 -07:00
Cole Faust
3f4f521711 Fix issue merging bp2build files with handcrafted ones
It was possible for the merged content to end up back in the bp2build
generated file because there was a symlink from the symlink forest to
the bp2build generated file.

Remove the symlink if it exists.

Bug: 276349152
Test: m bp2build, add a handcrafted file in the same folder as a Android.bp file, m bp2build again, check that the symlink forest version is not a symlink
Change-Id: Id64aa3addebcf0c6b1728389f21ae246796aaf8d
2023-04-05 09:08:38 -07:00
Romain Jobredeaux
15807fa7ed Merge "Bp2build converter for java_host_for_device." 2023-04-05 13:32:29 +00:00
Romain Jobredeaux
b2539d08ed Merge "Support arch variants in java's StaticLibs in bp2build" 2023-04-05 13:32:29 +00:00
Yi Kong
a1961e7eed Prepend AFDO flags to allow overriding
This enables turnning off -fprofile-sample-accurate on a per project
basis.

Bug: 274725934
Bug: 273415627
Test: presubmit
Change-Id: I15060950f7b55e51069cb00b66512c7e94981f1b
2023-04-05 11:49:19 +09:00
Romain Jobredeaux
eb711b9f7c Support arch variants in java's StaticLibs in bp2build
Test: Presubmits
Bug: 276901800
Change-Id: I6058a726833ef10a5f470946e2d265b20fa547ce
2023-04-04 19:50:13 -04:00
Romain Jobredeaux
e7370eabe4 Bp2build converter for java_host_for_device.
Change-Id: I70a345c641bbed3223dc6222062fb6948f7dc6cb
Bug: 276710283
Test: Presubmit
2023-04-04 19:49:17 -04:00
Dan Albert
4048bb0a89 Revert "Revert "Fix NDK library sysroot arrangement.""
This reverts commit 961cf1cf9c.

Reason for revert: Fixed

Change-Id: I3c5c0b89c924753b62c1bc126d7e64975ef7f137
2023-04-04 23:27:15 +00:00
Jihoon Kang
c0a24205a7 Update java_api_library in testing modules
The full api surface java_api_library modules are currently defined as
java_library modules instead of java_api_library modules. This change
corrects this and modifies the DepsInfo of java_api_library so that it
can be compatible in tests.

Test: go ./java
Change-Id: I540b5a930f506ce5f7663ab6e07c6df49af15cf9
2023-04-04 22:52:37 +00:00
Treehugger Robot
28ba80665d Merge changes I0ab8459b,I2ef90f4d
* changes:
  Create core-lambda-stubs from .txt files
  Fix the suffix used in names of java_system_modules
2023-04-04 17:54:56 +00:00
Victor Chang
32952b975d Merge "Add com.android.tools.r8.emitRecordAnnotationsExInDex flag" 2023-04-04 11:12:05 +00:00
Jingwen Chen
37eec7d019 Merge "Revert "Allowlist more of system/timezone"" 2023-04-04 04:09:26 +00:00
Cole Faust
5bc31c11ba Merge "Keep existing build files in build/make/target/product/security" 2023-04-04 03:58:15 +00:00
Treehugger Robot
f590058fd2 Merge "Make outputApexFile relative to module dir in mixed builds" 2023-04-04 01:35:10 +00:00
Wei Li
0766f4c66c Merge "Update the SBOM integration test to include ramdisk partition and resolve some diffs." 2023-04-04 00:55:38 +00:00
Jihoon Kang
91a86d4112 Merge "Add dep_api_srcs property to java_api_library module" 2023-04-03 23:42:19 +00:00
Spandan Das
760f880495 Create core-lambda-stubs from .txt files
APIs to compile lambda are part of art's toolchain api surface.
Generating stubs from .txt files allows us to prune the remaining sdk
dependencies on libcore/ that are not api files

Test: m core-lambda-stubs.from-text
(On top of change containing core.current.stubs.from-text
and turning enabled: true)

Change-Id: I0ab8459b9317cb055a434eb635ba06d38da5b92e
2023-04-03 23:42:08 +00:00
Spandan Das
0cb803a5d6 Fix the suffix used in names of java_system_modules
Test: N/A (enabled flag is still off)
Change-Id: I2ef90f4d9099bf183d65dcf8ebdf532d5fa445b6
2023-04-03 23:29:57 +00:00
Jiyong Park
7a64621169 Merge "Assert that platform_sdk_codename is set" 2023-04-03 23:28:58 +00:00
Jingwen Chen
83a4b68ff4 Revert "Allowlist more of system/timezone"
This reverts commit da03b08062.

Reason for revert: This was previously reverted in aosp/2510617 due to b/275666961, which spawned b/276416537 and b/276416485 that Cole and I are working on now. Given that the root causes are still being actively resolved, I believe this will cause the test (b/275666961) to fail again.

Change-Id: I69e756f823f920610a832a1fc88b415074c0f488
2023-04-03 23:22:54 +00:00
Treehugger Robot
43a2a9a5c6 Merge changes from topic "fdo_profile"
* changes:
  Reimplement afdo support for rust
  Implement fdo_profile module type
2023-04-03 22:35:25 +00:00
Cole Faust
b0bfa07919 Make outputApexFile relative to module dir in mixed builds
Otherwise when other modules use the apex as data (for example, in
tests) they get the full path from the root of the workspace to the
apex.

Fixes: 276416485
Test: atest timezone_data_e2e_tests:com.android.tests.apex.TimezoneDataHostTest#testStageActivateUninstallApexPackage -- --abi x86_64 then tree out/host/linux-x86/testcases/timezone_data_e2e_tests
Change-Id: Id740856794770df2edc55dfff5f6f938fc31d0c5
2023-04-03 14:28:36 -07:00
Treehugger Robot
d61ea3580d Merge "Set OUT_DIR=out with no src_deps." 2023-04-03 19:01:58 +00:00
Jihoon Kang
01e522cac5 Add dep_api_srcs property to java_api_library module
Users can pass the jar-file creating module via dep_api_srcs property in
java_api_library to create the jar file not by compiling the stubs
generated from metalava but by extracting and zipping the class files
from the jar file of the input module.

Test: m android-non-updatable.stubs.from-text
Bug: 273381329
Change-Id: Id1b75179111cc7ff45faaff58388db1347bb18e5
2023-04-03 17:53:40 +00:00
Liz Kammer
5342482043 Merge "Allowlist more of system/timezone" 2023-04-03 17:43:17 +00:00
Treehugger Robot
71585a0187 Merge changes Ib9ff4eb5,If27a050c
* changes:
  add *.from-text modules to the java test fixture
  Create a SetBuildFromTextStub method
2023-04-03 16:44:08 +00:00
Spandan Das
77e3278c50 Merge "Rename core stubs to .txt stubs if applicable" 2023-04-03 16:37:53 +00:00
Alix Espino
2173e6545a Merge "Simplify logic in Soong ApiLevelFromUserWithConfig" 2023-04-03 13:41:02 +00:00
Jiyong Park
3a00e3defb Assert that platform_sdk_codename is set
This is already the case for bazel. Soong should do the same.

Bug: 271277773
Test: m nothing
Change-Id: Ibb680801872bd04eade511e1a174cc629af80722
2023-04-03 20:36:40 +09:00
Treehugger Robot
1c102d34b7 Merge "Remove stub-annotations from art stubs system modules" 2023-04-03 10:49:15 +00:00
Rebecca Chyung
20d1290cfa Merge "Revert "Fix NDK library sysroot arrangement."" 2023-04-03 06:08:42 +00:00
Rebecca Chyung
961cf1cf9c Revert "Fix NDK library sysroot arrangement."
This reverts commit 169256f535.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/build-details/9868109/targets/mokey-userdebug, bug b/276513771

Change-Id: Iea77994cd4ff0f61a8fa72e52cd1b601bc7cc1a0
2023-04-03 06:06:58 +00:00
Peter Collingbourne
0dcd62e8a0 Set OUT_DIR=out with no src_deps.
Some Rust crates with no src_deps have generated files checked in in an
"out" subdirectory and included via a reference to $OUT_DIR, such as
external/rust/crates/userfaultfd-sys.

Astonishingly, some people must be leaving $OUT_DIR set to the default
value of "out", because with $OUT_DIR set to this value, building these
crates would presumably succeed. For everyone else, the build fails
when building one of these crates because it will attempt to load from
the wrong directory. Presumably these crates should be using src_deps
instead (and once that's fixed, we should probably *unset* $OUT_DIR in
rustc invocations to prevent the same thing from happening again), but
for now, fix the build with non-default OUT_DIR by explicitly setting
OUT_DIR to "out" if there are no src_deps.

Change-Id: I09f99424fc01a1e42e910622c77ab8f7312819bd
2023-04-01 01:34:19 -07:00
Treehugger Robot
553d89a825 Merge "Fix rust snapshotInfo provider bug" 2023-04-01 06:41:25 +00:00
Cole Faust
10b94de0b6 Keep existing build files in build/make/target/product/security
To add a new filegroup for certificates in that folder.

Bug: 269577299
Test: See other cl
Change-Id: I1c41c809ee3ec6838a427d18f2d21fec9571ccb6
2023-03-31 17:43:06 -07:00
Vinh Tran
cde1016aff Reimplement afdo support for rust
Ignore-AOSP-First: The parent CL is internal
Bug: 267229065
Test: go test
Change-Id: Ia14679285b92f3f14ff269392a61f978c71311b2
Merged-In: Ia14679285b92f3f14ff269392a61f978c71311b2
2023-03-31 17:55:16 -04:00
Vinh Tran
44cb78c988 Implement fdo_profile module type
Introducing fdo_profile module type to reimplement the afdo support in cc moduels. This change allows the feature to be compatible with Bazel migration.

How it works:

PreDepsMutators:
  * BeginMutator: If non-static cc modules sets afdo prop, search and add corresponding fdo_profile module as a dep with fdoProfileTag
  * fdoProfileMutator:
    * If in fdo_profile module, set FdoProfileProvider with full path to profile
    * If in cc module, read FdoProfileProvider from dep with fdoProfileTag and set FdoProfileInfo.Path to FdoProfilePath field

PostDepsMutators:
  * afdoDepsMutator: If a module has FdoProfilePath set, walk to its static deps and set itself to the deps' AfdoRdeps
  * afdoMutator: If a static dep has AfdoRDeps set, create afdo variant.

Ignore-AOSP-First: Other CLs in the same topic are internal-only
Test: go test
Bug: b/267229065
Change-Id: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
Merged-In: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
2023-03-31 17:52:01 -04:00