Commit graph

530 commits

Author SHA1 Message Date
Colin Cross
37210994ff Support LOCAL_JACK_ENABLED := javac_frontend
Allow working around Jack bugs by using javac to compile *.java
to class files, and then pass through Jack for desugaring,
proguarding, and dexing.

Also make ANDROID_COMPILE_WITH_JACK=false override LOCAL_JACK_ENABLED.

Bug: 37483961
Test: m -j checkbuild
Test: Add LOCAL_JACK_ENABLED := javac_frontend to a target
Change-Id: I2189055aac9deccc36b8eab8e949796dddadf7a1
Merged-In: I2189055aac9deccc36b8eab8e949796dddadf7a1
(cherry picked from commit b17f285169)
2017-05-02 13:11:35 -07:00
TreeHugger Robot
87bbe36728 Merge "Exclude ndk stubs from notice file list" into oc-dev 2017-04-05 22:42:18 +00:00
Dan Willemsen
593026b28b Add LOCAL_EXPORT_CFLAGS for Soong
This lets Soong pass -isystem or -I as necessary (or potentially, even
other cflags in the future).

This is not available for Android.mk use, nor exposed directly to
Android.bp users.

Test: m -j
Change-Id: Id37d4692d5fbddce467bd777903b20169f44dd6e
2017-04-05 09:49:48 -07:00
Dan Willemsen
58386bab15 Exclude ndk stubs from notice file list
There are many references to ndk stub libraries in the third party
notices:

out/soong/ndk/platforms/android-10/arch-arm/usr/lib/libc.so
out/soong/ndk/platforms/android-10/arch-arm/usr/lib/liblog.so
...

These are just stub libraries, and aren't distributed on the device. The
real versions of these libraries will be distributed on the device, and
already have the license information.

So let Soong set LOCAL_NO_NOTICE_FILE to prevent these from appearing.

Bug: 36867708
Test: Diff aosp_arm's system/etc/NOTICE.html.gz file before/after
Change-Id: Ifa3693bde7d3b6b9dc7a83122f9cfa24997fac50
(cherry picked from commit 2be559488d)
2017-04-05 09:47:37 -07:00
Colin Cross
8204eb1a87 Move comments to the previous line
End-of-line comments cause the variable to be set to a space, which
confuses using ifdef on it.

Test: builds
Change-Id: I7b1eb3b9febff1a5a5fca1e6623b2b36d538dacc
2017-03-28 17:05:18 +00:00
Dan Willemsen
a471822a57 Merge "Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE" am: d69837deea am: 6acc699303
am: ac6291f639

Change-Id: I3687f90010d283326d1d3c2ac545fb39b5996a21
2017-03-21 06:16:51 +00:00
Dan Willemsen
6acc699303 Merge "Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE"
am: d69837deea

Change-Id: I4402a902cf1f490445a952904668693b8bc2b7fa
2017-03-21 06:08:20 +00:00
Dan Willemsen
05a2b931e9 Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE
The vendor image will have more than just proprietary modules in it
under Treble, so let's stop marking open source code as proprietary just
to move it to vendor.

Bug: 36452052
Test: compare build-aosp_arm.ninja before/after, no changes.
Test: Try defining LOCAL_VENDOR_MODULE / LOCAL_PROPRIETARY_MODULE in the
same and different ways, ensure it works.
Change-Id: I0ab046bcb7563a20d44ed00667e18497ef0873a8
2017-03-20 20:57:04 -07:00
Sen Jiang
67b7aaab7d Merge "Remove DBus support." am: cf858d873b am: efcda5173d
am: 3d6b408aea

Change-Id: I183f58049ef63ce8f6bfbd67554199878b7a69cb
2017-03-03 21:02:37 +00:00
Sen Jiang
efcda5173d Merge "Remove DBus support."
am: cf858d873b

Change-Id: I09cbc25da9f801128b21bbda691f18f465fb2c9c
2017-03-03 20:57:36 +00:00
Sen Jiang
d1f397e8b4 Remove DBus support.
external/dbus and external/dbus-binding-generator was removed from
the manifest.

Bug: 31602715
Test: make checkbuild
Change-Id: Iea0277720acad8ac0fa630b8745f90fb3c3b5f00
2017-03-02 18:00:21 -08:00
Mathieu Chartier
c185f742e1 Merge "Add local preopt options for generating app image and profile"
am: fea31c0b9e

Change-Id: I58a6232ff9b001669b6b0f2c88e42b282e2e0ddc
2017-03-03 01:18:16 +00:00
Mathieu Chartier
a4b993b5b9 Add local preopt options for generating app image and profile
If true, LOCAL_DEX_PREOPT_APP_IMAGE cause dex2oat to generate an app
image.

If true, LOCAL_DEX_PREOPT_GENERATE_PROFILE generates a profile based
on a class listing. LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING must be
defined in this case.

Bug: 34929159

Test: device booting, image loaded

(cherry picked from commit 9968fdcd85)

Change-Id: Ib79ada86a4ac617491723f80d99a3add3d52a7f4
2017-03-02 15:17:04 -08:00
Mathieu Chartier
9968fdcd85 Add local preopt options for generating app image and profile
If true, LOCAL_DEX_PREOPT_APP_IMAGE cause dex2oat to generate an app
image.

If true, LOCAL_DEX_PREOPT_GENERATE_PROFILE generates a profile based
on a class listing. LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING must be
defined in this case.

Bug: 34929159

Test: device booting, image loaded

Change-Id: Ib79ada86a4ac617491723f80d99a3add3d52a7f4
2017-02-28 16:06:40 -08:00
Dan Willemsen
dc750c31ca Merge "Add Header Library support to Make" am: 4f794fdd50 am: ea2687fab6
am: 4a78c9e50f

Change-Id: I711c810cef8487c2d8e7b53deb9ccaad89592b1d
2017-02-18 06:22:20 +00:00
Dan Willemsen
ea2687fab6 Merge "Add Header Library support to Make"
am: 4f794fdd50

Change-Id: I44b0f0fe5c0f4d65bf205165e4ec05403f738066
2017-02-17 23:55:16 +00:00
Dan Willemsen
4f794fdd50 Merge "Add Header Library support to Make" 2017-02-17 23:50:41 +00:00
Colin Cross
9256be1822 Merge changes I7e8fcd2e,Ie12d743c am: 547f7393d7 am: 8283b186be
am: 7d8a028cd3

Change-Id: Ife691c9e00e766293e3648348e3c86b92f96fd56
2017-02-17 22:45:38 +00:00
Colin Cross
8283b186be Merge changes I7e8fcd2e,Ie12d743c
am: 547f7393d7

Change-Id: Id9cd5b894a599ca660363234863fdfc6602575d2
2017-02-17 22:34:39 +00:00
Colin Cross
79e2f73b6c Re-enable dx support
This is a partial revert of commits:
858657366f Remove support of disabling Jack.
3ae7861252 Remove javac support in host dex rules.
22313f2b2a Remove rules for building dex with dx

Test: builds
Change-Id: Ie12d743cbe978bdeb030910848b67f5945a4fec8
2017-02-16 14:08:45 -08:00
Dan Willemsen
8dae49c5e1 Add Header Library support to Make
We currently use static libraries without any source files to represent
header libraries, but Soong actually has cc_library_headers. So to
export those in a separate namespace from static libraries, implement
them in Make as well.

This also adds a nice pretty-warning / pretty-error macro that can be
used to print out standard warning messages pointing to the real source
file having the problem.

Test: Use a header library exported by Soong in a Make module
Change-Id: I3486539e247524cb82a20620745fc7be03014e14
2017-02-15 16:04:49 -08:00
Dan Willemsen
d282426b07 Merge "Support Soong native coverage" am: c9fa07c958 am: 0c2bd30961 am: c9f5ca3969
am: ce18a0d8f4

Change-Id: I86d2e1e13367bbb728b5488742383149ad7bdd9b
2017-02-15 00:44:15 +00:00
Dan Willemsen
c9f5ca3969 Merge "Support Soong native coverage" am: c9fa07c958
am: 0c2bd30961

Change-Id: I68a695f1524331d6516ce16cad8ade3162072336
2017-02-15 00:39:13 +00:00
Dan Willemsen
0f90908026 Support Soong native coverage
Soong (or any other prebuilt) can provide a .gcnodir file using
LOCAL_PREBUILT_COVERAGE_ARCHIVE. Just like today, if one isn't provided
for static libraries, an empty one will be created for Make modules to
use.

Also fixes a problem I noticed including whole static libs having
coverage into static libs. It was trying to write to /WHOLE since
PRIVATE_INTERMEDIATES_DIR was not set.

Bug: 32749731
Test: See build/soong change for soong-side tests
Test: Enabled coverage of a soong static lib, then include it in a make
static lib with LOCAL_WHOLE_STATIC_LIBRARIES and ensure that the any
shared libraries using the make static lib get the embedded coverage
information.
Change-Id: I32762f099c9757074fec922ee4822f819c9ceaf5
2017-02-10 09:27:35 -08:00
Dan Willemsen
3208098830 Merge "Sort clear_vars.mk again" am: 05106468f8 am: 03b7efd871 am: dc59849984
am: b6deae08fe

Change-Id: I1a187a12738b13d5a86f7b171bb0f57b1909c7ff
2017-02-10 00:31:45 +00:00
Dan Willemsen
dc59849984 Merge "Sort clear_vars.mk again" am: 05106468f8
am: 03b7efd871

Change-Id: I211ea6e5e596f752a62fbf47994fbcaaca01cd4d
2017-02-10 00:21:21 +00:00
Dan Willemsen
88ac806adf Sort clear_vars.mk again
Test: none
Change-Id: Id776e81977695c4b488f44b155f2c098d5f8b61a
2017-02-09 14:28:22 -08:00
Dan Albert
8791fe60d0 Merge "Add c_std and cpp_std properties." am: 220ca4d04b am: 66496c4b96 am: 492a5ff3eb
am: 3bb28719cf

Change-Id: Ifbe68f1cca96b8205f52ac30277a0a454f9c8b8b
2017-02-06 19:29:16 +00:00
Dan Albert
492a5ff3eb Merge "Add c_std and cpp_std properties." am: 220ca4d04b
am: 66496c4b96

Change-Id: I88fe9bebf9f389717135a9137762dd932ab7a139
2017-02-06 19:25:38 +00:00
Dan Albert
76bfcd4ab2 Add c_std and cpp_std properties.
Test: Checked showcommands ouput for each setting.
Bug: None
Change-Id: Ibc25f3977eaaecfd1fb99a27c9e15acae0ec4106
2017-02-03 16:43:06 -08:00
Dan Willemsen
1d324167f1 Merge "Support non-gtest NATIVE_TESTS" am: 561b0a3753 am: 1ef5112475 am: 4ad881c067
am: 27f489cd00

Change-Id: I85c5afe2a217c8335320885b00fc61ffbf159ba7
2016-12-22 20:53:08 +00:00
Dan Willemsen
4ad881c067 Merge "Support non-gtest NATIVE_TESTS" am: 561b0a3753
am: 1ef5112475

Change-Id: I7c16881f0efb637bf13a0af1e4c89640d7e218e6
2016-12-22 20:42:06 +00:00
Dan Willemsen
9416c20b79 Support non-gtest NATIVE_TESTS
We've had this in Soong for a while, but never supported it in Make.

Bug: 33819328
Test: Change LOCAL_GTEST on a module, check m -j ... showcommands
Change-Id: Id8f4b9908c82c05d9a986a38945b33bac578e991
2016-12-21 20:27:06 -08:00
Dan Willemsen
17f8795332 Merge "Implement LOCAL_TEST_DATA to ship data with tests" am: dd0e69d47f am: 04cf52edab am: 1f7aae0ac2
am: e31b1a81c9

Change-Id: I0f8912411e3bc2d1b501c4f39003bdf4ec004db6
2016-12-14 04:23:27 +00:00
Dan Willemsen
1f7aae0ac2 Merge "Implement LOCAL_TEST_DATA to ship data with tests" am: dd0e69d47f
am: 04cf52edab

Change-Id: I49c20d55c5fd7af70b536b530d3a747e788e3931
2016-12-14 04:08:57 +00:00
Dan Willemsen
d07ba4e2a6 Implement LOCAL_TEST_DATA to ship data with tests
This can be used to ship source data as test artifacts next to native
tests. It works for both local builds and the test bundles using
package_modules.mk.

You just specify a file list relative to the local directory, and those
files will be copied next to the executable under
/data/nativetest*/<module>/...:

  LOCAL_MODULE := mytest
  LOCAL_TEST_DATA := data/file1 file2

  /data/nativetest/mytest/mytest
  /data/nativetest/mytest/data/file1
  /data/nativetest/mytest/file2

If the data is in another directory, you may also specify a different
prefix for the source files:

  LOCAL_TEST_DATA := external/skia:resources/f.xml

  /data/nativetest/skia_test/resources/f.xml

And there's a new convenience macro to find a list of files in this
format:

  LOCAL_TEST_DATA := $(call find-test-data-in-subdirs,external/skia,"*.xml",resources)

I'll expand this to native benchmarks and fuzz tests in a later change,
since they don't have their own module classes yet.

Bug: 30564705
Test: m -j minikin_tests; ls $OUT/data/nativetest*/minikin_tests
Test: m -j continuous_native_tests dist; zipinfo -1 out/dist/*continuous_native_tests*.zip
Change-Id: Ic76a7b62e7f567f259c4ab1510ee97d26600ba9a
2016-12-13 17:18:36 -08:00
Dan Willemsen
d78d6c9fc0 Sort and reorganize clear_vars.mk to make merges easier
Moved common variables from other sections back to the common section,
then sort each section.

Test: build-aosp_angler.ninja is identical before/after
Change-Id: Ibb75935205aa80aaa392c358f8d0599ba624f90d
Merged-In: Ibb75935205aa80aaa392c358f8d0599ba624f90d
2016-12-13 21:14:25 +00:00
Dan Willemsen
05ebf54158 Sort and reorganize clear_vars.mk to make merges easier
Moved common variables from other sections back to the common section,
then sort each section.

Test: build-aosp_angler.ninja is identical before/after
Change-Id: Ibb75935205aa80aaa392c358f8d0599ba624f90d
Merged-In: Ibb75935205aa80aaa392c358f8d0599ba624f90d
(cherry picked from commit 3ea1a05917)
2016-12-12 19:07:59 -08:00
Dan Willemsen
3ea1a05917 Sort and reorganize clear_vars.mk to make merges easier
Moved common variables from other sections back to the common section,
then sort each section.

Test: build-aosp_angler.ninja is identical before/after
Change-Id: Ibb75935205aa80aaa392c358f8d0599ba624f90d
2016-12-12 17:12:51 -08:00
Dan Willemsen
a45af9e63c Add basic VNDK support in Make am: bab0fa6928 am: 323efd3035 am: 2e300cdb70
am: f987fa38a2

Change-Id: I4e43bb2127e646532d67a9d7350b01c84f51734c
2016-11-29 20:59:06 +00:00
Dan Willemsen
2e300cdb70 Add basic VNDK support in Make am: bab0fa6928
am: 323efd3035

Change-Id: I6a3f89a810782b965152a415947da26b930fc408
2016-11-29 20:47:33 +00:00
Dan Willemsen
323efd3035 Add basic VNDK support in Make
am: bab0fa6928

Change-Id: Ie2bc9062891b2f8000b1db471b27f58c74190e92
2016-11-29 20:42:32 +00:00
Dan Willemsen
bab0fa6928 Add basic VNDK support in Make
Add BOARD_VNDK_VERSION and LOCAL_USE_VNDK to specify the version of the
VNDK that will be used globally, and whether to use the VNDK on a module
basis.

If the board is using the VNDK:

* LOCAL_COPY_HEADERS may only be used by modules defining LOCAL_USE_VNDK
* LOCAL_USE_VNDK modules will compile against the NDK headers and stub
  libraries, but continue to use the platform libc++.
* LOCAL_USE_VNDK modules will not have the global includes like
  system/core/include, but it will use device-specific kernel headers.

This change does not attempt to enforce any linking constraints, that
will come in a later patch.

Test: out/build-aosp_arm.ninja is identical before/after
Change-Id: Icce65d4974f085093d500b5b2516983788fe2905
2016-11-28 13:46:17 -08:00
Jakub Adamek
ca586c0c94 Change name of overlay subdir 'sku'->'theme' am: 3451f2454a
am: bfc95a2843

Change-Id: Ia784110ca7c389db9d85a76c6c69a8dfe8a7da63
2016-10-21 07:15:01 +00:00
Jakub Adamek
bfc95a2843 Change name of overlay subdir 'sku'->'theme'
am: 3451f2454a

Change-Id: I2b7fe625d96a540cb113d7b0f76848a9e2864d66
2016-10-21 07:04:15 +00:00
Jakub Adamek
3451f2454a Change name of overlay subdir 'sku'->'theme'
The name 'sku' does not fit well as we recommend to use the same
value for different SKUs if vendors wish to have the same colors
on those SKUs.

Bug: 32268656
Change-Id: Ibb29279343058724808e27ddf2be0d0da36b1312
2016-10-19 19:11:30 +00:00
Joe Onorato
c05a8eec4b Add streaming proto option to the build system.
Test: make w/ other prereq changes
Change-Id: Ie8711878e244074a9a3c128467eeb4908c2ef008
2016-10-13 16:34:07 -07:00
Jakub Adamek
7b17a8670a Install runtime resource overlay without subdir. am: a08a1015bc
am: 44dd3e2842

Change-Id: I4771a346cb7be04f574d66fb86bf0070383fa2c5
2016-10-05 20:09:17 +00:00
Jakub Adamek
44dd3e2842 Install runtime resource overlay without subdir.
am: a08a1015bc

Change-Id: I1ca2e029b79bf125145d2031a722914fe24dd299
2016-10-05 20:03:45 +00:00
Jakub Adamek
a08a1015bc Install runtime resource overlay without subdir.
Runtime resource overlay is a bare APK with just the overlaid
resources. There is no need for additional subdir.
See http://go/sku-colors.

Bug: 31692079
Change-Id: Iff3d58f941e764a7be3ec04cafeefd592bd8b944
2016-10-05 10:03:28 +01:00