Commit graph

17620 commits

Author SHA1 Message Date
evitayan
2e5606736f Update ike.jar's name in code coverage configuration
ike has been renamed to android.net.ipsec.ike. This commit applies
this name updates to the code coverage configuration.

Bug: 148625578
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false android.net.ipsec.ike.com.android.ipsec_intermediates/ contains jacoco-report-classes.jar
Change-Id: Ic46a1091899eb5bc9560739ec86a9bea08585075
2020-02-25 07:43:43 +00:00
Jiyong Park
139fa4320f Merge changes Ibaf383c4,I2b1c0736
* changes:
  Expect added members for instrumented modules
  Reland "Turn on the instrumentation by default for the java code in APEXes"
2020-02-25 07:02:33 +00:00
Jiyong Park
93e57a0b86 Expect added members for instrumented modules
hiddenapi expects that all members in a class to have corresponding hidden
API flags. However, this can't be satisfied when the java module having
the class is instrumented; JaCoCo added a few number of synthetic
members. In this case, give 'no-force-assign-all' option to the hidden
api tool so that it doesn't complain about the synthetic methods.

Also, disabling instrumenting jacocoagent itself, because it doesn't
make sense.

Exempt-From-Owner-Approval: PS3 fixes a typo in a comment. PS2 got ORV.

Bug: 149353192
Test: SKIP_ABI_CHECKS=true EMMA_INSTRUMENT=true
EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true m
out/soong/.intermediates/external/apache-xml/apache-xml/android_common_com.android.art.debug/hiddenapi/unaligned/unaligned.jar
Change-Id: Ibaf383c439945ab664e885af319548b56e2c8cb6
2020-02-25 07:01:18 +00:00
Treehugger Robot
4483601b58 Merge changes Idd50ed38,Icbc86b21
* changes:
  Add cc_prebuilt_library_headers
  Separate cc_library_headers to its own file and add tests
2020-02-25 04:05:16 +00:00
Treehugger Robot
a35e3ffd96 Merge "Merge CSV files generated by UnsupportedAppUsageProcessor." 2020-02-25 04:01:52 +00:00
Treehugger Robot
65b5b59664 Merge "Output json without trailing whitespaces but with trailing newlines." 2020-02-25 00:39:23 +00:00
Colin Cross
48c2f294a6 Merge "Require apps built against the SDK to use JNI built against the NDK" 2020-02-25 00:21:07 +00:00
Martin Stjernholm
37fa32ce94 Output json without trailing whitespaces but with trailing newlines.
Makes them more editor friendly, primarily when copied into
system/linkerconfig/testdata/root.

Test: m
Test: No diff between apex_manifest_full.json in out/
  and in linkerconfig/testdata/root/
Bug: 140599044
Change-Id: I6dacdd4baa59e6d70586c4a6343b9b8fd1b574f6
2020-02-24 22:20:49 +00:00
Colin Cross
897266ed5c Make filesToInstall return InstallPaths and add it to Module
Test: m checkbuild
Change-Id: I9170c7e22f000a2d0343e74a96079b24e8ad66f5
2020-02-24 15:51:27 +00:00
Colin Cross
609c49a389 Add pathForInstall and InstallPaths
pathForInstall will allow code in the android package to get paths
to the install directory.

InstallPaths provides helpers for handling lists of install paths.

Test: m checkbuild
Change-Id: I058201b205bc8bc67f3c1f62952aaaf758c47fd8
2020-02-24 15:51:18 +00:00
Paul Duffin
91756d2498 Add support for cc_library_headers in sdk/module_exports
Bug: 148933848
Test: m nothing
Change-Id: Ife6ee0f736238727a11b4421532eaeb29d46c1b7
2020-02-24 14:49:22 +00:00
Paul Duffin
a78f3a7360 Prune any empty property sets from the modules before transforming
Ensures that the generated prebuilt modules do not contain empty
property sets.

Bug: 148933848
Test: m nothing
Change-Id: I99d5da1c4e3a72836e81e021ef043df53888e66b
2020-02-24 14:49:22 +00:00
Paul Duffin
64f54b0ae8 Simplify cc library sdk snapshot handling of include dirs/headers
Previously, the code for generating a snapshot of a cc library was
split into two separate phases. The first phase copied the files that
needed copying and the second phase added the properties for the
include dirs. This separation made it difficult to make sure that the
two phases were in sync.

This change merges those two phases together so the same paths used to
copy the files are used in the properties ensuring consistency. As the
various type of include dir and header were treated slightly different
to each other this parameterizes that behavior.

Bug: 142935992
Test: m nothing
Change-Id: I7877464987bbdae9662e5e3f02bb5e5a75dca5a3
2020-02-24 14:49:22 +00:00
Paul Duffin
180a006a3b Add support for transforming a property set after its contents
This change adds support for transforming a property set after its
contents. This allows a transform to recursively prune empty property
sets that were created for a module.

The transformPropertySet method was renamed to
transformPropertySetBeforeContents and a new
transformPropertySetAfterContents method was added.

Bug: 148933848
Test: m nothing
Change-Id: Ia198d47e042b98c69406db4bc12859869816a387
2020-02-24 14:49:22 +00:00
Paul Duffin
047fdcac0f Fix issues with bp transformation
Returning nil from transformPropertySet in order to remove it did
not work because it ends up comparing as (*bpPropertySet, nil) and
not an untyped nil which causes the test against nil to fail.

This change adds tests to check that returning nil will delete a
property/property set from the containing property set and fixes the
code so that it passes the tests. It extracts common code to transform
a property set and its contents as well as code for creating new
property sets.

Bug: 148933848
Test: m nothing
Change-Id: I35dc3c39c76e701821891622615c09b094cf697f
2020-02-24 14:49:22 +00:00
Paul Duffin
f5ea9e1f76 Add cc_prebuilt_library_headers
In preparation for adding cc_library_headers support to
sdk/module_exports.

Two changes were needed to make the prebuilt version work.
1) Had to stop the prebuilt version of the library from creating static
   and shared variants for header only.
2) Had to allow the code to export/reexport include dirs to run even
   when no src is provided.

Bug: 148933848
Test: m nothing
Change-Id: Idd50ed38bc90d1d93551f78e6310f167941487d9
2020-02-24 14:49:22 +00:00
Paul Duffin
1c6c1c7251 Separate cc_library_headers to its own file and add tests
Preparation for adding cc_library_headers to sdk.

Bug: 148933848
Test: m nothing
Change-Id: Icbc86b21f44dc79393b82be339cf3b133cbf9d8c
2020-02-24 14:49:22 +00:00
Jiyong Park
00cae1cc88 Reland "Turn on the instrumentation by default for the java code in APEXes"
This reverts commit c021ea0b35.

Bug: 149353192
Change-Id: I2b1c0736202de26c5ea88c0ab14574bd7207a5fb
Test: N/A (this is a clean revert) forward fix will be followed
2020-02-24 15:59:21 +09:00
Treehugger Robot
efbce1cace Merge "Add C++ Host support on sysprop_library" 2020-02-24 02:29:09 +00:00
Nikita Ioffe
5d600c9169 For legacy10 APEXes default target_sdk_version and min_sdk_version to 29
Test: m com.android.conscrypt
Bug: 149733822
Change-Id: Ia863b5701716ef4022b470ee758368ea4fffb1d4
Merged-In: Ia863b5701716ef4022b470ee758368ea4fffb1d4
(cherry picked from commit db10c13bdf)
2020-02-22 17:33:28 +00:00
Treehugger Robot
f9f6a91376 Merge "Allow compile_multilib to be specified on module exports" 2020-02-22 10:07:43 +00:00
Colin Cross
50317874ff Add min_sdk_version property to apexes
Add a min_sdk_version property apexes.  Currently a noop, but will
be used to enforce that dependencies are compatible with the
specified version.

Test: m checkbuild
Bug: 149591522
Change-Id: I923773c90fe15becbffae3986791aa9edde8f8f6
2020-02-21 14:54:31 -08:00
Colin Cross
094cde4430 Require apps built against the SDK to use JNI built against the NDK
Apps that expect to run on older platforms should use JNI libraries
that will also run on older platforms.  Require that apps that set
sdk_version have jni_libs modules that also set sdk_version, or
set jni_uses_platform_apis: true to bypass the check.

Fixes: 149591057
Test: app_test.go
Change-Id: I76b9b45fb5773bc4dfc10520108f4f3578723909
2020-02-21 14:54:31 -08:00
Colin Cross
f7d84017f7 Use header jar without jarjar for sharded classpath
Sharding uses the header jar of all of the classes of the module
with the sources of a subset, but was incorrectly used the jarjar
version of the header jar, which may have renamed some of the
classes.

Fixes: 149969343
Test: m framework-minus-apex
Change-Id: I568c939f8030d3ddc1e7fa8796cffcac4d6172e8
Merged-In: I568c939f8030d3ddc1e7fa8796cffcac4d6172e8
(cherry picked from commit f5a6628b27)
2020-02-21 14:31:01 -08:00
Ivan Lozano
61f7a24cea Merge "Allow Linux hosts to use ubsan runtime sanitizers." 2020-02-21 21:16:17 +00:00
Bob Badour
a75b057e17 Unless overridden include LICENSE files in notices.
As a second step to removing the go/android3p instructions to copy or
to link NOTICE to LICENSE, include LICENSE files in the notices, which
will allow deleting all of the copied/linked NOTICE files.

The change causes a few additions to the system image notice files.

Test: manually built and compared before and after notices
Change-Id: Ia7bc58e2eba7bed5e63934881b5298201a93bc3e
2020-02-21 20:40:43 +00:00
Baligh Uddin
004d717158 Allow for setting a logging_parent for an Apex.
Test: go test ./... -test.v -run TestOverrideApex
BUG: 148198056
Change-Id: Ib3749e59f5e31903f2dbe75f86534738147a55ec
2020-02-21 16:59:26 +00:00
Paul Duffin
13ad94fce2 Allow compile_multilib to be specified on module exports
This is needed to allow the art-host-module-exports to restrict itself
to just managing the linux 64 bit version of the host tools as that is
the only variant that is currently supported by all host tools. This
greatly simplifies that process and allows us to make progress on the
unbundling.

Bug: 142935992
Test: m nothing
Change-Id: I62d016d97c2df73e5feecf912638f477fedd97c9
2020-02-21 09:01:08 +00:00
Treehugger Robot
a0d58893fc Merge "Ensure consistent handling of generated headers/dirs" 2020-02-21 08:19:33 +00:00
Treehugger Robot
1c1c6ab46b Merge "Do not add dependencies from disabled sdk variants to its members" 2020-02-21 08:18:25 +00:00
Colin Cross
1a9be9f3d0 Merge "Add jni_uses_platform_api property to android_app" 2020-02-21 06:58:48 +00:00
Treehugger Robot
5c50e7f7c4 Merge "Add static_libs field to target.vendor" 2020-02-21 03:57:05 +00:00
Chong Zhang
ed5c14632a Add static_libs field to target.vendor
test: builds with a local Android.bp that uses target.vender.static_libs

Change-Id: Id1b70660ccab26025c280497916929d303d16aff
2020-02-20 15:21:38 -08:00
Lingfeng Yang
3f561c692d Merge "Add minijail to whitelist.go" 2020-02-20 22:51:16 +00:00
Chih-hung Hsieh
78620004fc Merge "Enable bitwise-conditional-parentheses warning" 2020-02-20 21:55:28 +00:00
Paul Duffin
5efd1985d1 Ensure consistent handling of generated headers/dirs
The list of exported generated headers are all expected to be within
one of the exported generated include dirs. Previously, that was not
the case as ExportedGeneratedIncludeDirs was suitable for extracting
to common properties (which changes the output location) and
exportedGeneratedHeaders was not.

This would cause a problem if there was only one variant. In that case
the ExportedGeneratedIncludeDirs would be treated as a common property
and placed in include_gen/<x> directory while exportedGeneratedHeaders
would be treated as an arch specific property and placed in
<arch>/include_gen/<x>.

Bug: 142935992
Test: m nothing
Change-Id: Idf82a5ca551b44ec31971c7ff3bd957a4c38f396
2020-02-20 21:52:02 +00:00
Paul Duffin
583bf7ebf7 Do not add dependencies from disabled sdk variants to its members
If an sdk variant is disabled (e.g. say windows) then it should not
add dependencies on corresponding sdk member variants as if those
variants have not been created then the build breaks unnecessarily.

This is needed to make progress on unbundling art which provides at
least one host tool (dex2oat) that is not supported on all platforms
and some (hiddenapi) that only produce 64 bit versions.
Initially, the art prebuilts will only support building 64 bit
versions of linux host tools.

Bug: 142935992
Test: m art-module-sdk art-module-host-exports art-module-test-exports
Change-Id: Idfbb40bb3cabc6eb731a2b38f045ed14f0a713cc
2020-02-20 21:51:52 +00:00
Treehugger Robot
53fe467c67 Merge changes from topic "soong_tests_ndk"
* changes:
  Make apex use cc.GatherRequiredDepsForTests
  Move NDK test modules into cc/testing.go
2020-02-20 20:39:16 +00:00
Ivan Lozano
9ac32c7674 Allow Linux hosts to use ubsan runtime sanitizers.
Linux host prebuilts for UBSan runtime are available now, so we can
enable these. There's a bit more work to be done for Windows/Darwin
support, so that's left to another CL.

Bug: 148289941
Test: Build host binary with integer overflow sanitization enabled.
Test: ./art/test/testrunner/run_build_test_target.py art-linux-bionic-x64

Change-Id: Ie98979116fa3bb8accb23d1788adcc28330a9530
2020-02-20 20:27:35 +00:00
Artur Satayev
b5df8a04ad Merge CSV files generated by UnsupportedAppUsageProcessor.
Flow:
1. Annotation processor generates a CSV file per class as a CLASS_OUTPUT resource.
2. hiddenapi.go extracts individual .csv files and merges them into an index.csv file per module.
3. hiddenapi_singleton.go merges individual index.csv files into a combined .csv file.

In a follow up hiddenapi-index.csv would replace unsupportedappusage_index.csv

Bug: 145132366
Change-Id: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Test: diff unsupportedappusage_index.csv hiddenapi-index.csv
2020-02-20 20:21:49 +00:00
Treehugger Robot
112045230d Merge "Use flag names with merge_csv.py." 2020-02-20 19:17:19 +00:00
Maciej Żenczykowski
3a15b8973d Merge "bpf progs depend on system/core/libcutils/include" 2020-02-20 16:31:31 +00:00
Baligh Uddin
3be82c00fe Create manifest_utils library target.
This utility can also be used for parsing and
managing the Android Manifest for apex under
system/apex/apexer.

Test:
python manifest_fixer_test.py
python manifest_check_test.py

BUG: 148198056
Change-Id: Iffe465b5f36b2a3fbf81414d6f19e241c5f5648f
2020-02-20 15:58:00 +00:00
Lingfeng Yang
0f8c5b4ac8 Add minijail to whitelist.go
The latest version of crosvm refers to minijail as a separate crate:

2dae56768c%5E%21/#F1

The current version of minijail in aosp crosvm-master isn't a crate,
but minijail in aosp master is a crate and builds with crosvm.

This allows the latest version of crosvm to build in the Android tree
and use minijail in the same tree.

Change-Id: I2231149f1488727754430183d04072c5cc0f570a
2020-02-20 07:27:15 -08:00
Paul Duffin
44885e29d6 Simplify visibility rules that include //visibility:public
While it is invalid to mix //visibility:public with other rules in the
visibility property in a .bp file tt was possible, by overriding
defaults, to have //visibility:public mixed in with other rules in the
effective visibility rules. That caused problems when those effective
rules were used in an sdk snapshot.

This change replaces any set of rules that include //visibility:public
with just the //visibility:public rule. That simplifies those rules,
making them cheaper to process and ensures that the effective rules are
valid in the visibility property.

Adding test support required some refactoring of the
effectiveVisibilityRules(BaseModuleContext, ...) and underlying methods
to take a Config instead of BaseModuleContext as the tests do not have
access to BaseModuleContext.

Bug: 142935992
Test: m nothing - new tests failed without change, work with it
      Add dex2oat to art-module-host-exports, build it and check the
      generated Android.bp file in the snapshot to ensure the
	  visibility property for the dex2oat prebuilt does not mix
	  //visibility:public with other rules.
Change-Id: I08e7f0dcb40838d426fe88fedf69eae27b77473c
2020-02-20 11:41:17 +00:00
Chih-Hung Hsieh
5f78d55a0a Enable bitwise-conditional-parentheses warning
Bug: 148286937
Test: make
Change-Id: Ib793e35e1f3098e2cce760bcbf0f115ae5764c7f
Merged-In: Ib793e35e1f3098e2cce760bcbf0f115ae5764c7f
2020-02-20 00:58:41 -08:00
Inseob Kim
89db15dcab Add C++ Host support on sysprop_library
With Host_supported: true, C++ part of sysprop_library will create host
variant which can be used from host modules. As there are no native
system property support on host, libbase functions will be used instead.
Adding support on host will help reduce code complexity of other
host_supported modules.

Bug: 147708854
Test: m, sysprop_test, manually test host binary
Change-Id: I850d91fea298ef1a0c16c6a7a9ec1aca5cf37e69
2020-02-20 17:39:20 +09:00
Dan Willemsen
7fa7646ad7 Add tests for py(2|3)-cmd
Test: m par_test{,3} py{2,3}-cmd; ./runtest.sh
Change-Id: I4aadd9fc85be4381bd9a0843064ceaa87150b5ee
2020-02-19 19:40:38 -08:00
Colin Cross
ee87c60fc3 Add jni_uses_platform_api property to android_app
Add a jni_uses_platform_api property that will be used to allow
an app that builds against the SDK to use JNI libraries that build
against platform APIs.  For now it is a noop, but the next CL will
make it enforcing.

Bug: 149591057
Test: m checkbuild
Change-Id: Id7b7c8186bf0e28498a4cfb15c6a6ccc95df3679
2020-02-19 19:07:11 -08:00
Colin Cross
f9aabd719a Make apex use cc.GatherRequiredDepsForTests
Remove the duplicated native modules from apex_test.go.

Test: all soong tests
Change-Id: Ib88af058d23cf37446d7a4bb571edfb1e0880854
2020-02-19 19:07:11 -08:00