Adds the SANITIZE_TARGET=integer_overflow build option to apply signed and
unsigned integer overflow sanitization globally. This implements the
Make side of the build option.
A LOCAL_SANITIZE_BLACKLIST variable is added to allow blacklists to be
defined in make files, mirroring similar functionality provided in Soong.
An additional build option is provided to control whether or not to run
in diagnostics mode, controlled by SANITIZE_TARGET_DIAG. This works the
same way that SANITIZE_TARGET does and currently only supports
'integer_overflow' as an option.
Bug: 30969751
Test: Building with and without the new flags, device boot-up, tested
various permutations of controlling the new flags from build files.
Change-Id: Iacc47e196f21aa1edff5b406bfbc564b5f4e42bd
Allow using a host java library as an intermediate processor step
after javac but before desugar, proguard, or dx.
Test: manual
Change-Id: I7fb843e10d96c0167f6e4371582fabcc1454521f
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
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
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)
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
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
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
LOCAL_OVERRIDES_MODULES is similar to LOCAL_OVERRIDES_PACKAGES, but is
for executables.
Bug: 36491275
Test: LOCAL_OVERRIDES_MODULES := foo should prevent a target executable
foo from being installed. If foo is not a target executable, error
should be reported.
Change-Id: I558f3d94105f9e319f8413c1290799f1c70ee131
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
external/dbus and external/dbus-binding-generator was removed from
the manifest.
Bug: 31602715
Test: make checkbuild
Change-Id: Iea0277720acad8ac0fa630b8745f90fb3c3b5f00
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
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
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
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
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
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
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
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)
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
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
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
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