Commit Graph

17171 Commits

Author SHA1 Message Date
Logan Chien
e87dae6083 Merge "Run ABI checks for shared libs exported by APEX" 2019-12-10 17:36:55 +00:00
Mitch Phillips
734b4cb62f Add $ORIGIN to fuzzer-coverage sanitized .so's.
Build fuzzer-sanitized libraries with an $ORIGIN DT_RUNPATH. Android's linker
uses DT_RUNPATH, not DT_RPATH. When we deploy cc_fuzz targets and their
libraries to /data/fuzz/<arch>/lib, any transient shared library gets the
DT_RUNPATH from the shared library above it, and not the executable, meaning
that the lookup falls back to the system. Adding the $ORIGIN to the DT_RUNPATH
here means that transient shared libraries can be found colocated with their
parents.

This may have some interesting consequences if:

 1. Your fuzz target depends on a shared library which has `sanitize.fuzzer:
 false` (as the DT_RUNPATH won't have `$ORIGIN`, and so you may get missing
 libraries).
 2. A `SANITIZE_TARGET=fuzzer` platform has a shared object in two
 different directories (like system vs. ndk) and is depending on the linker
 implementation details to resolve this in some manner.

I don't believe either of these instances should reasonably happen in
practise.

Fixes: 145973404
Fixes: 145988908
Test: m example_fuzzer
Change-Id: I94cbf628fc1ce15c43283d72bdabd9817de1fef8
2019-12-10 17:35:55 +00:00
Nikita Ioffe
c72b5dd10a Add property to apex soong modules to generate an APEX without hashtree
This will help testing on-device hashtree generation.

Test: see other CL in topic
Bug: 145670581
Change-Id: I96b1b2392302aed8a6e80ed52de2d057a532a288
2019-12-10 11:24:53 +00:00
Sundong Ahn
87306ea8f5 Merge "Add system_ext_specific"
am: 4858e41719

Change-Id: I3031e5a99e8d31bff39fa0befdecfaea1cc3e53f
2019-12-09 17:48:00 -08:00
Treehugger Robot
4858e41719 Merge "Add system_ext_specific" 2019-12-10 01:28:45 +00:00
Alexander Smundak
2b8e3a34cc Merge "Expand namespaces explanation."
am: 863d5ded9d

Change-Id: Ie1263db33d70eba63cc85d0fe555f780302efd27
2019-12-09 16:14:57 -08:00
Andrew Chant
26f8210a88 Merge "Revert "soong: upgrade Android platform to clang-r370808""
am: ed75f18e25

Change-Id: I4fcee1678161f540c1975d785530feecd09b4342
2019-12-09 16:12:54 -08:00
Martin Stjernholm
47a7da1485 Merge "Move/dedupe some host path functions in package_ctx.go."
am: 455e3a089d

Change-Id: I6012d4e10bd630b82cc8fabaab4f40bbefb0de47
2019-12-09 16:09:32 -08:00
Alexander Smundak
863d5ded9d Merge "Expand namespaces explanation." 2019-12-10 00:06:20 +00:00
Inseob Kim
4b3e3b6720 Merge "Fix generated headers of snapshot"
am: 8fc9eeacc8

Change-Id: I82d0066b4bac7f17c3e1ab8b47251ca8e2bdfc4c
2019-12-09 16:05:33 -08:00
Andrew Chant
ed75f18e25 Merge "Revert "soong: upgrade Android platform to clang-r370808"" 2019-12-09 23:37:23 +00:00
Treehugger Robot
455e3a089d Merge "Move/dedupe some host path functions in package_ctx.go." 2019-12-09 23:20:16 +00:00
Treehugger Robot
8fc9eeacc8 Merge "Fix generated headers of snapshot" 2019-12-09 23:15:55 +00:00
Martin Stjernholm
7260d066ea Move/dedupe some host path functions in package_ctx.go.
These functions don't need a PackageContext object.

Test: m
Bug: 145934348
Change-Id: Ia1da2c76cbad292f9ca79617199b2b5b6b265568
2019-12-09 22:04:21 +00:00
Sasha Smundak
d42609e15c Expand namespaces explanation.
Test: N/A
Change-Id: Iec7d40e6886285046fbe00aea8e19073c6c1ba73
2019-12-09 13:26:09 -08:00
Paul Duffin
02b3bc1a58 Ensure prebuilt modules have same visibility as source modules
am: 593b3c9fb0

Change-Id: Ie04e0cc30de41d13b138f0fe2ddf16039c81ae40
2019-12-09 13:19:53 -08:00
Paul Duffin
210bc6ef3d Pass SdkMember to AddPrebuiltModule instead of the name
am: 9d8d609fcd

Change-Id: Ib90a0f5c4eeb7b7d125064f4e58a3084c2464436
2019-12-09 13:18:40 -08:00
Nick Desaulniers
862eb4648a Revert "soong: upgrade Android platform to clang-r370808"
This reverts commit 4f49e35902.

Causes test failures in ndk_translate.
Bug: 145807809
Bug: 145827049
Test: N/A
Change-Id: I8f42a15fec44475b74b1926c70bc98e03fe66f52
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-12-09 19:16:08 +00:00
Paul Duffin
593b3c9fb0 Ensure prebuilt modules have same visibility as source modules
Exports visibility and package mutator registration functions so they
can be used in sdk testing. Updates sdk test to support visibility and
package modules.

Adds EffectiveVisibility(...)[]string function to make the effective
visibility rules available to sdk snapshot creation.

Extracts compositeRule.Strings() []string from compositeRule.String()
method so that it can be used by above func.

Adds visibility property to sdk snapshot and prebuilt modules along
with a test to ensure it works properly.

Adds dir parameter to CheckSnapshot so that it can check the snapshot
generated for a non-root package. That is required in order to ensure
that visibility of :__subpackages__ on a source module in package
<pkg> is resolved to an effective visibility of
//<pkg>:__subpackages__ on its corresponding prebuilt.

Test: m conscrypt-module-sdk
Bug: 143678475
Change-Id: Icaacac5b9c04726d28e6fec93e49715ac45df7f4
2019-12-09 13:32:28 +00:00
Paul Duffin
9d8d609fcd Pass SdkMember to AddPrebuiltModule instead of the name
This is needed for a follow up change that makes sure that the
prebuilt modules have the same visibility as the source modules.

Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: I9461c8c094ab19ee9ececb5e5fd50565789f2fa2
2019-12-09 13:28:36 +00:00
Jooyung Han
b90e491e2b Expose some factories for aidl_test.go
Because aidl_interface depends on some ndk modules, their factories are
exposed so that aidl_test.go can use them.

Bug: n/a
Test: m
Change-Id: I98d282cc77310d5896a7abaf3936456a14d56ccf
2019-12-09 18:21:48 +09:00
Inseob Kim
d110f878a7 Fix generated headers of snapshot
For VNDK snapshot and SDK snapshot, deps files have been used to capture
generated headers. But exported deps might contain intermediate phony
files instead of actual header files, which are for optimization of
ninja. To correctly capture all headers, exported generated header files
are gathered separately.

Bug: 65377115
Test: m nothing
Change-Id: Ia03fa69186490a818578190e3c0bfb0261d1fd6e
2019-12-09 12:38:34 +09:00
Jiyong Park
53ae334130 add apex_pubkey and apex_manifest.pb to the bundle module
The two were missing.

Bug: 145678884
Test: m out/dist/mainline_modules_arm64/com.android.tzdata-base.zip and
inspect the content

Change-Id: I7e244561f59e5adce56b6a64f363a413faa106f2
2019-12-08 02:06:24 +09:00
Paul Duffin
89c61eeae9 Merge "Cleanup java.DefaultsFactory()"
am: 667039f404

Change-Id: Ia3c1ceee2e96d85675161953fb9c6173d2b1ae47
2019-12-07 02:06:49 -08:00
Paul Duffin
d38afab757 Merge "Support header and implementation jars in sdk"
am: 8cda6d93de

Change-Id: I80c62596a72f0319d62eb4fe32e308db18589c9e
2019-12-07 02:06:21 -08:00
Treehugger Robot
667039f404 Merge "Cleanup java.DefaultsFactory()" 2019-12-07 08:52:21 +00:00
Treehugger Robot
8cda6d93de Merge "Support header and implementation jars in sdk" 2019-12-07 08:52:09 +00:00
Colin Cross
a129b29c76 Merge "Move ImageMutator after archMutator"
am: e2f3b5dfe5

Change-Id: Ibf2ef2e4b2f119b6bd04a54cf00ab2d099ce7627
2019-12-06 16:46:29 -08:00
Treehugger Robot
e2f3b5dfe5 Merge "Move ImageMutator after archMutator" 2019-12-07 00:37:30 +00:00
Jeff Sharkey
76991e9429 Merge "Overridden APEX doesn't contribute to the file contexts"
am: e2e4a5dd56

Change-Id: If8a688b89f38aa22a0c31507331b1c910ba98779
2019-12-06 15:09:06 -08:00
Jeff Sharkey
e2e4a5dd56 Merge "Overridden APEX doesn't contribute to the file contexts" 2019-12-06 23:02:01 +00:00
Elliott Hughes
d06667fc1a Merge "Enable -Wpragma-pack warnings as errors."
am: b5d11197d3

Change-Id: I4fa37cd5e85080646b1339e5ca014d396c2da9c0
2019-12-06 14:16:26 -08:00
Elliott Hughes
b5d11197d3 Merge "Enable -Wpragma-pack warnings as errors." 2019-12-06 22:07:20 +00:00
Colin Cross
ae6c5207cc Move ImageMutator after archMutator
Move the ImageMutator to be registered just after the archMutator
in preparation for moving it between osMutator and archMutator.
Requries updating variants in a few tests that now run the
ImageMutator.

Bug: 142286466
Test: no change to build.ninja
Test: all soong tests
Change-Id: Ia9d2a7bc0e225bedec3c9a83ea04f471a931bf47
2019-12-06 12:37:14 -08:00
Jeongik Cha
eff8478327 Merge "Link type checking for java_library"
am: f3c24c12ef

Change-Id: I1630cf20beec882d5a6aec8189d56f6b1fe45c39
2019-12-06 11:13:54 -08:00
Treehugger Robot
f3c24c12ef Merge "Link type checking for java_library" 2019-12-06 18:59:48 +00:00
Dan Willemsen
a87aecec69 Merge "Add sharding support to multiproduct_kati"
am: ad1997eebc

Change-Id: Iedbf9bd8751dece3f62e88003b8e62a835d89279
2019-12-06 09:46:41 -08:00
Dan Willemsen
ad1997eebc Merge "Add sharding support to multiproduct_kati" 2019-12-06 17:40:23 +00:00
Ulyana Trafimovich
4c1df60960 Merge "Pass correct --image argument to oatdump."
am: a4f02412a1

Change-Id: I2a799616d99584105df7ba03ab1dbef3c4e6fcf7
2019-12-06 09:11:02 -08:00
Ulyana Trafimovich
a4f02412a1 Merge "Pass correct --image argument to oatdump." 2019-12-06 16:55:39 +00:00
Paul Duffin
cef37ba4ee Separate out module type specific test config
am: d835daaade

Change-Id: I7d80cfcedf4e31fc584c4af16ac4835c01f1ca3f
2019-12-06 08:47:17 -08:00
Paul Duffin
4735766ef8 Cleanup java.DefaultsFactory()
This function took a props varargs parameter but it was only ever
called with no parameters. The props parameter meant it could not be
used directly with RegisterModuleType() so the defaultsFactory() func
was added which simply called through to DefaultsFactory().

Removing the props varargs parameter allowed it to be used directly
with RegisterModuleType() and so the defaultsFactory() could be
removed.

This was needed because a follow up change adds a test in another
package that uses java_defaults and so it needs the factory method
(defaultsFactory()) to be exported.

Test: m nothing
Change-Id: I33d5c4d4ce8f349b1e6fc706d5e9656faf303b4f
2019-12-06 16:13:58 +00:00
Paul Duffin
a0dbf43a82 Support header and implementation jars in sdk
Add a new java_header_libs property that exports header jars (as
java_libs currently does) and switch java_libs to export implementation
jars instead.

Refactors implementation of the existing library sdk member type so
both properties can be supported from common code as they differ only
on the jar being exported.

Bug: 143678475
Test: m nothing
Change-Id: I04642122f72d083bbdfd3290624f957b71ee8875
2019-12-06 16:13:58 +00:00
Paul Duffin
d835daaade Separate out module type specific test config
Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: I71433a7c89dfae4c27537f1f66bd677cf9fba0b3
2019-12-06 16:13:58 +00:00
Paul Duffin
f44ca6b363 Merge changes Ia7dbcd41,I93140450,I4d3fe18f,Ib00870dd,I10203594
am: 3a7caaa80c

Change-Id: Ib0ee79a0bc6d6cc15e9fe8620d4d2461f18b2779
2019-12-06 07:58:05 -08:00
Paul Duffin
eeaa413714 Merge "Use static build rules in snapshot generation"
am: 7467a714b0

Change-Id: I2ee0d433e3ac586103c931295fea5d807156617f
2019-12-06 07:57:39 -08:00
Treehugger Robot
3a7caaa80c Merge changes Ia7dbcd41,I93140450,I4d3fe18f,Ib00870dd,I10203594
* changes:
  Organize sdk member properties
  Extract the cc and java sdk related tests out into their own file
  Improve testing of sdk snapshot generation
  Separate sdk testing infrastructure from sdk tests
  Parameterize the sdk member processing
2019-12-06 15:55:24 +00:00
Paul Duffin
7467a714b0 Merge "Use static build rules in snapshot generation" 2019-12-06 15:52:00 +00:00
Jeongik Cha
e403e9e8dc Link type checking for java_library
Link type checking for java_library has not been working unintentionally.
So turn on link type checking for these types.

And also add tests for link type checking.

Bug: 145799020
Test: cherry-pick aosp/1182522 and check if build fails
Test: m nothing and there is no error(soong unittest)

Change-Id: Ifc347f657885de1028ac0076ddd103c0387b597a
2019-12-07 00:45:02 +09:00
Anton Hansson
1297ecfea6 Revert "Move odexes of non-system apps into system_other"
am: d57bd3c84f

Change-Id: I9f319c484164e0636db08b0afd36e9bdf834244e
2019-12-06 07:27:01 -08:00