Commit Graph

10342 Commits

Author SHA1 Message Date
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
Alex Light
89f43f6549 Merge "Ensure that make doesn't flatten zipapex files."
am: e9433ca127

Change-Id: Ia6ad052aac395ded1992cd50973810c42ddea8c6
2019-02-13 16:51:07 -08:00
Treehugger Robot
e9433ca127 Merge "Ensure that make doesn't flatten zipapex files." 2019-02-14 00:26:42 +00: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
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
Colin Cross
a3c846bfb9 Merge "Add RuleBuilder.Installs().String()"
am: 58b31ad33a

Change-Id: I0f11f7af99fd112feaccc4b1f97784ad5a69f326
2019-02-13 15:52:18 -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
Yoshisato Yanagisawa
051b533901 Merge "More verbose message on goma_ctl.py ensure_start failure."
am: 8f66b1b733

Change-Id: Ib0fe5e579517de75ce55159e9245b9f2e1b599ed
2019-02-13 15:13:56 -08:00
Colin Cross
58b31ad33a Merge "Add RuleBuilder.Installs().String()" 2019-02-13 23:11:38 +00: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
Treehugger Robot
8f66b1b733 Merge "More verbose message on goma_ctl.py ensure_start failure." 2019-02-13 22:53:28 +00:00
Treehugger Robot
02e4b568dc Merge "Use no_libcrt property instead of hard coding projects to exclude" 2019-02-13 21:53:26 +00:00
Jaewoong Jung
c3fcdb4baa Add a prebuilt module type for usr/share.
This is almost the same as prebuilt_etc except the base path.

Bug: 122616578
Test: prebuilt_etc_test.go + manual test with external/neven
Change-Id: Ie3d17c06a878853ec9df93fe2c61c8772bc5cff4
2019-02-13 12:56:24 -08:00
Colin Cross
7089c27c07 Update Soong docs generator for blueprint changes
bootstrap.ModuleTypeDocs needs a mapping of module types to factories
to support factories that are wrapped in ModuleFactoryAdapter closures.

It also returns ModuleType objects grouped into Package objects.

Bug: 67909957
Test: m soong_docs
Change-Id: I70eac9f0f0e13075580da92d4219792ca0b18fbf
2019-02-13 20:39:26 +00:00
Alex Light
f1801bc0a5 Ensure that make doesn't flatten zipapex files.
Zip apex files are not really installed so should not ever be
flattened. Unfortunately we didn't send this information to make which
would still unzip everything.

Test: ALLOW_MISSING_DEPENDENCIES=true
      ./art/tools/build_linux_bionic_tests.sh com.android.runtime.host
Bug: 124333446

Change-Id: I3eda579f8c40f768f1ef2be867967f436396cd4c
2019-02-13 19:14:15 +00:00
Colin Cross
f7bbb64eef Add module type docs to the java package
am: 1b16b0e031

Change-Id: I998664d00ce780580a1c9079ba18b5a5e9cc7545
2019-02-13 10:55:21 -08:00
Colin Cross
1b16b0e031 Add module type docs to the java package
Add some overview of the java module types so that we have something
to display in the autogenerated docs.

Bug: 67909957
Test: m soong_docs
Change-Id: I3594dd550f8272f4418f3ea12cded4083674809b
2019-02-13 18:39:40 +00:00
Colin Cross
deabb94380 Add RuleBuilder.Installs().String()
Add a RuleBuilderInstalls type for a slice of RuleBuilderInstalls,
and give it a String() method that returns the list of installs
in the format that is convenient for passing to Make.

Test: rule_builder_test.go
Change-Id: I2e9cd9abf4dfb0ad312d0a6662f1567baf9cd222
2019-02-13 08:03:29 -08:00
Jiyong Park
d36b771661 Merge "APEX certificates can be overriden by PRODUCT_CERTIFICATE_OVERRIDES"
am: bd907cb12b

Change-Id: I70a161e2b9ecc84a50451322d147e5a15b6a1955
2019-02-13 05:38:21 -08:00
Jiyong Park
bd907cb12b Merge "APEX certificates can be overriden by PRODUCT_CERTIFICATE_OVERRIDES" 2019-02-13 13:31:58 +00:00
Nicolas Geoffray
9f04bacac6 Merge "Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system."""
am: 59d15c192d

Change-Id: I2d51ba0d5c5affb391bed5322f64a4d64b2f72bd
2019-02-13 04:10:23 -08:00
Nicolas Geoffray
59d15c192d Merge "Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""" 2019-02-13 11:59:39 +00:00
Nicolas Geoffray
fa6e9ec003 Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""
This reverts commit 67e8ec1973.

Test: build && atest android.text.cts.EmojiTest#testEmojiGlyphWebView on Cuttlefish
Exempt-From-Owner-Approval: Got +2 from Colin, latest PS is a rebase across conflicts.

Change-Id: I99faf0f2ec698d70c107516bd43756b9ddcb90d0
2019-02-13 11:59:20 +00:00
Paul Duffin
55eb2f9e03 Support $(location...) in droiddoc_options
am: 1151247c29

Change-Id: Ife22fe8dcc94cd83d2757f07ebe39a7a9cdbdf92
2019-02-13 02:34:21 -08:00
Paul Duffin
a0957054ac Fix droiddoc handling of $(location ...)
am: 99e4a50202

Change-Id: I0f11abb344848b51c6fdd23345d1eef60edfe376
2019-02-13 02:22:50 -08:00
Jiyong Park
b2742fdec9 APEX certificates can be overriden by PRODUCT_CERTIFICATE_OVERRIDES
Test: m (apex_test amended)
Change-Id: I9b66a250c9ca20ad754e12455de2b444cf19b1fa
2019-02-13 19:22:43 +09:00
Paul Duffin
1151247c29 Support $(location...) in droiddoc_options
Adds droiddoc_option_files property which are passed through to
droiddoc's arg_files property.

Bug: 124220029
Test: make checkbuild
Change-Id: I6e98752cebeaac5a8779e04e6c804763c177e354
2019-02-13 10:11:54 +00:00
Paul Duffin
99e4a50202 Fix droiddoc handling of $(location ...)
Bug: 124218911
Test: make checkbuild
Change-Id: I4d9c52b40ce4e8b9ae07f557e079e4f101fbbe87
2019-02-13 10:11:54 +00:00
Jiyong Park
e4046ab31d Allow each APEX to provide its own AndroidManifest
am: 40e26a2a99

Change-Id: I20279ed7c9a5e18a42169ae6d5e45f905cdbdd71
2019-02-12 23:34:14 -08:00
Jiyong Park
40e26a2a99 Allow each APEX to provide its own AndroidManifest
AndroidManifest.xml file can be specified via the 'androidManifest'
property in the apex module type. It can be used to have a custom
AndroidManifest.xml that have additional tags (such as <uses-sdk> or
<uses-feature>) for precise targeting.

The property is optional; if unspecified, then one is auto-generated as
before.

Bug: 123857186
Test: m apex_test_build_features
Change-Id: Id7ee0471661887cfa11124cbaa3beea8cffcdda4
2019-02-13 16:24:59 +09:00
Alex Light
2d310f950b Merge "Always build zipapex's unflattened."
am: ad0328deb8

Change-Id: I38e5502b8be3c3948a936f51c625dd0b4ca53030
2019-02-12 22:29:07 -08:00
Treehugger Robot
ad0328deb8 Merge "Always build zipapex's unflattened." 2019-02-13 06:19:54 +00:00
Yoshisato Yanagisawa
02eaccafbd More verbose message on goma_ctl.py ensure_start failure.
For ease of investigating the issue with error reports, let me make
the error message more verbose.

Test: make goma_ctl.py raise Exception and run.
Test: I confirmed verbose error message shown.
Change-Id: I04f9a5ca4808746994c41ddce8a5b22a1975fcc2
Signed-off-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
Bug: 124218940
2019-02-13 10:49:10 +09:00
Colin Cross
7e071999a2 Add OutputPath.ReplaceExtension()
am: 8854a5a805

Change-Id: Ie79a3410a739879d8c14a8b66bb5656ee808a1b4
2019-02-12 17:18:43 -08:00
Colin Cross
77ccfd8324 Add RuleBuilderCommand.FlagForEachArg()
am: c7ed004dd3

Change-Id: I670c997252c9cabb32297246499bdde561c7fae2
2019-02-12 17:18:33 -08:00
Colin Cross
97e623455c Use ArchType in dexpreopt config
am: 74ba962d29

Change-Id: I3b88b561922ca0e88ab17cfc05eecb65146bfe85
2019-02-12 17:18:19 -08:00
Colin Cross
78f9df046e Merge "Make java_sdk_library implement Dependency"
am: 1cd8a57510

Change-Id: Iaf7f80cd5095a8b49f6c308b71d78730a71b133d
2019-02-12 17:17:56 -08:00
Colin Cross
c8e7005b65 Merge "Move dexpreopt image selection out of dexpreopt package"
am: a5ffe2426f

Change-Id: Ia6a12a33bf59630191a0c0bd97cea5bf040bcf6f
2019-02-12 17:15:44 -08:00
Colin Cross
8854a5a805 Add OutputPath.ReplaceExtension()
Add a helper method that returns a new OutputPath with the
extension replaced.

Test: paths_test.go
Change-Id: I7f93b3475031a19b53652022740488373a1b7d97
2019-02-12 17:07:35 -08:00
Colin Cross
c7ed004dd3 Add RuleBuilderCommand.FlagForEachArg()
Add an analog to FlagForEachInput that takes non-path arguments.

Test: rule_builder_test.go
Change-Id: Ifdf5a16079018bfff9b06ce48b13b104a93fddd7
2019-02-12 17:07:35 -08:00
Colin Cross
74ba962d29 Use ArchType in dexpreopt config
Make ArchType implement the encoding.TextMarshaller and
encoding.TextUnmarshaller interfaces so that it can be used
as a value in the dexpreopt config structs that are passed
through JSON files.

Test: m checkbuild
Change-Id: Ie4c12443e7ee5fe43f42d5403bcde12d62f617e2
2019-02-12 17:05:47 -08:00
Alex Light
2a2561f8ac Always build zipapex's unflattened.
Zipapex's cannot be flattened so do not prevent them from being built
even if TARGET_FLATTEN_APEX is set.

Test: lunch aosp_arm-eng;
      ALLOW_MISSING_DEPENDENCIES=true \
      ./art/tools/build_linux_bionic.sh com.android.runtime.host

Bug: 124333446
Change-Id: I4bef65cce100136a8f7852692e841b62ed9e399f
2019-02-12 17:04:47 -08:00
Elliott Hughes
7a6a06be27 Merge "Switch to one-true-awk."
am: a0f23ad233

Change-Id: I0d86bcab6ca9c6a917de3d9820db3c40a7f04bd5
2019-02-12 17:03:07 -08:00
Colin Cross
1cd8a57510 Merge "Make java_sdk_library implement Dependency" 2019-02-13 01:01:03 +00:00
Colin Cross
a5ffe2426f Merge "Move dexpreopt image selection out of dexpreopt package" 2019-02-13 01:00:49 +00:00
Elliott Hughes
a0f23ad233 Merge "Switch to one-true-awk." 2019-02-13 00:56:35 +00:00