Commit graph

12013 commits

Author SHA1 Message Date
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
Treehugger Robot
c89fe6253f Merge "Revert "Revert "Split Java libraries per apex""" 2019-07-26 16:15:45 +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
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
Treehugger Robot
71568c7cef Merge "Disable linux_bionic fuzzers" 2019-07-25 23:05:20 +00:00
Treehugger Robot
e515886a8b Merge "Fixed minor typo" 2019-07-25 17:13:45 +00: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
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
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
Treehugger Robot
acd10c6543 Merge "Add dist_dir to goma trigger" 2019-07-24 20:18:32 +00:00
Przemyslaw Szczepaniak
1ab2b7b8c5 Merge "Do not install LLNDK libs moved APEX on /system" 2019-07-24 09:12:18 +00:00
Kousik Kumar
61afb56e84 Add dist_dir to goma trigger
This is done so that prototype tooling can write logs inside the DIST_DIR.

Test: I wrote out all the environment variables being passed to
goma_ctl.py and the output is https://paste.googleplex.com/6663469954760704. It contains both DIST_DIR and other variables.

Change-Id: Ia5c70e58aa1b87db9777c59cf3e5df1c9e20f08c
2019-07-23 16:16:15 -04:00
Treehugger Robot
5260acef69 Merge "Fix some typos in Soong." 2019-07-23 19:43:27 +00:00
Elliott Hughes
7ceddbae8e Merge "Switch to prebuilt bzip2." 2019-07-23 19:28:02 +00:00
Roland Levillain
dfe75b389c Fix some typos in Soong.
Test: m
Change-Id: I5b332ce12d70f13eca93b23060620c0ea4f46db7
2019-07-23 17:29:57 +01:00
Elliott Hughes
2ee8b33edc Switch to prebuilt bzip2.
Test: treehugger
Change-Id: I4953ff6f9ead5ad79519ac7fa71b557807f25851
2019-07-23 15:08:58 +00:00
Ramy Medhat
2b78fda705 Merge "Add USE_RBE support to soong." 2019-07-23 11:49:10 +00:00
Jiyong Park
aa53324ac8 Split Java libraries per apex
Just like native libs, a java library that is included in an APEX is
mutated for the APEX. This allows us to infer the context (e.g.
sdk_version, etc.) for building a java library in an APEX.

Bug: 138182343
Test: apex_test added
Change-Id: I9292ea097b98e74a8a794f164bd2bed3921d6337
2019-07-23 20:32:14 +09:00
Treehugger Robot
1ecfa940d1 Merge "Reland "Switch to toybox tar."" 2019-07-23 02:08:40 +00:00
Treehugger Robot
c793ebf1ae Merge "Fix: symlink bin/arm directory is not handled correctly" 2019-07-23 00:53:25 +00:00
Treehugger Robot
6edff69513 Merge "Allow other module types in androidx" 2019-07-22 21:16:48 +00:00
Treehugger Robot
ed9a92c311 Merge changes Ic2a585ea,I11ccabc4,Icc932c4a,I020556c7,I08713e91
* changes:
  Fix date on mac builds
  Convert javadoc modules to android.RuleBuilder
  Convert droiddoc modules to android.RuleBuilder
  Add a systemModules utility type
  Convert droidstubs to android.RuleBuilder
2019-07-22 20:29:59 +00:00
Tony Mak
817850063b Allow other module types in androidx
1. Update pom2bp to support "host_support" device module.
2. Allow other module type in support library

(The intention is to support the room annotation processor)

Test: m

Bug: 137918883

Change-Id: I9a8fbcff903cc395d5dc38430774202ce389d6bc
Merged-In: I9a8fbcff903cc395d5dc38430774202ce389d6bc
(cherry picked from commit bd7c2f9a1d)
2019-07-22 13:18:48 -07:00
Dan Albert
6303423549 Merge "Remove asanLibs." 2019-07-22 18:05:10 +00:00
Przemyslaw Szczepaniak
e6fc507234 Do not install LLNDK libs moved APEX on /system
Export LLNDK_MOVED_TO_APEX_LIBRARIES which is used by make
to filter out LLNDK libs that been migrated to an APEX.
It's used by the ld.config.txt generaton, and to filter out
the vndk_package dependencies.

Test: Build&flashed crosshatch image
Bug: 137320025
Change-Id: I1449dad79edf36a628fa1ac15c35f163dbd8ee2a
2019-07-22 13:29:20 +01:00
Roland Levillain
525d8dec66 Merge "Handle test_per_src test variations as dependencies of APEX modules." 2019-07-22 09:38:53 +00:00
Roland Levillain
0934737003 Merge "Create an extra variation in test_per_src mutator collecting all outputs." 2019-07-22 09:37:31 +00:00
Jooyung Han
a0171822be fix: prebuilt_etc_xml
Since aosp/872653 and aosp/904233 landed, prebuilt_etc_xml has been broken.
aosp/872653: Enable arch variant properties in prebuilt_etc.
aosp/904233: Add a prebuilt module type for usr/share.

This change fixes
1) pass baseDir "etc" to initialize PrebuiltEtc struct
2) change "multlib" argument to MultilibFirst to reflect aosp/872653

Bug: 138082739
Test: m com.google.vr.platform.xml && see if it is installed in /system/etc
Change-Id: I4802107fd8ccf28a1170d7d165700c92df32e341
2019-07-22 16:15:25 +09:00
Jiyong Park
c80b5fa0c6 Fix: symlink bin/arm directory is not handled correctly
This change fixes a bug that a symlink in the bin/* directory of an APEX
is not added to the fs_config file.

Bug: 137918291
Test: choosecombo aosp_x86_arm
TARGET_FLATTEN_APEX=false m com.android.runtime.debug is successful

Change-Id: Ib10b635f08e03b18e8ad5407d8de6bac2c85326d
2019-07-20 15:18:21 +09:00
Dan Albert
55a18ba71a Remove asanLibs.
We already link the shared prebuilt from the toolchain. This is
redundant and the wrong version.

Test: make checkbuild
Bug: http://b/74067984
Change-Id: I4b5d23514158eebfb4eea2aa6761e076131c3224
2019-07-19 12:53:27 -07:00
Paul Duffin
2ac2befc9a Prevent runtime module paths being used in include_dirs
Adds a new StartsWith(string) ValueMatcher along with
With[Out]Matcher(...) methods to support new restrictions that prevent
any paths into runtime module repositories from being added to the
include_dirs.

Test: m nothing
Bug: 35624006
Change-Id: Ib954998e5fc190d8a11a8c6ac5f810cad927aac3
2019-07-19 19:36:25 +01:00
Paul Duffin
73bf054a52 Abstract property value matching logic behind an interface
Make it easy to add additional ways of matching property values. Needed
to add support for a 'starts with' matcher that can be used to restrict
allowable values in include_dir.

Test: m nothing
Bug: 35624006
Change-Id: I82e7d95f08847bf294aac311968e1d9f3e4b385d
2019-07-19 19:34:36 +01:00
Paul Duffin
60c0cd9a5f Merge "Add header_libs to cc_object" 2019-07-19 18:13:44 +00:00
Yi Kong
e6d0f62ce0 Merge "Use double dashes before llvm-strip arguments" 2019-07-19 16:55:27 +00:00
Yi Kong
93e6783410 Use double dashes before llvm-strip arguments
Newer llvm-strip no longer accepts single dash for multi-character
arguments.

Test: TreeHugger
Bug: 131328001
Change-Id: I4ca862d480860c00e7f8f644f79e300cb523dad0
2019-07-19 16:41:51 +00:00
Roland Levillain
9b5fde9ca4 Handle test_per_src test variations as dependencies of APEX modules.
If a test module with a `test_per_src` property set to `true` is
included in an APEX module, add all the variants for mutator
`test_per_src` as dependencies of the APEX module (not just the
first one).

This is done by adding variation "" of mutator `test_per_src` when
adding a test dependency to an APEX module, which creates an indirect
dependency of the APEX module on all the `test_per_src` variants of
the test module. When generating outputs for the APEX bundle, fetch
and include the set of test outputs from the "" variant.

Test: m (`apex/apex_test.go` amended)
Bug: 129534335
Change-Id: I1c99855971a8a9b2fc5b964a420e882b6791d4e6
2019-07-19 14:15:06 +01:00
Roland Levillain
f2fad97158 Create an extra variation in test_per_src mutator collecting all outputs.
Have `cc.testPerSrcMutator` create an additional variation named "",
having no sources (and generating no output file), but depending on
all other `test_per_src` variations and collecting their output files
in a new field named `cc.Module.testPerSrcOutputFiles`. This is useful
in the case where a module depends on all the `test_per_src`
variations of a test module.

Test: m
Bug: 129534335
Change-Id: I905decc0b9417f47cee9113466677d3bb61ad7b6
2019-07-19 14:15:06 +01:00
Treehugger Robot
b1469d53e7 Merge changes from topic "docs_circular_dep"
* changes:
  aidl include paths are exported to droiddoc
  filegroup.path is used to specify the include path for aidl files
2019-07-19 11:28:16 +00:00
Jiyong Park
19a7f251d3 aidl include paths are exported to droiddoc
This change fixes a bug that aidl include paths are not exported when a
java lib is used by a droiddoc module.

Bug: 135922046
Test: N/A
Change-Id: I367695677f60bfb4f324b788c7d09cd926cb75bb
2019-07-19 11:31:31 +09:00