Commit graph

14532 commits

Author SHA1 Message Date
Peter Collingbourne
cb521cb1ca Merge "Specify the API level via the triple instead of __ANDROID_API__."
am: 5f66d76d69

Change-Id: Idea2c10a557ba59bfc303633cdb8fedb9c4fff9e
2019-07-29 18:39:29 -07:00
Peter Collingbourne
5f66d76d69 Merge "Specify the API level via the triple instead of __ANDROID_API__." 2019-07-30 01:23:04 +00:00
Sasha Smundak
61272795a7 Merge "Support source code cross-referencing for C++ and Java"
am: 247de68b89

Change-Id: I5284d9be9865e95671ce8ec1927f74059f7fdf44
2019-07-29 18:13:05 -07:00
Treehugger Robot
247de68b89 Merge "Support source code cross-referencing for C++ and Java" 2019-07-30 00:13:12 +00:00
Mathieu Chartier
9302d5c78a Merge "Specify boot image format to be lz4hc"
am: 460bf6ae95

Change-Id: Iac2a4275e0998b8ea430f24b8d784db80e0aa94e
2019-07-29 15:15:44 -07:00
Dan Willemsen
a2a8ecb330 Remove reference to PRODUCT-*
The code still needs to exist, but for buildspec.mk files, not the
PRODUCT-* arguments.

Test: none
Change-Id: I60c6044ab2d1627af7e6e2e8831b77d9db12aa55
2019-07-29 15:14:11 -07:00
Mathieu Chartier
460bf6ae95 Merge "Specify boot image format to be lz4hc" 2019-07-29 21:25:11 +00:00
Vic Yang
6cd1be8993 Add sort_bss_symbols_by_size property for shared libs
If sort_bss_symbols_by_size is true, a shared library is built twice.
The first build generates an unsorted output file, which is used to
generate the symbol ordering file.  The output of the second build is
a shared library with its bss symbols sorted by their size.

With this, the only user of symbol_ordering_file, libc, is migrated to
use the new property, so we remove symbol_ordering_file support as well.

Bug: 135754984
Test: Build and check the resulting libc.so has its bss symbols sorted.
Change-Id: I5c892b44d82eb99cbc070cfa2c680be3087f3364
2019-07-29 13:25:55 -07:00
Dan Willemsen
12efb0533e Merge "Deprecate ONE_SHOT_MAKEFILE"
am: 1d73e5e566

Change-Id: Ie7ec9690ada5333a04bae34b7be2b1921863e0fc
2019-07-29 13:19:26 -07:00
Roland Levillain
f89cd0949c Handle test_per_src modules as indirect dependencies in APEXes.
In `apex.apexBundle.GenerateAndroidBuildActions`, we used to pass the
"all tests" ("") module as `module` for all `apexFile` objects created
from a test module using `test_per_src: true`.  An immediate issue of
this situation was that the "" module is hidden from Make, which made
all the generated `apexFile` objects hidden from Make too. This would
break the construction of flattened APEXes, as they rely on Make logic
to install their files.

Instead of collecting `test_per_src` test variations' output files in
`cc.Module.GenerateAndroidBuildActions` and using them in
`apex.apexBundle.GenerateAndroidBuildActions` as part of handling the
"" variation as a direct dependency of an `apexBundle`, process them
as indirect dependencies (and do nothing for the "" variation direct
dependency).

Adjust the indirect dependency logic in
`apex.apexBundle.GenerateAndroidBuildActions` to allow not only
shared/runtime native libraries as indirect dependencies of an
`apexBundle`, but also `test_per_src` tests.

Test: m (`apex/apex_test.go` amended)
Bug: 129534335
Change-Id: I845e0f0dd3a98d61d0b7118c5eaf61f3e5335724
2019-07-29 19:21:27 +01:00
Treehugger Robot
1d73e5e566 Merge "Deprecate ONE_SHOT_MAKEFILE" 2019-07-29 16:26:17 +00:00
Jeongik Cha
538c0d0c29 Add a rule about platform_apis
As sdk_check.mk checks, soong starts to check every app.
If sdk_version is empty, platform_apis must be true.
If sdk_version is not empty, platform_apis must be false.

Test: soong test
Test: m
Bug: 132780927
Change-Id: I7ba702d616404d155f8ac40cd008828663ad1488
2019-07-29 20:48:30 +09:00
Mathieu Chartier
54fd807267 Specify boot image format to be lz4hc
Reduce boot image space taken from 28803072B -> 9572352B (-20MB).

No reason to have this be configurable yet.

Test: ls -l $OUT/system/framework/*/apex*.art | awk '{s += $5} END {print s}'
Bug: 77863440

Change-Id: I280b740dfbd001109ce1e288e395595f21567aa6
2019-07-26 13:51:43 -07:00
Jiyong Park
ccca43f986 Merge "Revert "Revert "Split Java libraries per apex"""
am: c89fe6253f

Change-Id: I490b09e3a7b2ef00aad4defaa8c6b100ef249453
2019-07-26 09:39:51 -07:00
Sasha Smundak
2a4549ec98 Support source code cross-referencing for C++ and Java
Use Kythe (https://kythe.io) to build cross reference for the Android
source code. ~generate the input for it during the build. This is done
on demand: if XREF_CORPUS environment variable is set, build emits a
Ninja rule to generate Kythe input for each compilation rule. It
also emits two consolidation rules (`xref_cxx` and `xref_java`),
that depend on all Kythe input generation rules for C++ and Java.

The value of the XREF_CORPUS environment variable is recorded in the
generated files and thus passed to Kythe. For the AOSP master branch it is
`android.googlesource.com/platform/superproject`, so the command to build
all input for Kythe on that branch is:
```
XREF_CORPUS=android.googlesource.com/platform/superproject m xref_cxx xref_java
```

Each Kythe input generation rule generates a single file with .kzip
extension. Individual .kzip files have a lot of common information, so
there will be a post-build consolidation step run to combine them.
The consolidated .kzip file is then passed to Kythe backend.

The tools to generate .kzip files are provided by Kythe (it calls them
'extractors'). We are going to build them in toolbuilding branches
(clang-tools and build-tools) and check them in as binaries into master
and other PDK branches:
For C++,  `prebuilts/clang-tools/linux-x86/bin/cxx_extractor`
for Java, `prebuilts/build-tools/common/framework/javac_extractor.jar`

Bug: 121267023
Test: 1) When XREF_CORPUS is set, build generates Ninja rules to create
.kzip files; 2) When XREF_CORPUS is set, building
`xref_cxx`/`xref_java` creates .kzip files; 3) Unless XREF_CORPUS is
set, build generates the same Ninja rules as before

Change-Id: If957b35d7abc82dbfbb3665980e7c34afe7c789e
2019-07-26 09:16:47 -07:00
Treehugger Robot
c89fe6253f Merge "Revert "Revert "Split Java libraries per apex""" 2019-07-26 16:15:45 +00:00
Paul Duffin
25edbe5de7 Merge "Correct tags on StaticSharedLibraryProperties.Cflags"
am: c6fa3eca11

Change-Id: I875b48b1ca3456b99285532343500ccf27e2e1f9
2019-07-26 02:00:46 -07:00
Paul Duffin
cdfa3fb705 Merge changes I7b9462d3,Icadd470a,I1d459da1,I01d8f518
am: 4b03cb46a5

Change-Id: I6a5fc7321e80333390189a1adb7a1ffb3553bd7c
2019-07-26 01:59:32 -07:00
Slava Shklyaev
aef0d6e7ff Add neuralnetworks to ndkPrebuiltSharedLibs
Bug: 138207382
Test: make
Change-Id: Id0b334011446546963a2f1258d8a3b6999e4f96f
2019-07-26 08:57:54 +00:00
Paul Duffin
c6fa3eca11 Merge "Correct tags on StaticSharedLibraryProperties.Cflags" 2019-07-26 08:46:13 +00:00
Paul Duffin
4b03cb46a5 Merge changes I7b9462d3,Icadd470a,I1d459da1,I01d8f518
* changes:
  Add defaults_visibility support
  Refactor visibility to support visibility on defaults modules
  Add DefaultsModule interface
  Improve documentation of defaults mechanism
2019-07-26 08:35:15 +00:00
Jooyung Han
4739405a0e Merge "fix: prebuilt_etc_xml"
am: 04b2a82b77

Change-Id: I581999dc553a745d49f05a0954d965ca0fa28213
2019-07-25 22:24:39 -07:00
Jiyong Park
7f7766d5ee Revert "Revert "Split Java libraries per apex""
This reverts commit f0f7ca8335.

Bug: 138182343
Test: apex_test added
Change-Id: I5c8a0935ac0f456137c8656815e220b0e7848a5d
2019-07-26 14:19:38 +09:00
Treehugger Robot
04b2a82b77 Merge "fix: prebuilt_etc_xml" 2019-07-26 04:57:29 +00:00
Peter Collingbourne
b0e6143b9b Specify the API level via the triple instead of __ANDROID_API__.
Clang derives the value of __ANDROID_API__ from the triple these days. In a
future version of clang I plan to start making the behaviour of the HWASAN pass
dependent on the API level in the triple, so it's going to need to be accurate.

Test: walleye-userdebug boots
Change-Id: Ie5e36b5c8f6dcda084cc12b1160abbdf94765174
2019-07-25 17:18:22 -07:00
Alex Light
dd76f920cf Merge "Disable linux_bionic fuzzers"
am: 71568c7cef

Change-Id: I426c9882a97cea7fc031e5dd9d0de92cbf3c7aa7
2019-07-25 16:34:26 -07:00
Treehugger Robot
71568c7cef Merge "Disable linux_bionic fuzzers" 2019-07-25 23:05:20 +00:00
Dan Willemsen
c6360837bb Deprecate ONE_SHOT_MAKEFILE
mm is now doing the same thing as mma. Now print a deprecation message
for other tools that may be setting ONE_SHOT_MAKEFILE directly (or users
that are still using a very old envsetup.sh).

Test: mm  # does not print
Test: ONE_SHOT_MAKEFILE=bionic m
Change-Id: I98221657024d824a61c0d721d5c7dd1a2ea2fb1e
2019-07-25 14:12:38 -07:00
Paul Duffin
f5df899687 Merge "Fixed minor typo"
am: e515886a8b

Change-Id: I5d99efb2e18c02eacb5946320fd7d3504e1e32b5
2019-07-25 10:51:11 -07:00
Treehugger Robot
e515886a8b Merge "Fixed minor typo" 2019-07-25 17:13:45 +00:00
Nicolas Geoffray
ff3eb22ef4 Merge "Add support for generating boot profiles."
am: 1f9f57cc8f

Change-Id: Ie452fd1c5abffb7258c26ee965dffe55900cb576
2019-07-25 07:08:22 -07:00
Nicolas Geoffray
1f9f57cc8f Merge "Add support for generating boot profiles." 2019-07-25 13:46:05 +00:00
Paul Duffin
036cacee51 Fixed minor typo
Bug: 138207002
Test: m nothing
Change-Id: Idc6bc6ae9d7e4052da0c0bde6247bff47eab60be
2019-07-25 14:44:56 +01:00
Jiyong Park
d4d6f38547 Merge "Revert "Split Java libraries per apex""
am: 38b9f76d63

Change-Id: Ifda11df70f28856003fcacd2bc93c92a05824606
2019-07-25 04:44:06 -07:00
Treehugger Robot
38b9f76d63 Merge "Revert "Split Java libraries per apex"" 2019-07-25 11:29:28 +00:00
Paul Duffin
5213e2b431 Correct tags on StaticSharedLibraryProperties.Cflags
Remove path as cflags are not paths.

Test: m nothing
Change-Id: Ia3f3064cb6642a67e8320ab3c472af2ad5863b52
2019-07-25 12:22:47 +01:00
Paul Duffin
95d53b584f Add defaults_visibility support
Bug: 130796911
Test: m nothing
Change-Id: I7b9462d3360be2bbeaf6ff38c5328f45ff5b5ebb
2019-07-25 11:48:21 +01:00
Paul Duffin
63c6e183d5 Refactor visibility to support visibility on defaults modules
Existing modules, either general one or package ones have a single
visibility property, called visibility in general, and
default_visibility on package, that controls access to that module, or
in the case of package sets the default visibility of all modules in
that package. The property is checked and gathered during the similarly
named phases of visibility processing.

The defaults module will be different as it will have two properties.
The first, visibility, will not affect the visibility of the module, it
only affects the visibility of modules that 'extend' the defaults. So,
it will need checking but not parsing. The second property,
defaults_visibility, will affect the visibility of the module and so
will need both checking and parsing.

The current implementation does not handle those cases because:
1) It does not differentiate between the property that affects the
   module and those that do not. It checks and gathers all of them with
   the last property gathered overriding the rules for the previous
   properties.

2) It relies on overriding methods in MethodBase in order to change the
   default behavior for the package module. That works because
   packageModule embeds ModuleBase but will not work for
   DefaultsModuleBase as it does not embed ModuleBase and instead is
   embedded alongside it so attempting to override a method in
   MethodBase leads to ambiguity.

This change addresses the issues as follows:
1) It adds a new visibility() []string method to get access to the
   primary visibility rules, i.e. the ones that affect the module.

2) It adds two fields, 'visibilityPropertyInfo []visibilityProperty'
   to provide information about all the properties that need checking,
   and 'primaryVisibilityProperty visibilityProperty' to specify the
   property that affects the module.

The PackageFactory() and InitAndroidModule(Module) functions are
modified to initialize the fields. The override of the
visibilityProperties() method for packageModule is removed and the
default implementations of visibilityProperties() and visibility()
on ModuleBase return information from the two new fields.

The InitDefaultsModule is updated to also initialize the two new
fields. It uses nil for primaryVisibilityProperty for now but that
will be changed to return defaults_visibility. It also uses the
commonProperties structure created for the defaults directly instead
of having to search for it through properties().

Changed the visibilityProperty to take a pointer to the property that
can be used to retrieve the value rather than a lambda function.

Bug: 130796911
Test: m nothing
Change-Id: Icadd470a5f692a48ec61de02bf3dfde3e2eea2ef
2019-07-25 11:31:42 +01:00
Paul Duffin
e62432feee Add DefaultsModule interface
Changes the InitDefaultsModule method from taking a DefaultableModule
to taking a DefaultsModule in preparation for adding visibility support
to defaults modules.

Bug: 130796911
Test: m nothing
Change-Id: I1d459da1017ae7f2654e7eb275cb424e52d85730
2019-07-25 10:51:27 +01:00
Paul Duffin
7df7fb0dff Improve documentation of defaults mechanism
Also, removes unnecessary cast from DefaultableModule to Defaultable.

Bug: 130796911
Test: m nothing
Change-Id: I01d8f5186927215a1aa6b7431558041f427d7381
2019-07-25 10:50:57 +01:00
Jiyong Park
f0f7ca8335 Revert "Split Java libraries per apex"
This reverts commit aa53324ac8.

Reason for revert: b/138337109 (broke ndk build)

Change-Id: I9497cb4337add3f8c491a684bcaadea3bdbfaa85
2019-07-25 04:38:02 +00:00
Jiyong Park
b7dbf4d109 Merge "Split Java libraries per apex"
am: 8f7a3fc633

Change-Id: Id478349248a92f2ea66f70519606b08bd685e368
2019-07-24 16:37:29 -07:00
Treehugger Robot
8f7a3fc633 Merge "Split Java libraries per apex" 2019-07-24 23:15:22 +00:00
Nicolas Geoffray
e710242b5c Add support for generating boot profiles.
Test: /system/etc/boot-image.bprof is generated
Test: /system/framework/services.bprof is generated
Bug: 119800099
Change-Id: I50f0b665ff104feca4a26dd229625f00013db251
2019-07-24 22:28:54 +01:00
Alex Light
71123ec1bc Disable linux_bionic fuzzers
fuzzers require linking to libclang_rt which does not support
linux_bionic. Therefore always disable this target.

Test: ./art/tools/build_linux_bionic_tests.sh
Bug: 138307504
Bug: 118058804
Change-Id: I12816f302d32d5ee846f90c62814744ae35c49bb
2019-07-24 21:13:05 +00:00
Kousik Kumar
bb9f3d4abf Merge "Add dist_dir to goma trigger"
am: acd10c6543

Change-Id: Ic297aad3cfec6e6ce8b2e871ffb21ae9e307e77c
2019-07-24 13:53:02 -07:00
Treehugger Robot
acd10c6543 Merge "Add dist_dir to goma trigger" 2019-07-24 20:18:32 +00:00
Dan Albert
2da19cbc20 Link libc++demangle with libc++ for the device.
libc++demangle provides __cxa_demangle, which used to be a part of
libc++.so but is being moved out to save on resources since very few
libraries need it.

Test: make checkbuild
Bug: http://b/138245375
Change-Id: Ie97225d496d7d40f8749522bf36702a2d9dcdfe7
2019-07-24 12:17:40 -07:00
Przemyslaw Szczepaniak
91655856da Merge "Do not install LLNDK libs moved APEX on /system"
am: 1ab2b7b8c5

Change-Id: Ic161398aadf2b2ac3c0f015803be70f7c7e0c75a
2019-07-24 02:25:46 -07:00
Przemyslaw Szczepaniak
1ab2b7b8c5 Merge "Do not install LLNDK libs moved APEX on /system" 2019-07-24 09:12:18 +00:00