Commit Graph

11583 Commits

Author SHA1 Message Date
Colin Cross
c8a3eb9110 Move proto compilation to RuleBuilder am: 19878da6a0
am: 61918685aa

Change-Id: I0cbb9ae4a408e8dd8316c41c7f2f3816da951364
2019-04-02 10:13:31 -07:00
Colin Cross
61918685aa Move proto compilation to RuleBuilder
am: 19878da6a0

Change-Id: I44eed0735702ea6fbef57753d8eec078ad3a131e
2019-04-02 09:54:59 -07:00
Colin Cross
19878da6a0 Move proto compilation to RuleBuilder
Using blueprint.Rule for protoc commands was causing code duplication
because there was no good way to run the same protoc for cc, java and
python but then run custom source packaging steps for java and python.
Move most of the code into a common function that returns a
RuleBuilder, and then let java and python add their own commands at
the end of the rule.

Bug: 70706119
Test: All Soong tests
Test: m checkbuild
Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
2019-04-02 16:38:47 +00:00
Patrice Arruda
5a4767e5d8 Merge "Soong: Add synopsis to cc_prebuilt_* modules." am: 6e1c3faed5
am: 57522e4123

Change-Id: I5f7a326b95b51419dc0c5e80e952ec758618e74d
2019-04-02 08:20:08 -07:00
Colin Cross
6c99a30bb7 Merge changes I7dd4ba7f,I7887a67a am: 92cc71606c
am: 900574f0cd

Change-Id: Id39b1ad15d3beb89ba2fedfb41172a97690cb1ff
2019-04-02 08:17:31 -07:00
Patrice Arruda
57522e4123 Merge "Soong: Add synopsis to cc_prebuilt_* modules."
am: 6e1c3faed5

Change-Id: I57ffbbe82c03113fffbc2fa766f8a4517d684cb7
2019-04-02 08:16:04 -07:00
Colin Cross
900574f0cd Merge changes I7dd4ba7f,I7887a67a
am: 92cc71606c

Change-Id: I40617cda703787aca7cc85e18beb173182b04532
2019-04-02 08:13:18 -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
5fc2f129fa Merge changes from topic "apex_bundle_pubkey" am: 7a313bc614
am: d2af9b6f42

Change-Id: I27f740a6acf3ccd3e2bc097ee6849aa5ae070250
2019-04-02 07:39:01 -07:00
Jiyong Park
d2af9b6f42 Merge changes from topic "apex_bundle_pubkey"
am: 7a313bc614

Change-Id: I17a71dab94a0ac8a1c5fe2795ddd082eb1b8a97b
2019-04-02 07:35:06 -07: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
364388b3a5 Merge "Automatically greylist code in 3P packages" am: dca6ac3e35
am: 595282ced1

Change-Id: I596b2a6f788c2a29495a0aa622cbf695f12ee211
2019-04-02 06:35:12 -07:00
Andrei-Valentin Onea
595282ced1 Merge "Automatically greylist code in 3P packages"
am: dca6ac3e35

Change-Id: Ic9d2843e446f0207ead6b83692c7fa50c34deb43
2019-04-02 06:25:27 -07:00
Andrei-Valentin Onea
dca6ac3e35 Merge "Automatically greylist code in 3P packages" 2019-04-02 13:10:37 +00:00
Colin Cross
92270109eb Merge changes Ie7f776a4,I3ca5dd1f,I2e911262 am: 11581cf6b3
am: 89d99337fb

Change-Id: I30312cbbacae65c29e75357e89cc554b5ee1a19d
2019-04-01 17:32:01 -07:00
Colin Cross
89d99337fb Merge changes Ie7f776a4,I3ca5dd1f,I2e911262
am: 11581cf6b3

Change-Id: Ie9d0457b802be9840d03bc2963776ae421e68b34
2019-04-01 17:24:08 -07: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
5cb90e6517 Merge "Touch output files in sbox" am: 80eb6907ac
am: 9457c97c40

Change-Id: I1ccf203667d12cebb306ada67a6771fe8696c010
2019-04-01 11:11:12 -07:00
Colin Cross
9457c97c40 Merge "Touch output files in sbox"
am: 80eb6907ac

Change-Id: I0ff287156926e0788e8af3af8efb36cf222e02c4
2019-04-01 11:06:07 -07: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
Colin Cross
50ec199881 Merge "Restat clang linker outputs" am: 51e265c5dd
am: 0a31c21da0

Change-Id: I1673d9eba4399e26235b92b53f240d91842b1ee4
2019-03-31 11:59:51 -07:00
Colin Cross
0a31c21da0 Merge "Restat clang linker outputs"
am: 51e265c5dd

Change-Id: I7f95695550cc51a5043cecab62f7907dffe1ef82
2019-03-31 11:55:47 -07:00
Treehugger Robot
51e265c5dd Merge "Restat clang linker outputs" 2019-03-31 18:40:40 +00:00
Patrice Arruda
61cd12b4be Merge "Soong: Add unbind option to setup_go_workspace_for_soong.sh script" am: 0ba2733414
am: 55e35c0d63

Change-Id: I5b6ca789735e327cabe2bef4c5f6e5583fa418d5
2019-03-30 17:15:06 -07:00
Jiyong Park
b7f7db364c Merge "Arch-specific source for prebuilt_apex" am: 50ca4ef4d3
am: 8f3fdc9135

Change-Id: Ia70f151b3003bbef83037179eded7a888bb487a3
2019-03-30 17:14:43 -07:00
Patrice Arruda
55e35c0d63 Merge "Soong: Add unbind option to setup_go_workspace_for_soong.sh script"
am: 0ba2733414

Change-Id: I29d01517b4886b8e0f17fc3a247ce6e8b6689ec9
2019-03-30 17:10:04 -07:00
Jiyong Park
8f3fdc9135 Merge "Arch-specific source for prebuilt_apex"
am: 50ca4ef4d3

Change-Id: I14895ea1d0ca47e1b7a82a741800cec7400d319e
2019-03-30 17:09:42 -07: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
ef7a035152 Include libprofile-extras to all coverage variants am: 65c95ff1fb
am: 865ad54f90

Change-Id: I4afb3bf93ebda7d25957b988bf627481ad7889ca
2019-03-29 09:22:33 -07:00
Pirama Arumuga Nainar
2bccc05cbf Refactor coverage support am: ee30d5e132
am: 312b5f4407

Change-Id: I0aaf75cf2d0701a8f490a2b2bd2bdb388add63c3
2019-03-29 09:22:21 -07:00
Pirama Arumuga Nainar
865ad54f90 Include libprofile-extras to all coverage variants
am: 65c95ff1fb

Change-Id: I74057c0921eaa76c8016d0bb8f81abaf0eb50ed8
2019-03-29 09:17:15 -07:00
Pirama Arumuga Nainar
312b5f4407 Refactor coverage support
am: ee30d5e132

Change-Id: I859c7e6c535f1d99d26fa8148bc24a930933cd39
2019-03-29 09:17:04 -07: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
64c7368b39 Merge "Soong: Add synopsis to cc_library_* modules" am: bcf9408e44
am: 3a537940a7

Change-Id: I4827491b28f6501a1c72eb578f4b15a29761dee0
2019-03-29 08:36:02 -07:00