Commit graph

7287 commits

Author SHA1 Message Date
Logan Chien
5f4da1cd13 Introduce runtime_libs to cc_binary and cc_library am: 43d34c38d8
am: 2a2833185a

Change-Id: Ib2f0dfeb1b496b60942bbd0283299063b88fb924
2018-04-25 17:01:47 -07:00
Logan Chien
2a2833185a Introduce runtime_libs to cc_binary and cc_library
am: 43d34c38d8

Change-Id: I131e6de0aa5a91914413fec88f9a038da9311f4a
2018-04-25 16:56:58 -07:00
Logan Chien
43d34c38d8 Introduce runtime_libs to cc_binary and cc_library
This commit adds `runtime_libs` to cc_binary and cc_library.

Similar to the `required` property, if a module specifies the
`runtime_libs` properties and it is installed, then the modules
specified in `runtime_libs` will be installed as well.

Differnt from the `required` property, if a module is using VNDK and the
module names specified in `runtime_libs` are resolved to the modules
with both core and vendor variants, then '.vendor' will be appended to
those module names.

For example, if `libb` is vendor_available and `libd` is a vendor lib,
then LOCAL_REQUIRED_MODULES will contain `libb.vendor` (instead of
`libb`).

Bug: 72343507
Test: lunch aosp_arm64_ab-userdebug && make  # this runs the unit tests
Test: Create a vendor module with runtime_libs property to a
vendor_available shared library and check the generated Android.mk.

Change-Id: I9e245d80004dab597a5d3db5acd8a09117118db7
2018-04-25 14:47:50 +08:00
Chih-hung Hsieh
3e77d5128b Merge "Disable LLD for Darwin host executables." am: 95ba30aa56
am: 74db54674a

Change-Id: I3a6bdf16ff65133d49736a3cd218a0231974f9c2
2018-04-24 23:41:24 -07:00
Chih-hung Hsieh
74db54674a Merge "Disable LLD for Darwin host executables."
am: 95ba30aa56

Change-Id: I1082ff2ef6e7db2a1292c55d8bdbea0fc651430f
2018-04-24 23:38:21 -07:00
Chih-hung Hsieh
95ba30aa56 Merge "Disable LLD for Darwin host executables." 2018-04-25 06:30:54 +00:00
Chih-Hung Hsieh
e5ac609355 Disable LLD for Darwin host executables.
* See upstream status of lld for Mach-O at https://lld.llvm.org/AtomLLD.html

Bug: 73768157
Test: make checkbuild
Change-Id: I2e892193b6d75afd4358df8b2f674aa94888fb32
2018-04-24 18:07:16 -07:00
Nan Zhang
8d5c7ddbff Merge "Fix the undefined CommandDeps for standard Javadoc" am: f9a34b667f
am: c3057b9828

Change-Id: I949fb5a65b25ded297943cffa0c0543346ffa998
2018-04-24 16:20:35 -07:00
Nan Zhang
c3057b9828 Merge "Fix the undefined CommandDeps for standard Javadoc"
am: f9a34b667f

Change-Id: I2ea1f758ccec5e98510decdb97bb08b0f072139f
2018-04-24 16:12:33 -07:00
Nan Zhang
f9a34b667f Merge "Fix the undefined CommandDeps for standard Javadoc" 2018-04-24 23:00:37 +00:00
Colin Cross
a2373da5b2 Merge "Add pom2bp" am: 9850f48dda
am: 293f4f2a2c

Change-Id: I83acddca6a7d30b68f3f67ef1548b7ad8dd5273f
2018-04-24 15:39:22 -07:00
Colin Cross
293f4f2a2c Merge "Add pom2bp"
am: 9850f48dda

Change-Id: I7ab11ffb18ba748155484ab9d9c8ca806df5e017
2018-04-24 15:35:50 -07:00
Colin Cross
9850f48dda Merge "Add pom2bp" 2018-04-24 22:28:28 +00:00
Colin Cross
16e2c2bff5 Merge changes I083907ef,Ie8e0f97a am: c52e90eda3
am: e45e50f27f

Change-Id: Ib1d6cab99b1c9457e58c40ff58d2734b2d91bab8
2018-04-24 14:53:06 -07:00
Colin Cross
e45e50f27f Merge changes I083907ef,Ie8e0f97a
am: c52e90eda3

Change-Id: I43392da235868b73d8a0826c8708cfd325d0b540
2018-04-24 14:50:08 -07:00
Treehugger Robot
c52e90eda3 Merge changes I083907ef,Ie8e0f97a
* changes:
  Add pom2mk -exclude
  Add pom2mk -regen
2018-04-24 21:44:13 +00:00
Colin Cross
70dd38f09e Add pom2bp
Convert pom2mk to pom2bp that writes out Android.bp files instead
of Android.mk files.  pom2mk stays for now until the last users
of it are cleaned up.

Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2bp -regen Android.mk
Change-Id: I584d63c4228bad32f9e1914b06bde807078d6a55
2018-04-24 13:37:38 -07:00
Nan Zhang
30963749fd Fix the undefined CommandDeps for standard Javadoc
When compiling against without customized doclet, Javadoc doesn't need
to depend on Doclava and Jsilver jars. Originally, we leave these two
jars empty in Args so that CommandDeps won't have these two
dependencies. But Ninja doesn't like that with errors:

ninja: error: build.ninja: empty path
because $Jsilver and $Doclava is undefined when compiling Javadoc.

Test: m -j platform_library-docs
Bug: b/70351683
Change-Id: I02fee181490f91e87a1feac74f3a69b5b4acb528
2018-04-24 13:23:04 -07:00
Alex Light
b497452fd7 Merge "Add support for generating Compdb file" am: 2782ca4102
am: 46a9de3860

Change-Id: Ia807be7de7bf6136618a04eab8df55d9b4500307
2018-04-24 10:19:28 -07:00
Alex Light
46a9de3860 Merge "Add support for generating Compdb file"
am: 2782ca4102

Change-Id: Ie66850774ddc351aab5faad58924be0cbf94ab62
2018-04-24 10:14:15 -07:00
Treehugger Robot
2782ca4102 Merge "Add support for generating Compdb file" 2018-04-24 17:07:42 +00:00
Alex Light
ec868fc42a Add support for generating Compdb file
Some tools (i.e. you-complete-me) make use of a 'compdb' file
(compile_commands.json) that records (among other things) the
arguments needed to compile a file. These tools can use this with
libclang to provide semantic completions and perform other IDE
actions. This CL adds support for soong to generate a (simple)
compile_commands.json file.

Test: make SOONG_GEN_COMPDB=1 SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing
      examine $ANDROID_BUILD_TOP/compile_commands.json

Change-Id: I751bb344b90dfcdad1dfd71c2a85bacd345f0464
2018-04-24 08:15:02 -07:00
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
Colin Cross
6b382bcd04 Add pom2mk -exclude
Add an option to pom2mk to exclude modules by name.

Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk -exclude androidx.car_car
Change-Id: I083907ef364384aace524ced81820567f5075d76
2018-04-23 16:16:52 -07:00
Colin Cross
9f5633d60c Add pom2mk -regen
pom2mk -regen Android.mk will read the previous arguments out of
Android.mk, rerun pom2mk with those arguments, and write the result
to Android.mk.

Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk
Change-Id: Ie8e0f97ae5b87c8078cf8e753489326d80da1896
2018-04-23 16:16:41 -07: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