Commit graph

9730 commits

Author SHA1 Message Date
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
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
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
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
Colin Cross
58b31ad33a Merge "Add RuleBuilder.Installs().String()" 2019-02-13 23:11:38 +00: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
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
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
bd907cb12b Merge "APEX certificates can be overriden by PRODUCT_CERTIFICATE_OVERRIDES" 2019-02-13 13:31:58 +00: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
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
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
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
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
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
Colin Cross
a838004f8c Merge "Run makevars singleton after all other registered singletons" 2019-02-13 00:27:33 +00:00
Treehugger Robot
75569e0f46 Merge "Make OncePer.Once reentrant" 2019-02-12 22:58:09 +00:00
Colin Cross
450bde14b8 Merge "Change type of Once keys to OnceKey" 2019-02-12 21:13:56 +00:00
Colin Cross
e5cdaf9221 Make OncePer.Once reentrant
The value constructor passed to OncePer.Once may call back into
Once.  Replace the global mutex with a temporary channel stored
in the map using the key, and have callers for the same key
wait on the channel if they find it instead of a real value.

Test: TestOncePerReentrant
Change-Id: Ifa88a3c48981b5076b83f47fbdee5d26311725c6
2019-02-12 19:03:53 +00: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
02f3e09450 Merge "Add prefer_sanitize.* properties to apex" 2019-02-12 06:44:00 +00:00
Colin Cross
7805791106 Merge "Add support for use_embedded_dex in Soong" 2019-02-12 00:46:52 +00:00
Colin Cross
897d2ed92f Make java_sdk_library implement Dependency
dexpreopting boot jars is going to need to visit both java_library
and java_sdk_library modules.  Since java_sdk_library is already
a java_library module, move the SdkLibraryDependency methods out
of the way so that it will implement Dependency.  Also requries
re-ording some of the type switches to check for the more-specific
SdkLibraryDependency first.

Test: TestJavaSdkLibrary
Change-Id: I155c9ffaf31689dd150a4d99e07e432ff770b4a7
2019-02-11 15:29:51 -08:00
Colin Cross
c7e40aa578 Move dexpreopt image selection out of dexpreopt package
Instead of passing both the module and global dexpreopt image
selection into the dexpreopt package, determine the correct
dexpreopt image in the java package.

Also stop using the boot image "location" as an input, only
track the real path, and then convert it to the "location"
that dex2oat expects when constructing the command line.

Test: m checkbuild
Change-Id: I2be2b5917e09fd57428dab27849c0153fdc75722
2019-02-11 15:29:51 -08:00
Colin Cross
580d2ce642 Run makevars singleton after all other registered singletons
Move the makevars singleton after all dyamically registered
singletons, but before the env singleton, to ensure that it
can reference values initialized in other singletons.

Test: m checkbuild
Change-Id: I6ea45d3a174b94d4e89f3168894399e7022733e4
2019-02-11 15:29:51 -08:00
Colin Cross
e48ff5bbd4 Change type of Once keys to OnceKey
Require that the key for Once calls be created with NewOnceKey
or NewCustomOnceKey.

Test: m checkbuild
Change-Id: I44b8ea6034338b45f558f862b21d5732364cbf0f
2019-02-11 15:29:51 -08:00
Colin Cross
8e41cdb267 Merge "Revert "Never strip and store dex files uncompressed when they are preopted on system."" 2019-02-11 19:31:31 +00:00
Colin Cross
67e8ec1973 Revert "Never strip and store dex files uncompressed when they are preopted on system."
This reverts commit 4bb0106759.

Reason for revert: b/123436620

Change-Id: Ia7595ace4b76abaa99dbb651e7d2f088dec5bad9
2019-02-11 19:30:46 +00:00
Jaewoong Jung
0dcfee56b8 Merge "Make PrebuiltEtcHostFactory public." 2019-02-11 16:22:13 +00:00
Nicolas Geoffray
4bb0106759 Never strip and store dex files uncompressed when they are preopted on system.
In order for the runtime module to always be able to compile apps,
make sure we keep a copy of the dex files optimally.

Gated by a product flag if a product doesn't include the module yet.

Test: build
Change-Id: I4bfe00184fcfdf44b8d1866c5c550838b869c60a
2019-02-09 22:08:14 +00:00
Treehugger Robot
eebdf43337 Merge "Static variant of a stubs lib is correctly tracked" 2019-02-09 04:56:07 +00:00
Treehugger Robot
2851b8dad5 Merge "Docs: update path to soong_build.html" 2019-02-09 04:24:27 +00:00
Jiyong Park
235e67c281 Add prefer_sanitize.* properties to apex
It is used to configure an apex to prefere specific sanitizer variants
if available. For example, if a lib is with sanitize: {cfi: true} then
an APEX with prefer_sanitize: {cfi: true} will use the sanitized variant
of the lib.

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

Change-Id: I858778eef78c5791cdeb497c7c11688cb128b5fe
2019-02-09 12:07:08 +09:00
Treehugger Robot
53d312637f Merge "Make manifest and APK agree on uncompressed native libs" 2019-02-09 02:25:32 +00:00
Mikhail Naganov
e0d0a453d2 Docs: update path to soong_build.html
On the recent versions, the module types help
is generated into $OUT_DIR/soong/docs/soong_build.html

Test: make && ls -l out/soong/docs/soong_build.html
Change-Id: Ib7522a417fd5467f19d7393672a592d349f276f4
2019-02-08 16:41:40 -08:00
Mikhail Naganov
ab1f518fb0 Improve error messages about paths
Quote the path parameter in the message to distinguish it
from the text. This makes messages more understandable.

Before: source path include does not exist
After:  source path "include" does not exist

Test: build Android
Change-Id: I99dbbce3cf090682a230d05bf120549a2cc7af3c
2019-02-08 13:32:08 -08:00
Jaewoong Jung
ea66057a50 Merge "Add Android.mk lines for package name overriding." 2019-02-08 21:00:27 +00:00