Commit Graph

18592 Commits

Author SHA1 Message Date
Elliott Hughes da3a071eaa Remove unused mips workarounds.
This was never really finished, and hasn't been supported for years.

Test: treehugger
Change-Id: I21d4c3112aa8cf0c56e59f0cc19ff8725ef714b9
2020-03-06 18:15:44 -08:00
Jooyung Han 03b5185b88 apex: choose stub according to min_sdk_version
Native modules within APEX should be linked with proper stub version
according to its min_sdk_version.

For example, when min_sdk_version is set to "29", libfoo in the apex
would be linked to libbar of version 29 from platform, even if it has
a newer version like 30.

Bug: 145796956
Test: m nothing (soong tests)
Change-Id: I4a0b2002587bc24b7deeb5d59b6eeba5e1db5b1f
2020-03-07 03:12:45 +09:00
Paul Duffin 8c3fec4c37 Enable androidmk processing in sdk testing
Previously, while sdk tests would pass the sdk code would often fail
in androidmk processing. This change makes the tests more realistic
and will catch the errors earlier.

Bug: 142935992
Test: m nothing
Change-Id: Ifd0b2d7cf24e941c919f6b6e0beb2403a67d4308
2020-03-06 09:45:54 +00:00
Colin Cross 1ec3fce9b6 Disable goma for javac actions in Soong
goma can't handle the --system argument that Android must pass to
javac.

Bug: b/143658984
Test: treehugger
Change-Id: I207668d8baa4ab28160938732a38f696aeac3f44
2020-03-05 20:46:15 +00:00
Nicolas Geoffray 8f20563514 Merge "Add a nice install paths for module SDKs and exports." 2020-03-05 09:25:33 +00:00
Paul Duffin befa4b91d7 Copy apex_available properties to snapshot modules
Bug: 142935992
Test: m nothing
Change-Id: I1cdaae5b4e13a89dc46541dacd34ef5a44735b6a
2020-03-05 08:29:02 +00:00
Treehugger Robot c6d627b268 Merge "Capture snapshot headers in parallel" 2020-03-05 00:03:00 +00:00
Chih-hung Hsieh 286c318fa0 Merge "Add bugprone to global clang-tidy default checks" 2020-03-04 22:18:27 +00:00
Treehugger Robot 5d95387398 Merge "Make a soong-only copy of generate-notice-files.py" 2020-03-04 21:56:04 +00:00
Inseob Kim eda2e9c728 Capture snapshot headers in parallel
VNDK and vendor snapshot singleton work in a single thread, so globbing
in singleton results in ridiculus running time. Moving codes to
GenerateAndroidBuildActions to reduce running time.

Bug: 150406226
Test: VNDK_SNAPSHOT_BUILD_ARTIFACTS=true m dist vndk vendor-snapshot
Test: vendorSnapshotSingleton build time became 0.56s (from 10s)
Test: build.ninja building time became 1m11s (from 1m21s)
Change-Id: I4a081eef5847c62ca00280ca426f5b4e10f87b59
2020-03-04 23:39:42 +09:00
Nicolas Geoffray 1228e9c0ba Add a nice install paths for module SDKs and exports.
Following how NDK also creates its own install path.

Bug: 142935992
Test: cc_sdk_test.go, java_sdk_test.go
Change-Id: I98a3656903f37f6d7c90e6cf609431b2461a6161
2020-03-04 14:20:46 +00:00
Automerger Merge Worker ea1fcb630f PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES is applicable to override_apex am: 20bacabe0b
Change-Id: Ia1255de0c065be74bfa4be7d88a19800be2e603c
2020-03-04 05:57:11 +00:00
Jiyong Park 20bacabe0b PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES is applicable to override_apex
apex { name: "foo" }
override_apex { name: "override_foo", base:"foo" }

PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES := foo:com.android.foo

Previously, the override was done only for the overridden package "foo",
but not for "override_foo". Fixing this issue by using ctx.ModuleName()
when finding the package name to use.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 150645663
Test: m
Merged-In: I2947e5c75369216a4bbce8749503236be86771c3
(cherry picked from commit a519c54dd3)
Change-Id: I2947e5c75369216a4bbce8749503236be86771c3
2020-03-04 12:03:59 +09:00
Automerger Merge Worker fff0ad2041 Enable vndk-ext for product variants am: 0ecf0b223f
Change-Id: I6c000e1cfb142a20c6c5ab1067ab1043bd9b7579
2020-03-04 01:40:23 +00:00
Justin Yun 0ecf0b223f Enable vndk-ext for product variants
To build vndk-ext for product variants use `vndk.extends` property
with `product_specific: true` as for the vndk-ext for vendor
variants. For example:
cc_library {
    name: "libvndk_ext_product",
    product_specific: true,
    vndk: {
        enabled: true,
        extends: "libvndk",
    },
}

It will install the vndk-ext libs for product variants in
product/lib[64]/vndk/

Test: m nothing
Bug: 147778025
Change-Id: If1ee5be93c579abad302f44f18e6316f27e70019
2020-03-04 01:22:16 +00:00
Automerger Merge Worker 8813c95bb8 Merge "Update build_broken_logs script" am: 49b445cace
Change-Id: I5962efed46aed54c2488f31181263a1e235a469a
2020-03-04 00:38:46 +00:00
Treehugger Robot 49b445cace Merge "Update build_broken_logs script" 2020-03-04 00:21:51 +00:00
Automerger Merge Worker 2db5d65577 Merge "Make __ANDROID_APEX_<NAME>__ macro optional" am: 6efd3598c5
Change-Id: I71a7d1f7e0ad08f9edd037645ed9b38f1457816d
2020-03-03 23:50:04 +00:00
Jooyung Han 6efd3598c5 Merge "Make __ANDROID_APEX_<NAME>__ macro optional" 2020-03-03 23:35:02 +00:00
Bob Badour 3911e6a1c4 Make a soong-only copy of generate-notice-files.py
This is an unchanged copy of build/make/tools/generate-notice-files.py

After this change, the make implementation of generate-notice-files.py
will change to take a required parameter for $(PRODUCT_OUT) and will
only include notices for files built under $(PRODUCT_OUT).

Because soong has the ability to walk dependency trees, the soong
version will likely change in the future to use that ability causing
both versions to move in different directions.

After those changes are complete, we can look into factoring out any
remaining shared logic.

Test: run manually and system image notices checked for changes

Change-Id: Id139a66503457615548b46e7996349ca0817e831
2020-03-03 13:50:53 -08:00
Automerger Merge Worker 27205840f4 Merge "Optimize FirstUniqueStrings and FirstUniquePaths" am: 1a0f984d43
Change-Id: Icccf040e94e300673a7a515845b8b9cac37f8d0d
2020-03-03 21:05:12 +00:00
Colin Cross 1a0f984d43 Merge "Optimize FirstUniqueStrings and FirstUniquePaths" 2020-03-03 20:48:35 +00:00
Chih-Hung Hsieh 70b9316309 Add bugprone to global clang-tidy default checks
Test: WITH_TIDY=1 make
Change-Id: I1533c30035296fb1eaa7e2ff42360c5ff60a1d07
2020-03-03 12:05:22 -08:00
Automerger Merge Worker 5439035616 Merge "Improve documentation of CompileMultiTargets and related properties" am: db78490ecb
Change-Id: Icaf4932ed0a1a5cf65a7eac131f1992d703fdc2d
2020-03-03 20:03:06 +00:00
Automerger Merge Worker a86effc0bb Merge "Add -z separate-code to default ARM64 device flags" am: 593c8c332c
Change-Id: I6ee3df09f89169309f986d1e6aa3c56744266bbc
2020-03-03 20:03:02 +00:00
Paul Duffin db78490ecb Merge "Improve documentation of CompileMultiTargets and related properties" 2020-03-03 19:59:49 +00:00
Ivan Lozano 593c8c332c Merge "Add -z separate-code to default ARM64 device flags" 2020-03-03 19:32:47 +00:00
Automerger Merge Worker c579ed61a0 Only check copy rules into the snapshot directory am: e1ddcc9d5a
Change-Id: I5903b4192cc108302215d1680ab160d88a701d6e
2020-03-03 18:18:34 +00:00
Ivan Lozano c80bbb46b1 Add -z separate-code to default ARM64 device flags
Removing XOM had the side effect of removing "-z separate-code", which
was needed to override a new default after a recent toolchain update.
This led to some performance regressions in some tests. For now, add
this flag to the global arm64 device flags to return to the previous
behavior.

Bug: 150506341
Test: m -j
Change-Id: I54787954141d133e245dfd259a37bf4c3c8e7caa
2020-03-03 16:09:08 +00:00
Paul Duffin e1ddcc9d5a Only check copy rules into the snapshot directory
Test: m nothing
Change-Id: I6d9ab5a9f003193c5791a4ee6d3ee35730ddf96c
2020-03-03 16:02:26 +00:00
Automerger Merge Worker 578e7c8d35 Merge "Simplify java library sdk member code" am: 68e7d4a212
Change-Id: I6a0ab21d568a3ee1c2d19a35cfddafe91f113f0a
2020-03-03 15:49:52 +00:00
Paul Duffin 68e7d4a212 Merge "Simplify java library sdk member code" 2020-03-03 15:38:30 +00:00
Automerger Merge Worker 2b7ffbf6fc Merge "Add CommonOS variant for sdk" am: 38301601f7
Change-Id: I641dd33fc3a4af1def67157529bcc0239fbbf2de
2020-03-03 14:44:13 +00:00
Paul Duffin 38301601f7 Merge "Add CommonOS variant for sdk" 2020-03-03 14:32:07 +00:00
Automerger Merge Worker d679af350c Merge "Fix bug in error reporting when adding duplicate properties" am: 193d3b8e86
Change-Id: Ib9929e402cf3ed0c5649c25c98f2a494938734a2
2020-03-03 02:04:15 +00:00
Treehugger Robot 193d3b8e86 Merge "Fix bug in error reporting when adding duplicate properties" 2020-03-03 01:50:12 +00:00
Automerger Merge Worker 97cdc9ed00 Simplify message around nsjail error am: 1871d88e4f
Change-Id: I1f5aec4e094df4806041c86e1f4bc82771b7270c
2020-03-02 23:27:03 +00:00
Colin Cross 27027c765e Optimize FirstUniqueStrings and FirstUniquePaths
FirstUniquePaths is called on some long lists where the O(n^2)
behavior is problematic.  Use a map-based implementation for
longer lists.

Test: TestFirstUniqueStrings
Change-Id: I7181aba869e5ccc0f99c2fa7b8f03839f06e4307
2020-03-02 15:00:15 -08:00
Dan Willemsen 1871d88e4f Simplify message around nsjail error
We have known problems (docker; distros w/o user namespaces) which mean that we won't be turning this into a fatal error anytime soon. Also remove the bug report link, it's not useful to continue getting the same reports.

Change-Id: I271871d68150417ac938f074d3730cad4518e327
Test: treehugger
2020-03-02 20:36:06 +00:00
Paul Duffin ca7f0efc2d Improve documentation of CompileMultiTargets and related properties
Test: m nothing
Change-Id: I1e3f0bf7e2a1303d2519d8405a228e9234235514
2020-03-02 19:32:40 +00:00
Paul Duffin f5c0a9c8f3 Simplify java library sdk member code
Adds the accessor function for retrieving the impl/header jars to the
librarySdkMemberType structure instead of passing it into its
buildSnapshot() method.

That enabled:
* The removal of the [header/impl]LibrarySdkMemberType structs.
* The removal of their implementations of BuildSnapshot.
* Replacing buildSnapshot() with BuildSnapshot()

This will make subsequent refactoring of the SdkMemberType interface
a little simpler.

Test: m nothing
Bug: 150451422
Change-Id: I1f96986bb497cf9d9df9916e40065f66b35a4704
2020-03-02 19:32:40 +00:00
Paul Duffin 1356d8c0f3 Add CommonOS variant for sdk
Adds a CommonOS variant for sdk that depends on the os specific
variants and is used to generate a single sdk for multiple OsTypes,
e.g. host linux and android.

At the minute the member types only support a single OsType but the
basic mechanism for managing the CommonOS variant and collating the
variants across all of them is there.

The only visible effect of this change is that the location of the
generated snapshot is changed, it is no longer os specific and instead
is in the same location irrespective of which os it is built for.

A lot of tests needed to be changed to specify "common_os" as the
variant type instead of the specific os type. As that is the same across
all tests it is hard coded in CheckSnapshot method.

Test: m nothing
Bug: 150451422
Change-Id: If36be39b06d6910453649f7c288c2d34f688b2f4
2020-03-02 19:31:26 +00:00
Paul Duffin 109c2add59 Fix bug in error reporting when adding duplicate properties
Bug: 150451422
Test: m nothing
Change-Id: Ia557992d71537aca0757866e9114b30bdf52bb6b
2020-03-02 16:29:11 +00:00
Jooyung Han c87a059c88 Make __ANDROID_APEX_<NAME>__ macro optional
This is rarely used feature but cost alot for the local build and build
inra.

Bug: 150506627
Test: m
Change-Id: Iec3ada4a97c7b228f2818563fa0e81b407f2715a
2020-03-02 17:44:33 +09:00
Automerger Merge Worker 695543b6d7 Runtime deps to a stubs lib crosses APEX boundary am: 323a4c3ab3
Change-Id: Iec26a8e8e29c66464d5d72b8d5ce84e23d8d892a
2020-03-02 00:25:50 +00:00
Jiyong Park 323a4c3ab3 Runtime deps to a stubs lib crosses APEX boundary
When there is a runtime depedency (via runtime_libs property) to a
library providing stable C APIs, the dependency is considered as
crossing APEX boundary. Therefore, the requested lib doesn't need to be
made available to the APEX where the requesting lib is in.

Bug: 147813447
Test: m
Change-Id: I9cf8a5877850fb85b92c851e15fac921b8b7641b
2020-03-01 17:29:06 +09:00
Automerger Merge Worker 9cb0071b9e bundle config contains (path,manifest) pairs of embedded APKs am: cfaa1643e8
Change-Id: I9a823265cc275d3cd028673ef93af2c770e6031c
2020-02-29 09:32:38 +00:00
Automerger Merge Worker 878e45861b bundle config for apexes are auto-generated am: bd15961043
Change-Id: I1ee190b56f332f2c5be0cb34149f78756c1c1772
2020-02-29 09:32:35 +00:00
Jiyong Park cfaa1643e8 bundle config contains (path,manifest) pairs of embedded APKs
If an APEX contains APKs and the manifest package name of the APKs are
overridden (either via override_android_app
orPRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES), that the path to the APK
(relative in the APEX) and the overridden manifest package name is
recorded in the bundle config file.

Bug: 148002117
Test: m

Change-Id: Ibb90bcefb77fa6b2dad77cb2facc6079de9ab154
2020-02-29 09:07:46 +09:00
Jiyong Park bd15961043 bundle config for apexes are auto-generated
bundle config file for apexes are auto-generated. It is included in the
<apex>-base.zip file, which is expected to be extracted and then fed
into the bundletool.

This change is in preparation for the upcoming change to include
information about embedded apks in the bundle confir file.

Bug: 148002117
Test: m

Change-Id: If25d75e0f62036dc777faf8593ed8eb9a74950b0
2020-02-29 09:07:08 +09:00