Commit graph

7263 commits

Author SHA1 Message Date
Jiyong Park
e1174669ee Additional fixes for java_sdk_library am: 82484c0771
am: a736bd6d42

Change-Id: Ib86cce03a5c7703615d03e6655eb119bbddc316e
2018-04-23 19:42:12 -07:00
Jiyong Park
a736bd6d42 Additional fixes for java_sdk_library
am: 82484c0771

Change-Id: Ic327990f5955b8efaa2236931ecf1cc2a945b026
2018-04-23 19:38:36 -07:00
Jeff Gaston
66116f5889 [automerger skipped] pom2mk to include extra-deps as top-level deps too
am: 2cc7d9fc78  -s ours

Change-Id: I0d533f9d9c2ab3a5a47296a6693b70a1da16ad5c
2018-04-23 18:19:40 -07:00
Jiyong Park
82484c0771 Additional fixes for java_sdk_library
This change fixes several problems found while re-defining some libs
using java_sdk_library module type.

1) A phony module whose name is the same as the java_sdk_library name is
defined. It is used to support installing the runtime library via
PRODUCT_PACKAGES (even when there is no dependency from other modules).

2) A bug that package names whose depth is >= 2 is ignored in
droiddoc.srcs_lib_whitelist_pkgs is fixed. A package name foo.bar.baz is
now converted to a path foo/bar/baz following the Java convention.

3) A make variable JAVA_SDK_LIBRARIES that is the list of java_sdk_library
module names is exported to make. This can be used to distinguish SDK
libraries from ordinary libs.

4) When running doclava, some framework sources in the 'android' package
and the same packages as the SDK library are automatically added to the
sources list. This is required for the case when API class is extending
from the framework class. In that case, doclava needs to know whether
the base class is hidde nor not. Since that visibility info is encoded
as @hide string in the comment, we need source files for the classes,
not the compiled ones. Also there are rare cases where part of SDK
library is implemented in the framework (e.g. org.apache.http.legacy).
In that case, we need framework source to make API stubs, though the
sources are not required to build the runtime library.

5) The stubs libs are disabled for PDK builds as well.

Bug: 77575606
Test: m -j

Change-Id: I360cf15fe5339e46644fb16d0dabe2548aa315f9
2018-04-24 09:47:50 +09:00
Pirama Arumuga Nainar
29a41f9398 Merge "Revert "Support coverage instrumentation for Linux host"" am: 0d12ebce88
am: 7d42d70b0a

Change-Id: I819ebdc7e934015e07c18d4752e6e9abb43c2070
2018-04-23 17:26:45 -07:00
Pirama Arumuga Nainar
7d42d70b0a Merge "Revert "Support coverage instrumentation for Linux host""
am: 0d12ebce88

Change-Id: I3afffb868cf1601d5eab8f581b1b6fef9726581b
2018-04-23 17:22:08 -07:00
Treehugger Robot
0d12ebce88 Merge "Revert "Support coverage instrumentation for Linux host"" 2018-04-24 00:12:05 +00:00
Pirama Arumuga Nainar
0b882f0394 Revert "Support coverage instrumentation for Linux host"
This reverts commit 358056c058.

Reason for revert: Breaks build_test target in some branches.

Change-Id: I604561033038d4ff15b74caf7b81ff5c8dd9632f
2018-04-23 22:44:39 +00:00
Jeff Gaston
2cc7d9fc78 pom2mk to include extra-deps as top-level deps too
Specifically, the use case is android-support-car requires some stubs that don't have a Maven pom.
So those stubs can't easily be listed as a dependency in the pom.
However, we do want the dependency to exist when importing to Make and detected by extract_deps.py

Bug: 76692459
Test: m -j blueprint_tools \
      && update_prebuilts.py -s <build_id> \
      && git diff HEAD^ -- fix_dependencies.mk \
      && m -j checkbuild

Change-Id: If546ecf7416580a01bde7b906976ada4b1145253
Merged-In: If546ecf7416580a01bde7b906976ada4b1145253
(manually cherry-picked from commit 358f25e97d)
2018-04-23 18:41:59 -04:00
Jeff Gaston
5dbe9868be Merge "pom2mk to include extra-deps as top-level deps too" am: 346d43b62e
am: 0922ff6891

Change-Id: I1cf81a2b0f3b2cdfa3348f97ced29fcd56bff800
2018-04-23 15:20:34 -07:00
Jeff Gaston
0922ff6891 Merge "pom2mk to include extra-deps as top-level deps too"
am: 346d43b62e

Change-Id: I6dbcf7b98e25a96148ac2b6fa5a302b61ff5ad0c
2018-04-23 15:15:30 -07:00
Treehugger Robot
346d43b62e Merge "pom2mk to include extra-deps as top-level deps too" 2018-04-23 22:06:52 +00:00
Pirama Arumuga Nainar
d2e0e46fc1 Support coverage instrumentation for Linux host am: 358056c058
am: ba4d455e87

Change-Id: Iac4bf787b15a68c7071dc1917f06d7f462da17c9
2018-04-23 14:08:18 -07:00
Pirama Arumuga Nainar
ba4d455e87 Support coverage instrumentation for Linux host
am: 358056c058

Change-Id: Ie8a42f2e7cc8d80041ae5f6f0fc6c2ddb29b0c37
2018-04-23 14:04:42 -07:00
Jeff Gaston
358f25e97d pom2mk to include extra-deps as top-level deps too
Specifically, the use case is android-support-car requires some stubs that don't have a Maven pom.
So those stubs can't easily be listed as a dependency in the pom.
However, we do want the dependency to exist when importing to Make and detected by extract_deps.py

Bug: 76692459
Test: m -j blueprint_tools \
      && update_prebuilts.py -s <build_id> \
      && git diff HEAD^ -- fix_dependencies.mk \
      && m -j checkbuild

Change-Id: If546ecf7416580a01bde7b906976ada4b1145253
2018-04-23 15:59:05 -04:00
Jeff Gaston
47251f7903 [automerger skipped] Merge "Have pom2mk list all duplicates modules" into pi-dev
am: ce3a4bb268  -s ours

Change-Id: I4355c8be7900fe3dbe3ddca43e347e2c26be8289
2018-04-23 12:27:14 -07:00
Jeff Gaston
928b536107 [automerger skipped] Merge "Have pom2mk include runtime deps too" into pi-dev
am: c86f03385e  -s ours

Change-Id: I026048c38954f60cb350e1e7afc4c10d34e60c7b
2018-04-23 12:18:33 -07:00
TreeHugger Robot
ce3a4bb268 Merge "Have pom2mk list all duplicates modules" into pi-dev 2018-04-23 18:57:35 +00:00
TreeHugger Robot
c86f03385e Merge "Have pom2mk include runtime deps too" into pi-dev 2018-04-23 18:57:17 +00:00
Pirama Arumuga Nainar
358056c058 Support coverage instrumentation for Linux host
Bug: http://b/77792074

- Add the libclang_rt.profile runtime libraries directly to the compile
command (for both host and target) instead of relying on the Clang
driver.
- Move the coverage mutator to PreDepsMutators so the mutation has
already happened when runtime libraries are added during dependence
computation.
- Factor out cc/config/toolchain to identify libclang_rt.profile modules
for the x86 and x86_64 host.

Test: make NATIVE_COVERAGE=true produces coverage-enabled host binaries.
Change-Id: I1ebc8cffdf11622bfc18199a57674672888b3a5f
2018-04-23 10:34:37 -07:00
Jiyong Park
e8f0eab420 Merge "Add double_loadable property and checks for it" am: 4884a172de
am: 0cc2713142

Change-Id: I75eabc65ef04d33f30c4356c8d3d93ad395059fc
2018-04-20 21:00:57 -07:00
Jiyong Park
0cc2713142 Merge "Add double_loadable property and checks for it"
am: 4884a172de

Change-Id: I2fb6437afb1dcde8c1a013fd219f0437b5f1dc41
2018-04-20 19:24:02 -07:00
Treehugger Robot
4884a172de Merge "Add double_loadable property and checks for it" 2018-04-21 02:14:51 +00:00
Nelson Li
8b51984bb8 Merge "build/make: set LOCAL_NATIVE_BENCHMARK for Google Benchmark Test" am: 7e1130cded
am: aa88c2f7d0

Change-Id: Id55eb015b946246b9f9eff27d81068bab932adc1
2018-04-20 16:24:19 -07:00
Nelson Li
aa88c2f7d0 Merge "build/make: set LOCAL_NATIVE_BENCHMARK for Google Benchmark Test"
am: 7e1130cded

Change-Id: I305b900c662818027638b4452b19c33930d9f52a
2018-04-20 16:20:16 -07:00
Treehugger Robot
7e1130cded Merge "build/make: set LOCAL_NATIVE_BENCHMARK for Google Benchmark Test" 2018-04-20 23:08:36 +00:00
Pirama Arumuga Nainar
73e48810a6 Make 'use_clang_lld' property specifiable per architecture am: 2b8959ad5a
am: c2bfbcf3f1

Change-Id: If373b40e4274d9ebf51437a995901970ce2cdddc
2018-04-20 13:47:23 -07:00
Pirama Arumuga Nainar
c2bfbcf3f1 Make 'use_clang_lld' property specifiable per architecture
am: 2b8959ad5a

Change-Id: I81ac9027d980bfad2216018a91751f54e626823f
2018-04-20 13:44:21 -07:00
Pirama Arumuga Nainar
2b8959ad5a Make 'use_clang_lld' property specifiable per architecture
Bug: http://b/73768157

Test: Mark 'use_clang_lld: true' for one arch of a module and verify by
inspection that only that arch variant uses lld.

Change-Id: I4b0d7a2bc43ee0b8462ab09a5f5c50807129a7fb
2018-04-20 19:11:50 +00:00
Colin Cross
aca00676f1 Merge "Remove product-specific flags from android_library modules" am: 5fd7dfd124
am: ac3b81f4b8

Change-Id: I7ce01ae3f4f3673657d9a17eac1a9b00dfb73be9
2018-04-19 18:38:46 -07:00
Colin Cross
ac3b81f4b8 Merge "Remove product-specific flags from android_library modules"
am: 5fd7dfd124

Change-Id: I554aa46a03c2bdbd97a0e0538088a618e9a8be4f
2018-04-19 18:35:40 -07:00
Colin Cross
5fd7dfd124 Merge "Remove product-specific flags from android_library modules" 2018-04-20 01:22:05 +00:00
Colin Cross
e78dcd313c Remove product-specific flags from android_library modules
Static android libraries should not get the product-specific
flags.

Bug: 73724997
Test: m checkbuild
Change-Id: I89e8c0a3fb788b18ee6603e9d21c9b9a5275f42f
2018-04-19 15:28:21 -07:00
Jiyong Park
ec16fcbc89 Merge "Adding java_sdk_library" am: dcbc89a3ab
am: f4b9a287b1

Change-Id: I1a56aacfd2915b1d678416d21650178be716de08
2018-04-19 11:51:24 -07:00
Jiyong Park
f4b9a287b1 Merge "Adding java_sdk_library"
am: dcbc89a3ab

Change-Id: I0709b0b66e8f30482d5cf7ecb64bf2765f677e60
2018-04-19 11:47:49 -07:00
Treehugger Robot
dcbc89a3ab Merge "Adding java_sdk_library" 2018-04-19 18:33:31 +00:00
Chih-hung Hsieh
c02a47647b Merge "Define clang lld flags for hosts." am: 94853de469
am: 473af9f5c7

Change-Id: Ie8ee2a49eeb55b4a2997055fed7d2602854cf425
2018-04-19 10:15:45 -07:00
Chih-hung Hsieh
473af9f5c7 Merge "Define clang lld flags for hosts."
am: 94853de469

Change-Id: I033f9f2f4963c84cbc4076a04f5da2b212a1292a
2018-04-19 10:11:45 -07:00
Chih-hung Hsieh
94853de469 Merge "Define clang lld flags for hosts." 2018-04-19 17:03:02 +00:00
Jiyong Park
2cfe880b5b Merge "Friendlier message for ABI reference update" am: 21838336c4
am: 482e6f1b57

Change-Id: If5293c012e43c03c9910472eedae6f0db9300097
2018-04-18 20:30:37 -07:00
Jiyong Park
482e6f1b57 Merge "Friendlier message for ABI reference update"
am: 21838336c4

Change-Id: I513ba538cc1791ee9253e245c6dd0d7a87698966
2018-04-18 20:27:06 -07:00
Treehugger Robot
21838336c4 Merge "Friendlier message for ABI reference update" 2018-04-19 03:15:57 +00:00
Jiyong Park
a5f11e426c Friendlier message for ABI reference update
This change is to let people to just copy & paste the update command

Test: break the ABI of libbinder intentionally and make.
The message includes absolute path to the create_reference_dump.py tool.

Change-Id: If7703d64be1f51ea4b054aa1e815276e1d6dbc14
2018-04-19 10:42:40 +09:00
Colin Cross
48c1526fc8 [automerger skipped] Merge "Reverse RRO dir paths when passing to Make" into pi-dev
am: 74d547d13c  -s ours

Change-Id: I7ff2f31ae1bc9372e20a9a068ac74cc54242a000
2018-04-18 18:24:34 -07:00
TreeHugger Robot
74d547d13c Merge "Reverse RRO dir paths when passing to Make" into pi-dev 2018-04-19 01:12:40 +00:00
Jiyong Park
c678ad3f71 Adding java_sdk_library
java_sdk_library is to make a Java library that implements optional
SDK APIs to apps. It is actually a wrapper for several modules: 1) stubs
library that clients are linked against to, 2) droiddoc module that
internally generates API stubs source files, 3) the real runtime shared
library that implements the API, and 4) XML file for adding the runtime
lib to the classpath at runtime if requested via <uses-library>.

Note: this is only the initial CL for the feature. Followings are features
currently missing and under development.

1) check for API consistency
2) install stubs libs as the dist artifacts
3) ensuring that apps have appropriate <uses-library> tag
4) disallowing linking to the runtime shared lib
5) HTML generation

Bug: 77575606
Test: m -j

Change-Id: I4a4ccf6e730e041703c63bb275d8860d0de96887
2018-04-19 08:57:30 +09:00
Colin Cross
c16280cf87 [automerger skipped] Merge "Fix aapt2 --min-sdk-version after finalized SDK" into pi-dev
am: e13f0fec3c  -s ours

Change-Id: I43780e8bb8b666692615c35f0e7d7d7e5de2d318
2018-04-18 16:24:26 -07:00
Colin Cross
bf91189426 [automerger skipped] Fix aapt2 --min-sdk-version after finalized SDK
am: e20c1b1904  -s ours

Change-Id: If7eb89aeb856b7024e2c8e6f9befc4d6be9f7b7f
2018-04-18 16:23:54 -07:00
Colin Cross
e13f0fec3c Merge "Fix aapt2 --min-sdk-version after finalized SDK" into pi-dev 2018-04-18 23:13:54 +00:00
Colin Cross
3f49fcb62b Merge "Fix aapt2 --min-sdk-version after finalized SDK" am: 59bcf6e631
am: 9d0af2e737

Change-Id: I9d43e2d829aac6273be319968c9afb37b8331570
2018-04-18 15:35:23 -07:00