Commit graph

501 commits

Author SHA1 Message Date
Colin Cross
b17f285169 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
2017-04-28 13:39:12 -07:00
Colin Cross
cde14987ba Support java annotation proccessors
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
2017-04-11 09:56:09 -07:00
Colin Cross
5e58793731 Add support for LOCAL_ERROR_PRONE_FLAGS
This will allow individual modules to enable error prone checks
as needed so that the change to treat an error prone check as a
compiler error can be done atomically with the changes to fix
the issues that check reveals.

Tested with the following steps, cleaning up the targets in
between to ensure that it was rebuilt everytime.

Set LOCAL_ERROR_PRONE_FLAGS := -Xep:ClassCanBeStatic:WARN
compiler error in junit-params-test target. Built
javac-check-junit-params-test with RUN_ERROR_PRONE=true to make
sure that compilation failed.

Built the javac-check-junit-params-test without RUN_ERROR_PRONE
set to make sure that the flag is not included unless explicitly
requested.

Built the junit-params-test as normal to make sure it still
worked properly.

Bug: 31507496
Test: See above
Change-Id: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
Merged-In: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
(cherry picked from commit 3ca9298d99)
2017-04-07 17:46:40 -07:00
Dan Willemsen
2a8a39398b 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
Merged-In: Id37d4692d5fbddce467bd777903b20169f44dd6e
Change-Id: Id37d4692d5fbddce467bd777903b20169f44dd6e
2017-04-05 03:36:00 +00:00
Dan Willemsen
2be559488d 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
2017-04-04 14:59:55 -07:00
Colin Cross
8fb3f39bcd Merge "Move comments to the previous line"
am: 906a3ea5d6

Change-Id: I70787abb1a80987fb89a4444c68b9658c80c0622
2017-03-28 22:27:44 +00:00
Colin Cross
349a7a7f1a 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
Merged-In: I7b1eb3b9febff1a5a5fca1e6623b2b36d538dacc
2017-03-28 13:24:45 -07: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
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
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
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
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
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
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
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
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
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
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
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
Dan Willemsen
5ec91e5376 Merge "Remove LOCAL_CTS_GTEST_LIST_EXECUTABLE" am: 847d965b9e am: 8c42bd3ae4
am: cab982825c

Change-Id: I1586f98be30f97fc2d759a847875a67fc84d8c56
2016-10-01 01:59:23 +00:00
Dan Willemsen
3aa39a4903 Remove LOCAL_CTS_GTEST_LIST_EXECUTABLE
The one user has now been removed, so this is no longer necessary.

Test: None
Change-Id: I8fb9e7b90f664af616368685d81f8b10d0687306
2016-09-29 22:37:04 -07:00
Dan Willemsen
a7d2992ba3 Merge "Add LOCAL_EXPORT_C_INCLUDE_DEPS" am: 1c0b5eaf83 am: b1fdb9745f
am: b42e166273

Change-Id: Ib2cb95dcbb64a31f3e33e4fe90d5091914362b03
2016-09-30 01:48:29 +00:00
Dan Willemsen
ba6a164da7 Add LOCAL_EXPORT_C_INCLUDE_DEPS
This shouldn't be necessary for most makefiles, since we add
$(LOCAL_GENERATED_SOURCES) to this already included, but for prebuilts
that aren't actually prebuilts (Soong modules), we need to pass
dependencies so that the generated headers are built before being used.

Bug: 31742855
Test: Use, inspect build-*.ninja
Change-Id: I8d9f675af639d3f40780d48a016fc079a82531c2
2016-09-29 12:08:29 -07:00
Dan Willemsen
a4c82e7b3a Merge "Remove WITH_SYNTAX_CHECK" am: c114bd9dbf am: d640e062e8
am: 28d50c498b

Change-Id: I335a3b87e3e7e75be9b2a2c2031388609d69c057
2016-09-28 01:57:47 +00:00
Treehugger Robot
c114bd9dbf Merge "Remove WITH_SYNTAX_CHECK" 2016-09-28 01:44:24 +00:00
Evgenii Stepanov
c14977f30b Merge "Enable LOCAL_SANITIZE:=cfi and add LOCAL_SANITIZE_DIAG." am: 2358c55d70 am: 04b11c5acd
am: 9eddd0620c

Change-Id: I06999b22af259785258e6b198c439c3538023f6a
2016-09-27 21:04:26 +00:00
Evgenii Stepanov
2358c55d70 Merge "Enable LOCAL_SANITIZE:=cfi and add LOCAL_SANITIZE_DIAG." 2016-09-27 20:51:41 +00:00
Dan Willemsen
e68100e8bb Remove WITH_SYNTAX_CHECK
It's no longer used. The majority of the platform is on clang anyways.

Test: m -j
Change-Id: I4fb4375eaad2469e169d34c47ae3fe2a0540aeec
2016-09-26 17:37:19 -07:00
Yohann Roussel
cf65679d9e Add support for Jack plugin am: 53b7fbbe78 am: be50693fc1
am: 62e67d1bff

Change-Id: I7cf2db9ccd9bfe03ec1394340b2683b014e7dde5
2016-09-22 22:14:39 +00:00
Yohann Roussel
53b7fbbe78 Add support for Jack plugin
And ensure compatibility with coverage plugin.

(cherry picked from commit 862bb84d37e3e6ca61080de58f206e512e09d4e0)

Bug: 28876950
Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I804558a501825357bf0812de626d2957eedbdc13
2016-09-21 10:53:45 +02:00
Ryan Campbell
5a63fe6856 Merge "Implement path-based enabling of code coverage." am: 1e1ecd5d07 am: 6b92bb4ebb
am: 577eab3323

Change-Id: I36a4fc67e87e8561486111263b0d6b6ed1bdefcc
2016-09-13 20:01:23 +00:00
Ryan Campbell
81c9d29dad Implement path-based enabling of code coverage.
Native coverage is enabled by setting NATIVE_COVERAGE to true
and specifying a list of paths in the COVERAGE_PATHS
environment variable. Files are exported to a zip file in the
target out directory.

Change-Id: I66a2ddd88e849bec1cc0cdae1b51fe18a007e2c3
2016-09-13 10:27:25 -07:00