Commit graph

9779 commits

Author SHA1 Message Date
Treehugger Robot
e67c20ce90 Merge "Override module's C flags when coverage is enabled" 2019-02-20 05:40:18 +00:00
Treehugger Robot
d8ced0f1d9 Merge "build apexkeys.txt" 2019-02-20 01:53:44 +00:00
Dan Willemsen
ac0f5d3643 Merge "Use python / python2.7 prebuilts" 2019-02-20 01:51:06 +00:00
Treehugger Robot
bce06b6840 Merge "soong_zip after dex should not fail when no *.dex files were generated" 2019-02-19 18:38:11 +00:00
Pirama Arumuga Nainar
c7679de4ab Override module's C flags when coverage is enabled
Bug: http://b/116873221

Disable -Wframe-larger-than because building without optimization can
make frame larger.  Building dng_sdk with coverage results in a bigger
stack frame than the limit in C flags.

Get optimization level back to -O0 if module has a non-default
optimization level.  Not doing so causes link failures with
libneuralnetworks.so.

Test: Build with coverage.
Change-Id: I36b2979bb6a73023458c8de3241e975845bd36eb
2019-02-19 10:00:27 -08:00
yangbill
4f41bc2bed [SOONG] Not auto-generate test config if test_suite is cts
Current soong use source code's under cts as the rule for judgement.
Should change to use test_suites define instead.

Bug: 124313692
Test: m hello_world_test, make sure test config be auog-enerated.
      Modified platform_testing/tests/example/native/Android.bp
      m hello_world_test, make sure test config not be auto-generatetd.

Change-Id: I1bc5216f73329d2a82d9ff29ccbede436dd2976c
2019-02-19 22:25:50 +08:00
David Brazdil
1f9e90a304 Merge "Set usesNonSdkApi in manifest when Platform_apis=true" 2019-02-19 09:53:34 +00:00
Pirama Arumuga Nainar
dd739bbdf2 Merge "Enable coverage for vendor-related libraries" 2019-02-19 05:19:41 +00:00
Jiyong Park
0ca3ce867c build apexkeys.txt
apexkeys.txt is a text file having APEX-to-keys mappings. The file is
included in the target-files package where it is used when re-sign the
APEXes with release keys.

Each line of the file consists of 5 fields:
1) name: file name of the APEX
2) public_key: the public key for the apex_payload.img of the APEX
3) private_key: the private key used to sign the apex_payload.img
4) container_certificate: the certificate used to sign the APEX zip
container
5) container_private_key: the private key used to sign the APEX zip
container

Bug: 124406181
Test: m out/soong/apexkeys.txt and inspect the content
Test: TARGET_BUILD_APPS=com.android.tzdata m dist and make sure
out/dist/apexkeys.txt exists
Change-Id: I1daa13ec50956323b97e15e8df7f1fbe5ea21d63
2019-02-19 14:13:36 +09:00
Logan Chien
8a851cfce8 Merge "Print --llndk to create_reference_dumps command" 2019-02-19 03:48:12 +00:00
Colin Cross
49afb313ed Merge changes from topic "dexpreopt_bootjars"
* changes:
  Add more paths helper methods
  Add java/testing.go for sysprop_test.go
  Move dexpreopting of boot jars into Soong
2019-02-19 02:55:16 +00:00
Dan Willemsen
0f0214699e Use python / python2.7 prebuilts
Bug: 117811537
Test: treehugger
Change-Id: I35b335edcfa202a45f55f588a643c62c2ced0f26
2019-02-18 19:34:00 +00:00
David Brazdil
d25060aa2d Set usesNonSdkApi in manifest when Platform_apis=true
The Platform_apis field in CompilerDeviceProperties currently has no
effect. Unify the behaviour with make and run manifest_fixer.py to
encode the information in the manifest. This is used to exempt
bundled apps and platform tests from hidden API access checks without
having a fixed whitelist of packages.

Bug: 113315999
Bug: 124671117
Test: m UbSystemUiJankTests && \
      aapt d xmltree \
      target/product/taimen/data/app/UbSystemUiJankTests/UbSystemUiJankTests.apk \
      AndroidManifest.xml | grep usesNonSdkApi
Change-Id: I20c392d91ee6275ef8139fbeb5b9700385abbc80
2019-02-18 19:21:02 +00:00
Dan Willemsen
b03dc8e54e Merge "Support building a par file that does not automatically run" 2019-02-18 18:59:06 +00:00
Paul Duffin
f854d3e4be Merge "Support libraries (not just boot jars) that have hiddenapi" 2019-02-18 12:19:42 +00:00
Logan Chien
6227fed029 Print --llndk to create_reference_dumps command
This commands adds `--llndk` to `create_reference_dump.py` command if
the module with incompatible ABI changes is an LLNDK or a NDK lib. This
prevents people from uploading a CL that simply removes ABI dumps (the
result even when the uploader runs the command).

Bug: 124620774
Test: Make an incompatible ABI changes in libaaudio and see the flag.
Change-Id: I9f07f879193bd4d73f5924baff298d28d6fe1506
2019-02-18 13:35:36 +08:00
Treehugger Robot
39b31fa071 Merge "Get latest api version" 2019-02-18 01:12:47 +00:00
Dan Willemsen
6ca390f0b4 Support building a par file that does not automatically run
Mainly so that we can build a `python` prebuilt that acts like the
normal python install, though you could also build different ones with
more packages pre-installed.

Bug: 117811537
Test: move built py2-cmd into prebuilts/build-tools/path/linux-x86/python and build
Change-Id: I21215f6fd3754d89f8c65e1dfeb3f2deea23239f
2019-02-17 12:14:23 -08:00
Colin Cross
40e3373d41 Add more paths helper methods
Add PathsForOutput to convert multiple strings into WritablePaths.

Add OutputPath.InSameDir to build a new OutputPath pointing to a
file in the same directory as an existing OutputPath.

Add WritablePathForTesting and WritablePathsForTesting that mirror
PathForTesting and PathsForTesting but return WritablePaths.

Add PathContextForTesting to return a minimal PathContext
implementation.

Test: paths_test.go
Change-Id: I9708eb164b273514a96dae0a260ef9a963fb9bcf
2019-02-16 17:08:07 -08:00
Colin Cross
e4759b9ab9 Add java/testing.go for sysprop_test.go
Share more of the setup code for java tests to sysprop_tests.go.

Test: java_test.go, sysprop_test.go
Change-Id: I0e3b287bf188c432d995a9a91a18ebef12aa47d1
Merged-In: I0e3b287bf188c432d995a9a91a18ebef12aa47d1
(cherry picked from commit b19745363f)
2019-02-16 17:08:01 -08:00
Dan Willemsen
41364fe521 Merge "Simplify python launcher, use __main__.py" 2019-02-16 22:33:00 +00:00
Elliott Hughes
d8c94cb566 Merge "Switch sed(1) to toybox." 2019-02-16 16:58:16 +00:00
Treehugger Robot
8c460a7581 Merge "Fix dependencies in strip.sh" 2019-02-16 04:37:20 +00:00
Colin Cross
800fe13146 Move dexpreopting of boot jars into Soong
Implement the dexpreopting of boot jars in singleton rules in
Soong.

Test: m checkbuild
Change-Id: Ic02ce941fa5e238b839b3eb4c06a3e10c62d98ff
2019-02-15 16:16:25 -08:00
Colin Cross
25397f52ff Fix dependencies in strip.sh
strip.sh was including the dependencies of dexpreoptRule instead
of stripRule, resulting in incorrect rebuilds.

Bug: 124529711
Test: m && m
Change-Id: I4b40f7c040442a03918c16a46ecf777f5cc30130
2019-02-15 16:16:25 -08:00
Elliott Hughes
47de2a2f52 Switch sed(1) to toybox.
Test: treehugger
Change-Id: I575ae9db8d94cbec811d0029691df98373f8fe35
2019-02-15 15:49:12 -08:00
Pirama Arumuga Nainar
2f289aca6e Enable coverage for vendor-related libraries
Bug: http://b/116873221

Enable coverage for libraries that use VNDK and those that have vendor
variants.  This previously caused a redefinition error in the
Android-<product>.mk but was indirectly fixed when
https://android-review.googlesource.com/c/platform/build/soong/+/906394
disabled coverage for LLNDK stub libraries.

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=frameworks nothing
Change-Id: Iccbc1c15c68562449ffffe7bbcc3d22419d84bfe
2019-02-15 15:24:47 -08:00
Dan Willemsen
707542f298 Simplify python launcher, use __main__.py
Uses more python rather than C++, and skips less of Py_Main.

Test: build/soong/python/tests/runtests.sh
Change-Id: I03997d88e2e16047c96bb4e00e530229c42b3325
2019-02-15 14:33:59 -08:00
Dan Willemsen
7b88d7c9f6 Merge changes from topics "darwin_awk", "rename_path_prebuilts"
* changes:
  Use prebuilt awk on Darwin too
  Stop calling our host $PATH prebuilts toybox
2019-02-15 21:45:26 +00:00
Yi Kong
4e3c60128f Merge "Annotate No_libcrt with arch_variant" 2019-02-15 20:39:25 +00:00
Pirama Arumuga Nainar
ff1b5c7b90 Merge "Do not enable coverage for platform/llndk stub libraries" 2019-02-15 19:07:39 +00:00
Colin Cross
0653d6d464 Merge "Fix resource overlay order for static libraries" 2019-02-15 18:54:49 +00:00
Sasha Smundak
d3cf4ee87b soong_zip after dex should not fail when no *.dex files were generated
This can happen if Android application has only a manifest file and no
java code.

Fixes: 124483155
Test: treehugger with Android.mk converted to Android.bp in
platforms/frameworks/base/tests/privapp-permnissions

Change-Id: I45f95680b62a7a4bda0e7ab156f3df24b0dad70b
2019-02-15 10:14:23 -08:00
Yi Kong
410d834752 Annotate No_libcrt with arch_variant
libcrt is crashing libc on x86/x86_64 for unknown reason. This enables
us to disable libcrt for these architectures for libc for now.

Test: m checkbuild
Bug: 29275768
Change-Id: I5a717286b3d9cc1ba8cdcd33bafb9c225de4aff8
2019-02-15 10:07:18 -08:00
Paul Duffin
e5b5657f87 Support libraries (not just boot jars) that have hiddenapi
The build assumes (apart from one minor exception) that only modules
that are in the PRODUCT_BOOT_JARS list require processing as part of
the hiddenapi. Unfortunately, that is not true for android.test.base,
at least not when REMOVE_ATB_FROM_BCP=true.

This change adds a white list (containing android.test.base) of
additional modules that should be processed as part of the hiddenapi
and updates the hiddenapi.go file to use it.

It does not matter that android.test.base is a boot jar and in the
white list, the behavior is the same as it would be if it was only
in one.

Bug: 73711752
Test: make REMOVE_ATB_FROM_BCP=true droid and make droid
Change-Id: I1c64272f444e6866136c65fb7c48910d55811844
2019-02-15 14:35:30 +00:00
Dan Willemsen
733547d522 Use prebuilt awk on Darwin too
Test: build on mac
Change-Id: I25d21c0df0b9023d6c43b11dde60e6066f107576
2019-02-14 20:11:26 -08:00
Dan Willemsen
9121973130 Stop calling our host $PATH prebuilts toybox
There's more than just toybox in this group now, so let's rename our
variables to something closer to the desired behavior, rather than the
first user.

Test: treehugger
Change-Id: I76d4407792061c8110b194cfe73f1ddc84dbc22f
2019-02-14 20:07:02 -08:00
Treehugger Robot
bf920d5264 Merge "Add ":name" support for manifest and androidManifest properties in apex" 2019-02-15 00:13:28 +00:00
Pirama Arumuga Nainar
8113835940 Do not enable coverage for platform/llndk stub libraries
Bug: http://b/116873221

These are used only for linking, and secondly, don't link with libc or
other system libraries.

Test: Build system/core/libnativeloader with coverage
Change-Id: I37eae572a5eaa00f0e8c72bc1453e967b5bcb577
2019-02-14 15:39:31 -08:00
Joel Fernandes
83ddfdf19a Merge "Add common BPF helper to include path" 2019-02-14 21:40:43 +00:00
Treehugger Robot
d325aa7b97 Merge "Add par_test" 2019-02-14 20:45:12 +00:00
Jaewoong Jung
fc46f28b6f Merge "Add a prebuilt module type for usr/share." 2019-02-14 15:39:33 +00:00
Paul Duffin
2fbbfb8630 Remove reference to legacy-test and core-junit from comments
The legacy-test and core-junit are no longer used by the runtime,
core-junit was removed a long time ago, legacy-test will be removed
soon.

Bug: 63127064
Test: TH
Change-Id: I094e7263afcba76b40361c3a681c9fd7a4314133
2019-02-14 10:53:59 +00:00
Sundong Ahn
8faab8a547 Get latest api version
The logic of getting latest api version has problem that we don't
guarantee $(module_name).latest is latest api txt file. So change this
logic to get the latest api txt file.

Test: make -j40
Change-Id: Ibbd8475061fc76169a4c94dcf148fece45b9a41d
2019-02-14 19:46:34 +09:00
Jiyong Park
809bb724f5 Add ":name" support for manifest and androidManifest properties in apex
The manifest and androidManifest properties in the apex module type now
supports ":name" syntax.

Bug: 123857186
Test: m (apex_test amended)
Change-Id: Ic4e5a73cf73260d156ec61d07932ad07b2561413
2019-02-14 15:28:58 +09:00
Colin Cross
bec8530972 Fix resource overlay order for static libraries
If a static library has static library dependencies then all resources
need to be moved to an overlay to maintain the correct ordering so
that a static library resource overlays the same resource in a
dependency.

Also fix the ordering of transitive static dependencies, a direct
dependency should override a transitive dependency.

Expand TestEnforceRRO to include a transitive static library and
verify both the direct resources and overlays, and rename it to
TestAndroidResources.

Bug: 124108931
Test: TestAndroidResources
Change-Id: I355f835a2ffb728af28aa208d951794c609e7409
2019-02-14 03:35:21 +00:00
Jiyong Park
f97782b18c Remove prefer_sanitize.* properties
The properties are no longer required as an APEX module is mutated with
required sanitizers which are gathered by scanning the sanitizers that
are enabled for its direct dependencies.

Bug: 124128094
Test: m on marlin
The extractor libs are found under /system/apex/com.android.media

Merged-In: I55961d400dcbac067a5c0dcecb90e399d4991a70
Change-Id: I55961d400dcbac067a5c0dcecb90e399d4991a70
(cherry picked from commit abda0eb76b)
2019-02-14 12:30:49 +09:00
Dan Willemsen
22e9244b16 Add par_test
This test adds a number of checks for the visible python state inside a
hermetic par file.

Test: build/soong/python/tests/runtests.sh
Change-Id: I7188d862a309a09623169e1f967bde86707d41af
2019-02-14 02:18:05 +00:00
Jaewoong Jung
dfa4a486eb Merge "Update Soong docs generator for blueprint changes" 2019-02-14 01:51:04 +00:00
Treehugger Robot
e9433ca127 Merge "Ensure that make doesn't flatten zipapex files." 2019-02-14 00:26:42 +00:00