Commit Graph

3324 Commits

Author SHA1 Message Date
Colin Cross
af44d57cbe Merge changes from topic "dexpreopt_bootjars" am: 49afb313ed am: 7931d32a00
am: 538a7a2124

Change-Id: I6a4bc320e694354e0619430137f67f8576fc0288
2019-02-18 19:20:26 -08:00
Colin Cross
538a7a2124 Merge changes from topic "dexpreopt_bootjars" am: 49afb313ed
am: 7931d32a00

Change-Id: I18aa12211f93116addb5cdba249363ced92af277
2019-02-18 19:12:13 -08:00
Colin Cross
7931d32a00 Merge changes from topic "dexpreopt_bootjars"
am: 49afb313ed

Change-Id: Icf46a334c41b43d5f3c59c3d56d97dfb97e13cc7
2019-02-18 19:04:36 -08: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
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
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
Yi Kong
f791aec7d9 Merge "Annotate No_libcrt with arch_variant" am: 4e3c60128f am: da69c65b88
am: 7886a6776f

Change-Id: Ic703ff048f1e374c0a8509baa85704dd58176fac
2019-02-15 12:54:22 -08:00
Yi Kong
7886a6776f Merge "Annotate No_libcrt with arch_variant" am: 4e3c60128f
am: da69c65b88

Change-Id: I4ab1924fd5258fecf8104ad5bc1d40863f0013b7
2019-02-15 12:49:19 -08:00
Yi Kong
da69c65b88 Merge "Annotate No_libcrt with arch_variant"
am: 4e3c60128f

Change-Id: Ia170a78cb583297f5a7eeb24656b914c5bc50fab
2019-02-15 12:46:14 -08:00
Yi Kong
4e3c60128f Merge "Annotate No_libcrt with arch_variant" 2019-02-15 20:39:25 +00:00
Pirama Arumuga Nainar
0e1f1ed2c6 Merge "Do not enable coverage for platform/llndk stub libraries" am: ff1b5c7b90 am: 48a609233b
am: d21f0d0df3

Change-Id: Id7ae4e5186564f30376925d21dec14e6e6fc4f7e
2019-02-15 11:40:46 -08:00
Pirama Arumuga Nainar
d21f0d0df3 Merge "Do not enable coverage for platform/llndk stub libraries" am: ff1b5c7b90
am: 48a609233b

Change-Id: I7d659c1c4d933629da5c565464af563f315992f1
2019-02-15 11:17:42 -08:00
Pirama Arumuga Nainar
48a609233b Merge "Do not enable coverage for platform/llndk stub libraries"
am: ff1b5c7b90

Change-Id: If62904ecb83ad3a3f0419ebb758b9f3d2b045143
2019-02-15 11:11:53 -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
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
Jiyong Park
92b89d9114 Remove prefer_sanitize.* properties am: f97782b18c
am: 548f147804

Change-Id: I6c20dec3b8e96dcda3817f7f8c0a87f663f0d878
2019-02-13 21:48:18 -08:00
Jiyong Park
548f147804 Remove prefer_sanitize.* properties
am: f97782b18c

Change-Id: I89cf55ff2cea384e1cf25c59f538dc185088a0cc
2019-02-13 21:42:27 -08: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
TreeHugger Robot
28fd9d8647 Merge "Remove prefer_sanitize.* properties" 2019-02-14 03:29:08 +00:00
Pirama Arumuga Nainar
52c3ff71f6 Extend coverage mutator to allow variants with coverage on and off am: 1acd4475f2 am: fd183f3742
am: 6d27f242e6

Change-Id: I995eb4480fffd822503e5eeb5998592f90f3aa68
2019-02-13 18:00:56 -08:00
Inseob Kim
12865b096a Create sysprop_library soong module am: c0907f191a am: 92053b977e
am: 751a2cb98a

Change-Id: Ie9976968934c4231492af4ad4cbbcfe38790f040
2019-02-13 17:25:17 -08:00
Pirama Arumuga Nainar
6d27f242e6 Extend coverage mutator to allow variants with coverage on and off am: 1acd4475f2
am: fd183f3742

Change-Id: Iab6d45302c66f6bff56666172012f07f79b2b4db
2019-02-13 16:42:58 -08:00
Pirama Arumuga Nainar
fd183f3742 Extend coverage mutator to allow variants with coverage on and off
am: 1acd4475f2

Change-Id: I3b3dcf65f68bae50f3476e70d690a9ff63c2fb2d
2019-02-13 16:26:03 -08:00
Inseob Kim
751a2cb98a Create sysprop_library soong module am: c0907f191a
am: 92053b977e

Change-Id: Ic93dc6cc80e0b822f1e3696ea62b2276903e3b9f
2019-02-13 16:13:17 -08:00
Yi Kong
9d03687eb4 Merge "Use no_libcrt property instead of hard coding projects to exclude" am: 02e4b568dc am: 908b3fa509
am: 78cdf2126c

Change-Id: Ie44d9507ea6758ba1c1ed2af6bb3e3f7eb7c0067
2019-02-13 16:06:42 -08:00
Pirama Arumuga Nainar
1acd4475f2 Extend coverage mutator to allow variants with coverage on and off
Bug: http://b/116873221

This allows us to enable coverage for a module (typically static
libraries) even if a dependent module cannot build with coverage.  In
this case, the dependent module can just pick the variant with coverage
off.

- Create the following variants from the coverage mutator:
  - "" (empty): Don't build  with coverage and always pick the
                non-coverage variants for dependents.  This variant is
                created for modules with 'native_coverage: false'.
  - "cov":      If this module's path is covered by the COVERAGE_PATHS
                option, build this module with coverage.  If not, build
                this module without coverage.  In either case, pick
                coverage variants ("cov") for dependencies if available.

- Do not enable coverage:
  - for NDK stub libraries
  - if sdk_version < 23 since libc doesn't export 'stderr' which is
    needed by the coverage/profile runtime library.
  - for VNDK libraries

Test: In AOSP: m COVERAGE_PATHS=system/security NATIVE_COVERAGE=true nothing

Change-Id: I4d08790d35cdeaf12fb3c4f999d69a870e65836a
2019-02-14 00:05:42 +00:00
Inseob Kim
92053b977e Create sysprop_library soong module
am: c0907f191a

Change-Id: I5ec9366b92ab8ca07ed41c93b8e2324a301a2bed
2019-02-13 15:57:16 -08:00
Inseob Kim
c0907f191a Create sysprop_library soong module
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.

As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.

Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
2019-02-13 23:32:51 +00:00
Yi Kong
78cdf2126c Merge "Use no_libcrt property instead of hard coding projects to exclude" am: 02e4b568dc
am: 908b3fa509

Change-Id: Ib53b66b742c47ec595ac641bc788c83d8044375d
2019-02-13 15:31:08 -08:00
Yi Kong
908b3fa509 Merge "Use no_libcrt property instead of hard coding projects to exclude"
am: 02e4b568dc

Change-Id: I7e143026e60cb2263ce2a37b5bd856ea133ac128
2019-02-13 14:59:10 -08:00
Jiyong Park
abda0eb76b 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

Change-Id: I55961d400dcbac067a5c0dcecb90e399d4991a70
2019-02-13 20:54:25 +09:00
Yi Kong
19408a3aaa Use no_libcrt property instead of hard coding projects to exclude
Test: m checkbuild
Change-Id: Id4d3605a5cd45dd43b752a9d270df0a20024dbd0
2019-02-12 09:41:18 -08:00
Jiyong Park
004e8d00fe Merge "Static variant of a stubs lib is correctly tracked" am: eebdf43337 am: d563bc7b92
am: 5c16c31be5

Change-Id: I4ce6595041cf9f57ae01235b51b90f018010977d
2019-02-08 21:16:08 -08:00
Jiyong Park
5c16c31be5 Merge "Static variant of a stubs lib is correctly tracked" am: eebdf43337
am: d563bc7b92

Change-Id: I26d23ed0e19fc0ca40c28c70a14deab2ed0ea044
2019-02-08 21:12:05 -08:00
Jiyong Park
d563bc7b92 Merge "Static variant of a stubs lib is correctly tracked"
am: eebdf43337

Change-Id: I431341b18a2601b25fa459c0fb108ce9ae36b860
2019-02-08 21:08:03 -08:00
Treehugger Robot
eebdf43337 Merge "Static variant of a stubs lib is correctly tracked" 2019-02-09 04:56:07 +00:00
Jiyong Park
b32e622293 Merge "Handle the case when a symbol is annotated with "# apex vndk"" am: 3415780021 am: 11e6e5c76c
am: afdb54813e

Change-Id: Ic63b1ee87e9f3d958ea67945a517a2aba64a2b60
2019-02-08 11:05:39 -08:00
Jiyong Park
afdb54813e Merge "Handle the case when a symbol is annotated with "# apex vndk"" am: 3415780021
am: 11e6e5c76c

Change-Id: I91c072425b69efbc96b49235c3b4f7e7d3846218
2019-02-08 11:01:39 -08:00
Jiyong Park
11e6e5c76c Merge "Handle the case when a symbol is annotated with "# apex vndk""
am: 3415780021

Change-Id: I2567afe4afab0f9a71d87f3cafffb21f35fdf0a0
2019-02-08 10:57:34 -08:00
Treehugger Robot
3415780021 Merge "Handle the case when a symbol is annotated with "# apex vndk"" 2019-02-08 18:46:44 +00:00
Jiyong Park
1431765f8d Handle the case when a symbol is annotated with "# apex vndk"
This change fixes a bug that a symbol is omitted for apex (or vndk) when
it is annotated with "# vndk apex" (or "# apex vndk).

Bug: 123349183
Test: python3 test_gen_stub_libs.py

Change-Id: I344d6e70732bae8877cb16bbe881edb79fe90670
2019-02-08 20:36:26 +09:00
Colin Cross
32fd5947ca Make MakeVarsContext a PathContext am: 65494b962b am: e5bc0d6253
am: 1c15057b94

Change-Id: I3521fec124f35017812ed2c3faf9fb7e46f73a3a
2019-02-07 18:21:45 -08:00
Colin Cross
1c15057b94 Make MakeVarsContext a PathContext am: 65494b962b
am: e5bc0d6253

Change-Id: I0c2daaefb69f8b9bcbb2e4a3ce68858d85e64baa
2019-02-07 18:04:19 -08:00
Colin Cross
e5bc0d6253 Make MakeVarsContext a PathContext
am: 65494b962b

Change-Id: I1a2eab146c5f5327591c44faf224b562aac86610
2019-02-07 17:45:24 -08:00
Colin Cross
65494b962b Make MakeVarsContext a PathContext
Expose all of SingletonContext to makeVarsContext, and then export
the subset of it that is used through MakeVarsContext.SingletonContext,
plus what is necessary for PathContext, directly through
MakeVarsContext.

Test: m checkbuild
Change-Id: Ie00f36e577fe110b6fa03b901da489d8547773c6
2019-02-07 22:31:04 +00:00
Aurimas Liutikas
b74157dfb3 Merge "Update NDK library list" am: 7cf14099b7 am: aa6f7adb24
am: 812dde86dd

Change-Id: I0e03ab3ce27746fcc362c2773a81b96370b8d8a7
2019-02-07 13:05:20 -08:00
Aurimas Liutikas
812dde86dd Merge "Update NDK library list" am: 7cf14099b7
am: aa6f7adb24

Change-Id: Ibe65dc99dde67305087b6410715a40bc52bd6c55
2019-02-07 13:01:16 -08:00
Aurimas Liutikas
aa6f7adb24 Merge "Update NDK library list"
am: 7cf14099b7

Change-Id: I2963a3359f1e20f67990ba0473340ad70bbcecbe
2019-02-07 12:57:13 -08:00
Jiyong Park
e4bb986106 Static variant of a stubs lib is correctly tracked
cc.Module.staticVariant is used to track the corresponding static
variant of a shared variant. This change fixes a problem that the
staticVariant field is not correctly set when the lib is with stubs:
{...}. This was happening because the staticVariant was set by adding
dependency from shared variant to static variant to reuse object files.
However, for a lib with stubs, the dependency was not created because it
does not make sense to share object files for stubs lib where source
code is auto-generated.

Fixing the issue by adding dependency to the static variant with a
different dependency tag whose only purpose is to set staticVariant
field.

Bug: 122885634
Test: m (cc_test amended)
Change-Id: I7f97cbb4c4a28bf9a93839d3b91ee140835aa6af
2019-02-08 00:47:46 +09:00
Dan Willemsen
7b515764c7 Return early after NDK->non-NDK library link error am: 155d17c1da am: 63833a3882
am: 71c27ff72b

Change-Id: I3d167340cefe4c67ff1efcc3be8ac7b4047c4f0a
2019-02-06 23:06:39 -08:00