Commit Graph

20420 Commits

Author SHA1 Message Date
Anton Hansson 4f3dc39a47 Merge "Correct link type for module stubs" 2020-06-05 19:32:33 +00:00
Treehugger Robot 24fae40b8d Merge "Pass the TMPDIR directly to the command when dumping makefile variables." 2020-06-05 19:32:30 +00:00
Anton Hansson 14da93be48 Merge "Improve the structure of the link check method" 2020-06-05 18:36:58 +00:00
Anton Hansson 79fe805e05 Merge "Build java_sdk_library stubs with language level 8" 2020-06-05 18:04:56 +00:00
Patrice Arruda ae2694b30d Pass the TMPDIR directly to the command when dumping makefile variables.
External applications such as metrics uploader depends on the TMPDIR.
DumpMakeVars is changing the TMPDIR environment variable value. Once
the work is done, TMPDIR directory is deleted. Additional flow of
the tool or external applications can panic since TMPDIR directory
does not exist. Since this is an isolated case, pass the TMPDIR
directory to the command of dumping the makefile variables.

Bug: b/140638454
Test: * Ran lunch command with ANDROID_ENABLE_METRICS_UPLOAD set
        and metrics_uploader did not crash.
      * m nothing
Change-Id: Ib78a3f8cfb5da48f65bd9bce1511e9abdf3d9cca
2020-06-05 17:28:41 +00:00
Sasha Smundak 613cbb1733 Fix android_app_set documentation
Also, fix linter warnings.

Bug: 152319766
Test: treehugger & manual
Change-Id: Id9b296d9301902deb463b299413491bc66d58944
2020-06-05 10:27:23 -07:00
Anton Hansson 5ac7fad759 Merge "Don't require merge_annotations_dir for annotations_enabled" 2020-06-05 17:21:56 +00:00
Anton Hansson ad14580f99 Merge "Create a framework.aidl for non-updatable platform" 2020-06-05 16:38:15 +00:00
Orion Hodson e29cac0861 Merge "Revert "Remove implict jni.h include path"" 2020-06-05 15:23:25 +00:00
Orion Hodson 465c775ab8 Revert "Remove implict jni.h include path"
This reverts commit e68926d4d3.

Reason for revert: breaks build in various -plus-aosp branches
Bug: 158293810

Change-Id: I80572f673df83161be02873b2b2acf4b2ba9a2d4
Exempt-From-Owner-Approval: revert
2020-06-05 15:17:20 +00:00
Anton Hansson 2d0c1946fa Correct link type for module stubs
Module stubs compile against module_current, so any module depending on
them had to compile against module_current (or broader) too. Treat them
as the API surface the stubs are for.

Bug: 157010342
Test: m
Change-Id: I49b9082dc1b5afe6c22e94126e574dd8061f0f39
Merged-In: I49b9082dc1b5afe6c22e94126e574dd8061f0f39
(cherry picked from commit 0bd88d0b4e)
2020-06-05 15:16:17 +01:00
Anton Hansson cc51a6886e Improve the structure of the link check method
Match by name first, then by kind.

Bug: 157010342
Test: m
Change-Id: Ic337a073c3bd14ac03b1d899aeb612247a708495
Merged-In: Ic337a073c3bd14ac03b1d899aeb612247a708495
(cherry picked from commit ac103461a4)
2020-06-05 15:16:17 +01:00
Anton Hansson 83509b549c Build java_sdk_library stubs with language level 8
This is in line with the main android stubs (android.jar). I discovered
the difference since we want to merge some java_sdk_libraries into the
android.jar files, but I believe the rationale for compiling it with
version 8 applies to all stubs (we don't want level 9-language features
because some tooling may be stuck with version 8).

Bug: 144149403
Test: presubmit (checkbuild)
Change-Id: I9439ed516dda68ef516ff08d1c6045de3d3c1c0e
Merged-In: I9439ed516dda68ef516ff08d1c6045de3d3c1c0e
(cherry picked from commit cf4dd4c1df)
2020-06-05 15:16:16 +01:00
Anton Hansson 9d7c3fb4da Don't require merge_annotations_dir for annotations_enabled
As far as I can tell, annotations_enabled does not require use of
merge_annotations_dir (although it may have done in the past).

Bug: 157010342
Test: m
Change-Id: I6705522774203b4566f58679bbc2f0c17422c1dd
Merged-In: I6705522774203b4566f58679bbc2f0c17422c1dd
(cherry picked from commit c5e13279ad)
2020-06-05 15:16:16 +01:00
Anton Hansson 3f07ab2d63 Create a framework.aidl for non-updatable platform
framework.aidl includes the parcelables from the non-updatable
part of the framework as well as the modules. This causes a
dependency cycle when building module stubs:
module_stub -> module_sdk -> framework.aidl -> public_sdk -> module_stub

The module_sdk only includes the the stubs for the non-updatable
part of the framework, so it should also only contain the non-updatable
parcelables. This change creates a framework_non_updatable.aidl with
those parcelables, and updates module_current to use that.

Bug: 144149403
Test: m
Test: m && diff out/soong/framework{,_non_updatable}.aidl
      (the diff contains just TestApi + module parcelables)
Change-Id: I224117a0ff695c22d4a4317a51a9b775ed73066b
Merged-In: I224117a0ff695c22d4a4317a51a9b775ed73066b
(cherry picked from commit 85c151c3f3)
2020-06-05 15:16:16 +01:00
Treehugger Robot 2ebae3e936 Merge "Remove implict jni.h include path" 2020-06-05 13:26:32 +00:00
Ulyana Trafimovich 3ef493ff91 Merge "Refactor library path representation in dexpreopt." 2020-06-05 10:46:01 +00:00
Treehugger Robot a5c94e1409 Merge "Allow apex module to have android_app_set as its constituent." 2020-06-05 05:52:51 +00:00
Inseob Kim 206665cc9b Do not disable llndk libraries
LLNDK libraries shouldn't be disabled in any case.

Bug: 157106227
Test: m
Change-Id: I059e639b21d0edb8abc00773891d37e890a36cce
Merged-In: I059e639b21d0edb8abc00773891d37e890a36cce
(cherry picked from commit 470b4cf826)
2020-06-05 04:26:29 +00:00
Inseob Kim 85708802d4 Create only one vendor variant depending on path
Not all vendor modules are meant to be working with multiple versions of
vndk unmodified. This restricts all vendor or vendor_available modules
to only one variant. Modules under proprietary directories will only
have BOARD_VNDK_VERSION variant, while modules under AOSP directories
will only have PLATFORM_VNDK_VERSION variant.

Bug: 157106227
Bug: 157133296
Test: capture snapshot from R
Test: try building master with R snapshot
Change-Id: I4ebe1da8d887cd76722fa8ab5ae9305da09074d4
Merged-In: I4ebe1da8d887cd76722fa8ab5ae9305da09074d4
(cherry picked from commit af578ffacc)
2020-06-05 04:26:24 +00:00
Inseob Kim 1042d29705 Implement cc_object vendor snapshot
cc_object modules are also necessary for vendor snapshot.

Bug: 157106227
Test: m vendor-snapshot
Change-Id: Idf4fd37a26f6f712f3cbab43133622f9f9bd9372
Merged-In: Idf4fd37a26f6f712f3cbab43133622f9f9bd9372
(cherry picked from commit 502679e061)
2020-06-05 04:26:17 +00:00
Inseob Kim 7f283f4bd0 Refine logic choosing vendor snapshot modules
This refines the vendor snapshot codes in order to fix logic errors.

- Capture toolchain_library and cc_library_headers correctly.
- Redirect unwind static library correctly.
- Filter out sanitize / coverage / lto by looking at HideFromMake.
- Add binary() function for clear and shorter codes.
- Include test modules.
- Add more tests to prevent further snapshot breakages.

Bug: 157106227
Test: m vendor-snapshot
Test: m nothing for all available targets
Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true \
NATIVE_COVERAGE=true COVERAGE_PATHS="*" m nothing

Change-Id: Id90082b5ab730f928582ad24f022ba410855400e
Merged-In: Id90082b5ab730f928582ad24f022ba410855400e
(cherry picked from commit 4d8d8fec4a)
2020-06-05 04:25:40 +00:00
Sasha Smundak 18d98bc3e0 Allow apex module to have android_app_set as its constituent.
Fixes: 157166068
Test: treehugger & manual
Change-Id: I9f91f1b761286f489d175eb0772f78f702e8a2d6
2020-06-04 20:25:53 -07:00
Martin Stjernholm 95d6ea3781 Don't disable dexpreopting implicitly in unbundled builds.
Test: art/test/testrunner/run_build_test_target.py art-linux-bionic-x64
  with TARGET_BUILD_UNBUNDLED enabled in the build scripts
Test: art/test/testrunner/testrunner.py --target --64 --optimizing
  with TARGET_BUILD_UNBUNDLED enabled in chroot on device
Bug: 157549171
Change-Id: I124c341d1801c4afa22f836dd567019de3e9498e
2020-06-04 20:28:21 +01:00
Martin Stjernholm 08802338fb Add TARGET_BUILD_UNBUNDLED as a variable to control builds.
Test: m droid
Test: TH, in particular builds green on ub-launcher3-master
Bug: 157549171
Change-Id: Ifc5b2759c10672e4b253ddd208b02e5af17e8dad
2020-06-04 19:01:55 +01:00
frankfeng c5b8749853 Implement test config auto-gen for sh_test.
Supports the following properties:
- Require_root
- Test_config_template
- Auto_gen_config

Test config template is in a separate CL.

Bug: 148805488
Bug: 151761373

Test: make
Test: unit tests
Test: verified with bc_test & toybox-tests
Change-Id: I63d60a153a6abda4ce30b74d3eb915fbf6389cb8
2020-06-04 10:37:14 -07:00
Ulya Trafimovich d4bcea4e24 Refactor library path representation in dexpreopt.
This is a preliminary CL before fixing on-device paths to DEX jars.
It groups together the inormation about on-host build paths and
on-device install paths to library DEX jars.

This CL changes the structure of module dexpreopt.config files
generated by the build system. Aside of that, no functional changes.

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I059654be7670f2ba66248d9c49b9694a0591f9c1
2020-06-04 17:37:42 +01:00
Ulyana Trafimovich 5539e7b568 Revert^2 "Rename DexJar interface method to DexJarBuildPath."
This reverts commit b0dc851ff4.

Reason for revert: relanding original change. Build failures were
  caused by a race with another CL: https://r.android.com/1320920

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ic9016582dae7773b4d4f84a63425f1ef7a5d061f
2020-06-04 17:20:38 +01:00
Martin Stjernholm 02229a2c6b Fix duplicate install targets from sdk variants in --skip-make mode.
This can manifest as duplicate "dependency missing" rules in builds
where SOONG_ALLOW_MISSING_DEPENDENCIES, TARGET_BUILD_APPS and
--skip-make are used together.

Test: art/tools/build_linux_bionic.sh dalvikvm
  with "export TARGET_BUILD_APPS=com.android.art" after the lunch line
  in build_linux_bionic.sh.
Bug: 157549171
Change-Id: I0e8dec0020f194cd265c73a55153555a51f6a426
2020-06-04 15:32:47 +01:00
Ulyana Trafimovich c55b679e7b Merge "Revert "Rename DexJar interface method to DexJarBuildPath."" 2020-06-04 10:47:47 +00:00
Orion Hodson e68926d4d3 Remove implict jni.h include path
Bug: 152482542
Test: m checkbuild
Change-Id: I7225646a31fb87879c47f71a1a919b342c9b488f
Merged-In: I7225646a31fb87879c47f71a1a919b342c9b488f
(cherry picked from commit 90e9505f56)
2020-06-04 10:44:08 +00:00
Ulyana Trafimovich b0dc851ff4 Revert "Rename DexJar interface method to DexJarBuildPath."
This reverts commit 562c240185.

Reason for revert: breaks `lunch full-eng && m checkbuild`.

Change-Id: Id7c7d6240d98afaf8edd49b6c96cd05534b784cc
2020-06-04 10:37:36 +00:00
Ulyana Trafimovich 2a08566634 Merge "Rename DexJar interface method to DexJarBuildPath." 2020-06-04 10:05:33 +00:00
Ulyana Trafimovich eb3f9f1295 Merge "Error on suboptimal system server classpath order, unless explicitly allowed." 2020-06-04 08:56:04 +00:00
Ramy Medhat c8d60bc7c6 Turn on metalava sandbox warning in all droiddoc metalava invocations.
Test: built aosp crosshatch userdebug with RBE_METALAVA=1 and dependency
file support.

Change-Id: I5ca637984429df12fe05bb07f5db154be9b24f97
2020-06-04 01:54:07 -04:00
Treehugger Robot a8bf98852a Merge "dex_import can be added to apex" 2020-06-04 05:06:22 +00:00
David Srbecky 07656410df Add SrcPath to InstallHookContext
Needed by ART to find the intermediate files so that it
can also install them in testcases directory for tests.

Change-Id: If1b2ad132632c5dc7c6c7573b56680e2f422594a
2020-06-04 01:26:16 +01:00
Colin Cross 3747336d23 Merge "Revert "Always run package check"" 2020-06-03 17:15:51 +00:00
Colin Cross b549b77120 Revert "Always run package check"
This reverts commit 91206d9ed1.

Reason for revert: package-check.sh doesn't work on mac
Bug: 158081251
Bug: 157649935
Change-Id: I50af71d54d5f1f8b516bfcf1efbcf6217e89c83a
2020-06-03 17:15:15 +00:00
Ulya Trafimovich cd3203fd5d Error on suboptimal system server classpath order, unless explicitly allowed.
The order is non-optimal if some jar X precedes its dependency Y. In
that case dexpreopt will be unable to resolve any rerefences from X to
Y. Raise an error unless the product sets variable
PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS to true in the
makefile. This is to prevent regressions in existing products that
currently have correct order.

Test: lunch cf_x86_phone-userdebug && m nothing
Test: lunch aosp_car_arm && m nothing

Bug: 140451054

Change-Id: Iafe8fe0e992deb628e38f2321d4601a4804a3c79
Merged-In: Iafe8fe0e992deb628e38f2321d4601a4804a3c79
(cherry picked from commit fb863c87c4)
2020-06-03 17:37:34 +01:00
Ulya Trafimovich 562c240185 Rename DexJar interface method to DexJarBuildPath.
This is a prerequisite change before adding DexJarInstallPath.

Test: lunch aosp_cf_phone-userdebug && m
Change-Id: I033e08b8bb06c0a844a6bbbfcdc48ce33e9c95cf
2020-06-03 11:40:45 +01:00
Orion Hodson 46b02790a6 Merge "Add some app modules to the allowed whitelist." am: 4a19d08d39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1290961

Change-Id: I3823854f5782ced6c19ceb3eeb3df03ea117f17f
2020-06-03 07:55:27 +00:00
Orion Hodson 4a19d08d39 Merge "Add some app modules to the allowed whitelist." 2020-06-03 07:29:51 +00:00
Jaewoong Jung ca9ed9158d Merge "Soong package structure refactoring" am: 264700345d
Original change: undetermined

Change-Id: I2b482006094cf5f2a5037177f78edf649386f78b
2020-06-02 16:45:48 +00:00
Jaewoong Jung 264700345d Merge "Soong package structure refactoring" 2020-06-02 16:30:50 +00:00
Treehugger Robot 8fc769dd85 Merge "Copy removed.txt file to the snapshot correctly" am: b47ab4b79f
Original change: undetermined

Change-Id: If04cb2450ee42cfe97dfab3511726ceb6c397c89
2020-06-02 15:52:09 +00:00
Treehugger Robot b47ab4b79f Merge "Copy removed.txt file to the snapshot correctly" 2020-06-02 15:36:39 +00:00
Ulyana Trafimovich 5282305767 Merge "Clean up class loader context generation." am: 5af1e93993
Original change: undetermined

Change-Id: Id56144f63a8f1400b20190aca44cc67b736d64c7
2020-06-02 14:23:02 +00:00
Ulyana Trafimovich 5af1e93993 Merge "Clean up class loader context generation." 2020-06-02 14:13:43 +00:00
Paul Duffin 3dbf9fd892 Copy removed.txt file to the snapshot correctly
Previously, the code copied the current.txt file to both the
current_api and removed_api properties. This change copies the
removed.txt file to the removed_api property instead.

Bug: 157980685
Test: m nothing
Change-Id: Iad34e91051da43222d22c240c16f50887c43d73e
2020-06-02 14:40:28 +01:00