Commit graph

10523 commits

Author SHA1 Message Date
Patrice Arruda
ea3fcdffc2 Soong: Add synopsis to several modules under the cc package.
Added synopsis to the following modules under cc package:
    * llndk_headers
    * llndk_library
    * vendor_public_library
    * toolchain_library

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I0f6e3b01b478d46afeacbe6fc8e05f96d6217c7d
2019-04-03 14:43:03 -07:00
Patrice Arruda
6e1c3faed5 Merge "Soong: Add synopsis to cc_prebuilt_* modules." 2019-04-02 15:11:37 +00:00
Colin Cross
92cc71606c Merge changes I7dd4ba7f,I7887a67a
* changes:
  Add depfile support to RuleBuilder
  Add RuleBuilderCommand.Flags
2019-04-02 15:04:06 +00:00
Jiyong Park
7a313bc614 Merge changes from topic "apex_bundle_pubkey"
* changes:
  Key property is removed from prebuilt_apex
  Always bundle the public key for APEX
2019-04-02 14:26:12 +00:00
Andrei-Valentin Onea
dca6ac3e35 Merge "Automatically greylist code in 3P packages" 2019-04-02 13:10:37 +00:00
Colin Cross
11581cf6b3 Merge changes Ie7f776a4,I3ca5dd1f,I2e911262
* changes:
  Add a whitelist for services.art changing between builds
  Add diff_target_files tool
  Import files from compare_target_files for use in diff_target_files
2019-04-02 00:03:05 +00:00
Colin Cross
80eb6907ac Merge "Touch output files in sbox" 2019-04-01 17:45:12 +00:00
Colin Cross
d1c1e6fd6c Touch output files in sbox
Some tools used by genrules set the timestamp of the generated file
to an old value.  For example, when using tar to extract files it
will set the timestamp of the extracted file to the value stored in
the tar file.  This can cause unnecessary rebuilds due to output files
that are older than their inputs.  Touch output files in sbox before
moving them into the output location.

Test: m checkbuild && m checkbuild
Change-Id: Idb0e71d2bf0ac3618338371132cc71be74bf9d9d
2019-04-01 10:43:20 -07:00
Patrice Arruda
3554a98e4f Soong: Add synopsis to cc_prebuilt_* modules.
Added synopsis to the following modules under cc package:
    * cc_prebuilt_binary
    * cc_prebuilt_library_shared
    * cc_prebuilt_library_static

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I2ec284eb600f28d5c7f00254f441a3cc5fb684cc
2019-04-01 17:25:41 +00:00
Colin Cross
d93112ae26 Add a whitelist for services.art changing between builds
Bug: 120039850
Test: manual
Change-Id: Ie7f776a4e2743883ea006c66148fc4f40f90ce07
2019-04-01 10:07:25 -07:00
Colin Cross
91ee4c793d Add diff_target_files tool
Add a tool that lists files that have changed between two builds by
comparing the target-files.zip artifacts.

Bug: 121158314
Test: unit tests
Change-Id: I3ca5dd1fdf652dffef923ad7307fd71e49e2e95a
2019-04-01 10:07:21 -07:00
Colin Cross
c45c3b5ec6 Import files from compare_target_files for use in diff_target_files
Copied from cl/240594925.

Bug: 121158314
Test: copied unit tests
Change-Id: I2e91126285dcd33171ff8b8dbfcfa5d48501f535
2019-04-01 10:02:40 -07:00
Jiyong Park
c320e8262a Key property is removed from prebuilt_apex
The property is not needed as key is embedded in the apex.

Bug: 128344735
Test: m
Change-Id: Iae671994fc271593dd9319f6262279736ea34ad1
2019-04-01 19:25:08 +09:00
Jiyong Park
42cca6c951 Always bundle the public key for APEX
The public key associated with an APEX is always included in the APEX.

Obviously, the public keys are no longer installed to
/system/etc/security/apex

Bug: 128344735
Test: m
Change-Id: I1e1aef1d32597a447b57d49ab80bbfb921fa8178
2019-04-01 19:24:31 +09:00
Treehugger Robot
51e265c5dd Merge "Restat clang linker outputs" 2019-03-31 18:40:40 +00:00
Patrice Arruda
0ba2733414 Merge "Soong: Add unbind option to setup_go_workspace_for_soong.sh script" 2019-03-30 23:51:53 +00:00
Jiyong Park
50ca4ef4d3 Merge "Arch-specific source for prebuilt_apex" 2019-03-30 23:50:32 +00:00
Jiyong Park
c95714ed0d Arch-specific source for prebuilt_apex
Arch-specific source can be specified for prebuilt_apex as follows.

arch: {
    arm64: {
        src: "myapex-arm64.apex",
    },
},

A note on the implementation. The Src property was not tagged as
`android:"arch_variant"` as usual. Instead, multiple Src properties are
explicitly declared like

struct Arch {
    struct Arm {
        struct Src *string
    }
    ...
}

Corresponding Src property is manually selected according to the
MultiTargets()[0].

This is because prebuilt_apex is mutated only for android_common, in
order to have the same arch variant with the apex module type.
Therefore, we can't rely on the arch_variant tag.

Bug: 127789981
Test: m (apex_test amended)

Change-Id: I77dbe626171d8975f549bdb4af3c487232cf05f7
2019-03-30 14:11:37 +09:00
Colin Cross
36ae135434 Restat clang linker outputs
clang -Wl,--out-implib doesn't update its output file if it hasn't
changed, always restat the outputs.

Fixes: 129553377
Test: m checkbuild && m checkbuild
Change-Id: I2cb19e1b8280fd69c8a9b2143f55760ec05630f8
2019-03-30 00:03:24 +00:00
Colin Cross
1d2cf0494a Add depfile support to RuleBuilder
Allow rules built with RuleBuilder to use depfiles.  Ninja only
supports a single depfile with single output.  If there are
multiple outputs in a rule, move all but the first to implicit
outputs.  If multiple depfiles are specified, use new support
in dep_fixer to combine additional depfiles into the first depfile.

Test: rule_builder_test.go
Change-Id: I7dd4ba7fdf9feaf89b3dd2b7abb0e79006e06018
2019-03-29 16:35:06 -07:00
Colin Cross
92b7d584c8 Add RuleBuilderCommand.Flags
Test: rule_builder_test.go
Change-Id: I7887a67aaef33bc591d83fade9175da3e401529f
2019-03-29 16:35:06 -07:00
Patrice Arruda
b4e93fbdc2 Soong: Add unbind option to setup_go_workspace_for_soong.sh script
The setup_go_workspace_for_soong now allows the reverse operation
of unbinding the directories of the previous operation. Also,
refactored the script to easily add more directories to bind/unbind
in the future, catch failures on running in subshell commands and
a cleaner way to find the repo top directory.

Bug: b/129407866
Test: Manually tested by running the script on binding and unbinding
the directories. Tested both darwin and linux OS.

Change-Id: I7c93230aeab819ab5747e990e95aa26077071d9e
2019-03-29 15:57:47 -07:00
Andrei Onea
896237b7b9 Automatically greylist code in 3P packages
Bug: 129387816
Test: m appcompat
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: Id55abed766a6de6a2c032ee12d5153ab73a8d65c
2019-03-29 16:51:43 +00:00
Pirama Arumuga Nainar
65c95ff1fb Include libprofile-extras to all coverage variants
Bug: http://b/128524141

Include libprofile-extras (defined in system/extras/toolchain-extras) to
all modules that need a coverage variant.  Also add
'-uinit_profile_extras' when linking with coverage.  This causes the
setup code in libprofile-extras to be linked into binaries/libraries
with coverage enabled.

We add the static library to the non-coverage variants as well but is a
no-op for them (since the '-u...' flag is not added for them).

Adding this dependency creates several circular dependencies since
coverage variants were being created for other module types that never
had any compilation or linking done during the build.  This change stops
creating coverage variants for toolchain_library, cc_prebuilt_library_*,
cc_library_headers module types (by adding a function to the linker
interface to specify whether native coverage is enabled).

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=*
Test: blueline_coverage target in internal branch (using forrest)
Change-Id: I5db876eb953639a55ba007248dd24e497f987730
2019-03-29 08:56:42 -07:00
Pirama Arumuga Nainar
ee30d5e132 Refactor coverage support
Bug: http://b/128524141

The goal is to add a static library (libprofile-extras) to modules that
require coverage.  Since the coverageMutator is a post-deps mutator, the
results of the coverageMutator are not available when the dependencies
get constructed in deps().  This change moves the detection from the
coverageMutator to begin().

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=*
Test: blueline_coverage target in internal branch (using forrest)

Change-Id: I4e7c8b31ed5060642c6218ea33c532a0f6619967
2019-03-29 08:56:42 -07:00
Patrice Arruda
bcf9408e44 Merge "Soong: Add synopsis to cc_library_* modules" 2019-03-29 15:21:21 +00:00
Treehugger Robot
083bd3e971 Merge "Add prebuilt_apex." 2019-03-29 07:36:53 +00:00
Jaewoong Jung
939ebd5f33 Add prebuilt_apex.
Bug: 127789981
Test: apex_test.go + com.android.tzdata.apex
Change-Id: I09bb0a4b2acf310c55c789569da3c9d755638232
2019-03-28 15:56:22 -07:00
Yi Kong
2e03bb7296 Merge "Move -Wno-inconsistent-missing-override to ClangExtraCflags" 2019-03-28 22:37:47 +00:00
Patrice Arruda
83c89e0f4e Soong: Add synopsis to cc_library_* modules
Added synopsis to the following modules under cc package:
   * cc_library_static
   * cc_library_shared
   * cc_library
   * cc_library_host_static
   * cc_library_host_shared
   * cc_library_headers

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I4d9bb622dc75aad9ea1b9f331c80ed56ddbc9a15
2019-03-28 10:36:26 -07:00
Treehugger Robot
9e50e6955f Merge "Remove libbase dependency of sysprop_library" 2019-03-28 03:01:27 +00:00
Yi Kong
4d048d5972 Move -Wno-inconsistent-missing-override to ClangExtraCflags
So that projects can override the flag through cflag (CPPFlags are
appended after CFlags).

Test: m checkbuild
Change-Id: Ib72f4ed4731f41982a0eb8a90c782c09810aa8c9
2019-03-27 18:26:22 -07:00
Treehugger Robot
044ead6b1a Merge "Fix an override_module bug." 2019-03-27 22:56:09 +00:00
Yi Kong
edd7fdd891 Merge "Turn on new pass manager for PGO projects" 2019-03-27 22:44:31 +00:00
Patrice Arruda
5c45f684dd Merge "Soong: Add synopsis to cc_object module." 2019-03-27 22:38:28 +00:00
Jaewoong Jung
a641ee9cc7 Fix an override_module bug.
proptools.PrependProperties doesn't replace a pointer when both the src
and the dst have one. This prevented override_module from overriding
simple value pointer properties when the base module has existing
values. It turns out this was why the name property needed to be
overwritten manually.

Bug: 122957760
Test: app_test.go
Change-Id: I3302287c31a560422548c22fade95261ddbe606a
2019-03-27 11:21:24 -07:00
Yi Kong
ac7f27eab0 Merge "Switch to clang-r353983b" 2019-03-27 15:52:05 +00:00
Colin Cross
eae12cf400 Merge "Always package JNI libs into android_test modules" 2019-03-27 15:39:17 +00:00
Patrice Arruda
39302bbcb9 Merge "Soong: Add synopsis to soong_namespace module." 2019-03-27 15:37:17 +00:00
Colin Cross
47fa9d3d83 Always package JNI libs into android_test modules
android_test modules should always have native libraries packaged
into the APK even when use_embedded_native_libs: false is set.

Fixes: 129298278
Test: TestJNIPackaging
Change-Id: Idfcc630f7c6579c1280a920b5d71808b0a502e06
2019-03-27 15:09:52 +00:00
Jaewoong Jung
c7dd408f89 Merge "Add package_name property to android_app." 2019-03-27 14:13:15 +00:00
Nikita Ioffe
ca57e57837 Merge "Add support for clang-tidy -warnings-as-errors in Android.bp files" 2019-03-27 10:18:15 +00:00
Inseob Kim
1f959769f3 Remove libbase dependency of sysprop_library
libbase dependency is not really needed, but it has been causing build
failure while linking with static variant of sysprop_library. This cuts
the dependency and only depend on libbase_headers and liblog.

Bug: 129301987
Test: 1) flash and boot walleye
Test: 2) try to build various properties with sysprop_library.
Test: 3) sysprop_test
Change-Id: I027e01c754b782818f52103184301267d4cdd576
2019-03-27 17:27:05 +09:00
Yi Kong
5d7aeeac24 Switch to clang-r353983b
Test: TreeHugger
Bug: 122993569
Bug: 128427449
Bug: 128937182
Bug: 128973188
Change-Id: I300efbbad47973d265f636645b83dad0c4d6630a
2019-03-27 02:09:40 +00:00
Jaewoong Jung
6f373f60c4 Add package_name property to android_app.
This enables users to override the package name of their apps either
directly in android_app or through override_android_app.

Bug: 122957760
Test: app_test.go
Change-Id: I98080a4076ce970fc85e58fc33495ba9b363eec9
2019-03-26 15:17:17 -07:00
Nikita Ioffe
32c4986268 Add support for clang-tidy -warnings-as-errors in Android.bp files
Test: manually change Android.bp and checked clang-tidy invocation cmd
Change-Id: I51a64b3f7da82428b896f46f739c93d76a050aaf
2019-03-26 20:47:08 +00:00
Patrice Arruda
baff0ce5e4 Soong: Add synopsis to cc_object module.
Added synopsis to the cc_object module.

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
properly added.

Change-Id: Icba4522a3aafa1b8b8a0b780d111f8b48cbdd270
2019-03-26 13:41:28 -07:00
Patrice Arruda
64765aaef9 Soong: Add synopsis to soong_namespace module.
Synopsis was missing to soong_namespace module. Also added documentation
to imports properties. This required the namespaceProperties struct to be
pulled out of the NamespaceModule struct in order for the documentation
tool to extract the property documentation.

Bug: b/128337482
Test: Ran the doc generation command and verified that the synopsis was
added to soong_namespace and imports properties is listed too.

Change-Id: I519b14629bdbc85f35fbc8fa03e78dc2ad3f655e
2019-03-26 09:09:41 -07:00
Paul Duffin
d637872f44 Merge "Add java_test_helper_library" 2019-03-26 14:01:02 +00:00
Treehugger Robot
0aad00631a Merge "Soong: Add synopsis to several modules under cc package." 2019-03-26 03:39:13 +00:00