Commit Graph

7323 Commits

Author SHA1 Message Date
Anton Hansson
212f52008e Add some friendly error messages for java_sdk_library. am: 8959e149b7
am: fc3f21e609

Change-Id: I43e16f42be1e13eff69035cd3862dacce7f95b43
2018-05-01 00:04:23 -07:00
Anton Hansson
fc3f21e609 Add some friendly error messages for java_sdk_library.
am: 8959e149b7

Change-Id: Ic149e3ba2f6ef398de9b3adf40d85f88f4f260a7
2018-04-30 23:59:55 -07:00
Anton Hansson
8959e149b7 Add some friendly error messages for java_sdk_library.
The stubs will always fail to build without at least these
three arguments. Give a clear error message when this happens
instead of failing further into the build.

Bug: 77575606
Test: make <x>.stubs for sdk_library "x" without these args
Change-Id: If3142ecc73d6428f7e3120788f8de64d56a777ad
2018-05-01 07:49:03 +01:00
android-build-prod (mdb)
4ed0841ed1 Merge changes I9f68c887,Ic18f2dc5 am: b6ffb625eb
am: 07b758e2cf

Change-Id: I2cacae235b58dd0e9e1aaa65d0551517a90493f4
2018-04-30 19:09:34 -07:00
android-build-prod (mdb)
07b758e2cf Merge changes I9f68c887,Ic18f2dc5
am: b6ffb625eb

Change-Id: I1a325caecf48547b15ad754b5d90e0ca2c1775bb
2018-04-30 19:04:24 -07:00
android-build-prod (mdb)
b6ffb625eb Merge changes I9f68c887,Ic18f2dc5
* changes:
  Fix data race when ALLOW_MISSING_DEPENDENCIES=true
  Document glob patterns
2018-05-01 01:56:06 +00:00
android-build-prod (mdb)
e448ef1d12 Merge "Use and export proguard flags from static dependencies" am: 1873f39223
am: 0591553c02

Change-Id: Ic037e560ffe449037e10dc2d8d8abf257a694729
2018-04-30 18:22:55 -07:00
Jiyong Park
6467022e17 java_sdk_library supports test as another API scope am: df13054c2a
am: d5ed585832

Change-Id: I333d0c668674b157ccf2e10e82b0b1d4ce41cb4f
2018-04-30 18:21:43 -07:00
android-build-prod (mdb)
0591553c02 Merge "Use and export proguard flags from static dependencies"
am: 1873f39223

Change-Id: I7a6666fab1224658986e6282f93757f3f9b1dc5b
2018-04-30 18:19:05 -07:00
Jiyong Park
d5ed585832 java_sdk_library supports test as another API scope
am: df13054c2a

Change-Id: I95cff0b8c54db5eba1bf12674e8b4bdf0e685774
2018-04-30 18:17:33 -07:00
android-build-prod (mdb)
1873f39223 Merge "Use and export proguard flags from static dependencies" 2018-05-01 01:07:24 +00:00
Colin Cross
d2343a331e Fix data race when ALLOW_MISSING_DEPENDENCIES=true
Missing dependencies were modifying a slice owned by a dependency,
which could cause a data race.  Return a copy instead.

Test: build with race detector enabled
Bug: 70706626
Change-Id: I9f68c887bee94348f3e11284c0833d2e04d62599
2018-04-30 16:19:31 -07:00
Colin Cross
645332d501 Document glob patterns
Bug: 71906438
Test: none
Change-Id: Ic18f2dc5d91b30ff2b5beb8047d98591ba70ee00
2018-04-30 16:19:31 -07:00
Colin Cross
89c31581a5 Use and export proguard flags from static dependencies
Export proguard flags from Android library modules, and use them
from static dependencies in Android apps when running proguard.
Also export them to Make.

Unlike Make, which concatentates all the exported flags from
dependencies, Soong dedups exported flags files.

Bug: 73724997
Test: m checkbuild
Change-Id: I8f86fecb09cbc591832ce67e8ecef551a6600349
2018-04-30 16:03:43 -07:00
Jiyong Park
5edf8e8580 Add prebuilt_etc_xml am: 5a8d1bee89
am: 6455f181e9

Change-Id: I00e8d1adf36a2b0a0dbd2979ecf0d7f574ae66e0
2018-04-27 10:29:03 -07:00
Jiyong Park
6455f181e9 Add prebuilt_etc_xml
am: 5a8d1bee89

Change-Id: I8b54e220fc8c926ff809fae180249dbffd8969b5
2018-04-27 10:25:18 -07:00
Jiyong Park
df13054c2a java_sdk_library supports test as another API scope
For each java_sdk_library module, three (possibly different) stubs libs
are created.

*.stubs: public APIs only
*.system.stubs: public APIs + @SystemApi
*.test.stubs: public APIs + @TestApi

Depending on the sdk_version (or LOCAL_SDK_VERSION) of the calling
module, stubs lib of the corresponding api scope is linked.

Bug: 77575606
Test: m -j
Change-Id: I1437c64460914dbfc349dbc31d6f3ef090f541e3
2018-04-28 02:16:54 +09:00
Jiyong Park
5a8d1bee89 Add prebuilt_etc_xml
prebuilt_etc_xml installs an xml file to <partition>/etc[/<subdir>] and
validates the xml file against the given DTD file before installing it.

This change also includes some fixes for prebuilt_etc which is the super
module of prebuilt_etc_xml:

1) The module is changed to arch-specific module as the prebuilts are only
for devices (installed under the etc dir), but not for hosts.

2) Dependency to android.Prebuilt is removed because android.Prebuilt is
intended to be used for the case when a module can exist as prebuilts,
source or both. These prebuilt_etc_* modules are prebuilt only.

3) srcs property which accepts a list of source files is changed to src
that only accepts single source file, which makes more sense for
prebuilts.

Bug: 65686190
Test: m -j (xml_test.go)
Change-Id: I40484f3f6615b99f6b8d43176db0c40c5bfd838e
2018-04-28 00:13:00 +09:00
Colin Cross
6301a56646 [automerger skipped] Add pom2mk -exclude
am: 8a32a05989  -s ours

Change-Id: I0af9daebdb8e765bc8e9a75ca92d735f6f212b1d
2018-04-26 12:51:05 -07:00
Colin Cross
cce62c7e8b [automerger skipped] Add pom2mk -regen
am: f84c8636d3  -s ours

Change-Id: Ia627e9b5a1910b1c2a1a42dd6ac98ec57317d067
2018-04-26 12:50:59 -07:00
Colin Cross
8a32a05989 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
Merged-In: I083907ef364384aace524ced81820567f5075d76
(manually cherry-picked from c7453caf2c0a94192d0f722f26e9552da953ef8f)
2018-04-26 13:24:51 -04:00
Colin Cross
f84c8636d3 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
Merged-In: Ie8e0f97ae5b87c8078cf8e753489326d80da1896
(manually cherry-picked from 6b359adc1e2bf1726567000d97e412fea6e88b95)
2018-04-26 13:24:32 -04:00
David Brazdil
00d4c1a3c7 Merge "Add new Doclava flag support to soong" am: aac4b84ce5
am: 8aac41602f

Change-Id: I16e350e373480879757555f1e86d6186d4cc9702
2018-04-26 07:42:08 -07:00
David Brazdil
8aac41602f Merge "Add new Doclava flag support to soong"
am: aac4b84ce5

Change-Id: I574b146231c443bd74f5ca8b745da6f331aecb78
2018-04-26 06:37:49 -07:00
David Brazdil
aac4b84ce5 Merge "Add new Doclava flag support to soong" 2018-04-26 12:39:41 +00:00
Colin Cross
f7f076d33a [automerger skipped] Don't use AppsDefaultVersionName for framework-res.apk
am: e6c053388b  -s ours

Change-Id: I0bffbaf57673901b7720d0c4b603e80ed3318ce8
2018-04-25 19:43:06 -07:00
android-build-prod (mdb)
4f65d80312 Merge "Fix incomplete LTO bug workaround." am: 6bcee9abff
am: 990e3f3caf

Change-Id: I3de17998c8b11289d182ea0d58ec8807af66a486
2018-04-25 18:06:36 -07:00
android-build-prod (mdb)
990e3f3caf Merge "Fix incomplete LTO bug workaround."
am: 6bcee9abff

Change-Id: Ia059d3c4a69a720ee069d98ec1676c3cb07c882f
2018-04-25 18:01:33 -07:00
android-build-prod (mdb)
6bcee9abff Merge "Fix incomplete LTO bug workaround." 2018-04-26 00:51:07 +00:00
android-build-prod (mdb)
e8f20d5ae1 Merge "Don't use AppsDefaultVersionName for framework-res.apk" am: eedc9484ab
am: 4fe12e40c3

Change-Id: I112af41246f965b4d5306fdbeafaf524fc80565e
2018-04-25 17:20:43 -07:00
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
android-build-prod (mdb)
4fe12e40c3 Merge "Don't use AppsDefaultVersionName for framework-res.apk"
am: eedc9484ab

Change-Id: I27fa175b4e1f447d01c05ab1262193dbc0952deb
2018-04-25 16:58:36 -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
android-build-prod (mdb)
eedc9484ab Merge "Don't use AppsDefaultVersionName for framework-res.apk" 2018-04-25 23:51:49 +00:00
Dan Albert
ea4b7b9ced Fix incomplete LTO bug workaround.
https://android-review.googlesource.com/c/platform/build/soong/+/641827
forgot this use of ClangTriple(), so static libraries aren't being
installed to the correct place.

Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \
    build/soong/scripts/build-ndk-prebuilts.sh && \
    ls ndk-out/soong/ndk/sysroot/usr/lib
Bug: None

Change-Id: I750ab198deff92aac06935d38d529b53030f9636
2018-04-25 16:05:30 -07:00
Colin Cross
e6c053388b Don't use AppsDefaultVersionName for framework-res.apk
Some builds set AppsDefaultVersionName() to include the build
number ("P-123456").  aapt2 copies the version name of
framework-res into app manifests as compileSdkVersionCodename,
which confuses things if it contains the build number.  Use the
DefaultAppTargetSdk ("P") instead.

Bug: 78324052
Test: m TARGET_BUILD_WITH_APPS_VERSION_NAME=true Dialer
      aapt dump badging $OUT/system/priv-app/Dialer/Dialer.apk | grep compile
      shows compileSdkVersionCodename=P
Change-Id: If67f40aae1066d4ff3bf97da1b2de2e1e250ad9c
Merged-In: If67f40aae1066d4ff3bf97da1b2de2e1e250ad9c
(cherry-picked from commit 402d5e0919)
2018-04-25 15:23:57 -07:00
Colin Cross
402d5e0919 Don't use AppsDefaultVersionName for framework-res.apk
Some builds set AppsDefaultVersionName() to include the build
number ("P-123456").  aapt2 copies the version name of
framework-res into app manifests as compileSdkVersionCodename,
which confuses things if it contains the build number.  Use the
DefaultAppTargetSdk ("P") instead.

Bug: 78324052
Test: m TARGET_BUILD_WITH_APPS_VERSION_NAME=true Dialer
      aapt dump badging $OUT/system/priv-app/Dialer/Dialer.apk | grep compile
      shows compileSdkVersionCodename=P
Change-Id: If67f40aae1066d4ff3bf97da1b2de2e1e250ad9c
2018-04-25 15:09:20 -07:00
David Brazdil
aac0c3ca2e Add new Doclava flag support to soong
CL I8fe27e8c03334f9c90204db1e69447de65a06a38 adds new "-removedDexApi"
flag to Doclava. This patch adds support for that flag into Soong.
"droiddoc" targets can generate the new API file with property
"removed_dex_api_filename".

Bug: 78182899
Test: make
Change-Id: I04b8f615aa4655167b824d40c3fafa2648beec01
2018-04-25 10:12:40 +00: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