Commit Graph

34208 Commits

Author SHA1 Message Date
Yang Ni 6b68da0625 Do not package res unless RS target API < 21
Bug: 37626838

Since Lollipop, RS generated bitcode is embedded as strings in
generated Java files, and no longer needed in the resources.
This CL makes packaging resources conditional on RS target API, and
not do so unless it is below 21.

Test: mm in frameworks/rs/tests/java_api/Refocus, ImageProcessing2, and
      ImageProcessing_jb
Change-Id: I79a90ed4b96cb78b22a64a35b539d9d67351f4c4
(cherry picked from commit e2c0901918)
2017-05-01 20:07:45 -07:00
Treehugger Robot f1ec8ac22d Merge "base_rules.mk : Support subconfigs for testcases." 2017-04-24 20:54:28 +00:00
Simran Basi 3e73e2bca6 base_rules.mk : Support subconfigs for testcases.
Updates the test module build rules to also copy over any
extra test configs that match the naming convention of
LOCAL_MODULE_*.config

Bug: 37315907
Test: forrest test HelloWorldTests_HalloWelt
Change-Id: Ie476285fe780cb19264f1fb0294008b21893a4ed
2017-04-24 11:43:36 -07:00
Treehugger Robot cd46573189 Merge "make libprotobuf-cpp-* libs VNDK" 2017-04-21 07:46:20 +00:00
Treehugger Robot a637a59b7e Merge "link_type: common overrides 2nd" 2017-04-20 23:26:07 +00:00
Dan Willemsen 2b7f8ab577 link_type: common overrides 2nd
This is what intermediates-dir-for does (though it also auto-detects
some common classes, which we don't)

Test: build-aosp_arm64.ninja is identical
Change-Id: I4a3efa74e060d82658b856e68318cd92403a6149
2017-04-20 14:37:23 -07:00
Treehugger Robot 594eb16b02 Merge "Disable CFI for ASAN targets. (Make)" 2017-04-20 21:28:13 +00:00
Treehugger Robot 2f9b9f0938 Merge "Fix LOCAL_MULTILIB := 64 in TARGET_TRANSLATE_2ND_ARCH builds" 2017-04-20 21:13:04 +00:00
Dan Austin 64e48c0b51 Merge "Update fuzz_test makefile." 2017-04-20 20:29:39 +00:00
Dan Willemsen 2e3c3cf537 Fix LOCAL_MULTILIB := 64 in TARGET_TRANSLATE_2ND_ARCH builds
64-bit only apps should only be enabled if the target supports 64-bit.

Test: lunch aosp_x86_arm-userdebug; m -j PMTest_Java64
Change-Id: Ibdc863730e97b1a89efb44840a1c633e9951a1d1
2017-04-20 11:19:10 -07:00
Dan Willemsen e4d92ef568 Merge "Rewrite link type checking" 2017-04-20 15:04:08 +00:00
Vishwath Mohan c026f6d0ed Disable CFI for ASAN targets. (Make)
This CL disables CFI if both CFI and ASAN flags are enabled. This
allows ASAN to take precedence where needed, preventing build errors
that would otherwise arise.

Bug: 30227045
Test: SANITIZE_TARGET="address" m -j40
Change-Id: I9073ace0a10eb554d14e418a9b23cc8a8277607d
2017-04-20 08:03:44 -07:00
Jiyong Park c8f57d92ff make libprotobuf-cpp-* libs VNDK
libprotobuf-cpp-* libs are VNDK, However, since the '.vendor' prefix is
added before libprotobuf-cpp-* libs are added to my-*-libraries by
LOCAL_PROTOC_OPTIMIZE_TYPE, the clients are still linked against to the
platform version of the protobuf libs. As a result, link type error
occurs.

In order to avoid this, '.vendor' prefix is appended after
my-*-*libraries are all updated.

Test: normal build successfull
Test: add vendor_provided:true to libprotobuf-cpp-* and build successful
with BOARD_VNDK_VERSION=true

Change-Id: I1ed7978f03e0db56b4cbee86e286c0787f7a3afc
2017-04-20 15:41:51 +09:00
Dan Willemsen b47d4e9cf1 Rewrite link type checking
All the new features are turned off for now, since multiple branches and
products need to be verified before they can be turned on. So everything
should behave the same as today, except for no partition-based
warnings.

Instead of the current link type checks that happen during the build,
run as many as possible immediately after loading all the Android.mk
files. If we're allowing missing dependencies ('mm',
ALLOW_MISSING_DEPENDENCIES, tapas, etc), we'll defer the link type
checks to during the build. If we're not allowing missing dependencies,
we'll produce a better error message to the user about the missing
dependencies.

See core/main.mk for a description of the storage format.

This also remove the partition-based type checking. It hasn't worked all
that well, particularly with ASAN builds. The new VNDK checks will
handle the most pressing cases.

Test: Verify all link_type files and dependencies are the same:
  grep link_type: out/build-aosp_arm64.ninja | sed -E "s/ rule[0-9]+//" | sort
Change-Id: Id643658b9d9e84f99f5db0d526aad88c1f5d3417
2017-04-19 22:41:32 -07:00
Vishwath Mohan eddf74cadb Merge "Change the global CFI flag to default to enabled." 2017-04-20 01:39:56 +00:00
Vishwath Mohan 45fd769588 Merge "Change the global CFI flag to default to enabled." 2017-04-20 01:39:56 +00:00
Dan Austin 5567e5072e Update fuzz_test makefile.
Update the fuzz_test makefile to link against the new libFuzzer
library and update the coverage flags to the new version.

Test: built a fuzzer and verified correct linking.
Change-Id: Ie6e6da9a202a258abf805dbdc8cdd3490fcb2406
2017-04-19 10:58:58 -07:00
Treehugger Robot c8387929d1 Merge "Filter and colorize javac output V3" 2017-04-18 22:53:46 +00:00
Colin Cross 5f89212e24 Filter and colorize javac output V3
Add soong_javac_wrapper to all javac commands. soong_javac_wrapper
colorizes javac output, and hides noisy messages.

Previously attempted in I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
and I449a61ed2c95b3e1afd51a31a11baab15d97e2f2.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I9d7a20d766fadab323a4cf95e5734741b3f578bb
2017-04-18 21:04:58 +00:00
Treehugger Robot 4be1d8823e Merge "Make PIC/PIE levels compatible for LTO." 2017-04-18 01:48:59 +00:00
Vishwath Mohan c3b255622d Make PIC/PIE levels compatible for LTO.
The build system currently uses -fPIC for position independent
libraries, and -fpie for position independent executables. However,
these levels are incompatible and conflict when an executable includes
a static lib with the -fPIC flag - such as when building with
LTO. This CL changes the flag for executables to the compatible -fPIE
instead, which is equivalent for all architectures except PowerPC.

Bug: 30227045
Test: ENABLE_CFI=true m -j40 checkbuild # builds and boots
Change-Id: Ieb20bc2528300d88ff05e8787c5840ab6f03fb38
2017-04-17 16:16:33 -07:00
Colin Cross 04e4fd3071 Merge "Set PRIVATE_PREFIX when using $(transform-prebuilt-to-target)" 2017-04-17 18:31:01 +00:00
Bowgo Tsai 9ea5c1aad0 Merge changes Ieb58dd9a,I8ada38df
* changes:
  AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
  AVB: support signing vendor.img
2017-04-15 05:36:59 +00:00
Bowgo Tsai 9b3776017f AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
Passing --setup_rootfs_from_kernel to avbtool when
BOARD_BUILD_SYSTEM_ROOT_IMAGE is true

Bug: 33590159
Test: 'make' sailfish with BOARD_AVB_ENABLE := true
Test: 'make dist' with BOARD_AVB_ENABLE := true
Change-Id: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
2017-04-15 08:53:40 +08:00
Bowgo Tsai 8ee4a3db8c AVB: support signing vendor.img
Uses avbtool to sign vendor.img if BOARD_AVB_ENABLE is set.
It also allows appending additional arguments to avbtool via
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS.

e.g.,
  BOARD_AVB_ENABLE := true
  BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS := --generate_fec

Bug: 35415839
Test: "make" with the above variables and use avbtool to check vbmeta is
      appended to vendor.img
Test: "make dist" with the above variables

Change-Id: I8ada38dff3def6d34613e77c67944def8a49f464
2017-04-15 08:53:06 +08:00
Dan Willemsen 01f4e20172 Merge "Overridden packages shouldn't install vdex files either" 2017-04-14 23:53:23 +00:00
Colin Cross d2e778fb5a Set PRIVATE_PREFIX when using $(transform-prebuilt-to-target)
If PRIVATE_PREFIX is unset transform-prebuilt-to-target references
$(DISPLAY) instead of $(HOST_DISPLAY) or $(TARGET_DISPLAY), which
causes unnecessary kati regenerations when the DISPLAY environment
variable changes.

Bug: 36901093
Bug: 37333696
Test: grep for $DISPLAY in out/build-${TARGET_PRODUCT}.ninja
Change-Id: Ia9802fc2b07da9b74e8f80dfdcef121408cd9817
2017-04-14 15:24:49 -07:00
Dan Willemsen e224725c95 Overridden packages shouldn't install vdex files either
Bug: 37348494
Test: internal marlin, check for WebViewGoogle.vdex
Change-Id: I16469f7d84b972cee5b13aed58f4ec3f995cb83e
2017-04-14 13:33:58 -07:00
Colin Cross dd63df89d5 Merge "Make mini-debug-info stripping pass on already stripped binaries" 2017-04-14 20:14:42 +00:00
Colin Cross 5e93057da4 Make mini-debug-info stripping pass on already stripped binaries
Prebuilts may already be stripped.  Instead of requiring every stripped
prebuilt to be annotated with LOCAL_STRIP_MODULE := false, just make
the default (mini-debug-info) pass through already-stripped modules
without failing.

Bug: 36793128
Test: m -j checkbuild
Change-Id: Iafc4614ceb91bbbb2e5ff82caefd18753f8961b1
2017-04-13 14:44:26 -07:00
Sam Saccone c5b172b1eb Merge "Add the ability to save off the CSV to a file." 2017-04-13 14:36:45 +00:00
Sam Saccone 03aaa7e2d8 Add the ability to save off the CSV to a file.
While we are generating the html file also expose a way for a user to
save off a csv file. This prevents having to run the tool twice.

* Add a new flag called csvpath that takes a file path for the csv dump.
* Use csv.writer to simply print formats.
* Modify the dump_csv and count_severity to take a csv writer.

Test: run with a build.log file, compare before and after html/csv dumps.
Change-Id: I27ed730625a352fdc3fb2928433eb5e8b2ea229c
2017-04-12 18:58:53 -07:00
Treehugger Robot ba0ebe9230 Merge "Revert "Revert "device-tests: As a dependency to tests""" 2017-04-12 21:05:08 +00:00
Treehugger Robot 4d15a84fc0 Merge "Common testcase directories: Clean up duplicates" 2017-04-12 08:10:20 +00:00
Dan Willemsen 4e789c2e57 Merge "Support split /system and /vendor modules from Soong" 2017-04-12 00:06:52 +00:00
Treehugger Robot 0f8767e535 Merge changes from topic 'anno'
* changes:
  Support java annotation proccessors
  Add support for LOCAL_ERROR_PRONE_FLAGS
2017-04-11 18:26:16 +00: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
Dan Willemsen 9d2b3280e8 Support split /system and /vendor modules from Soong
Soong modules may be split into both /system and /vendor variants.
Ensure that Make libraries link against the correct version based on
whether LOCAL_USE_VNDK is set.

Bug: 36426473
Bug: 36079834
Test: build-aosp_arm64.ninja files are the same before/after
Test: attempt building with BOARD_VNDK_VERSION:=current
Change-Id: I229bc290373743406275f3ca16081eae04c27987
2017-04-10 15:54:50 -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 2d6e79d268 Merge "Add LLNDK support for the VNDK" 2017-04-07 21:21:32 +00:00
Dan Willemsen ffa3258f6c Add LLNDK support for the VNDK
Instead of using the NDK headers and libraries, add LL-NDK specific
headers and library stubs for VNDK users. This allows us to provide an
expanded liblog interface.

Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Change-Id: I0197f44c91218c73b9567a05320c91a2baaae39b
2017-04-07 21:21:24 +00:00
Tao Bao 6cb177f15c Merge "releasetools: Add validate_target_files.py." 2017-04-06 20:50:09 +00:00
Treehugger Robot f9f8b21af3 Merge "Fix duplicate and dangling rules" 2017-04-06 19:49:45 +00:00
Colin Cross 96476c1d50 Fix duplicate and dangling rules
I6730e2d3ec38004874265b2a690442dec57b33f4 introduced duplicate rules
to build classes.jar for static java library prebuilts, and left rules
to copy $(built_dex_intermediates) to $(built_dex) for modules that
don't build dex files.

Move prebuilts LOCAL_BUILT_MODULE back to javalib.jar to match
non-prebuilt modules, and remove the manual building of javalib.jar.

Add a check around $(built_dex_intermediates) for static java libraries.

Bug: 36901093
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I291510b56162f0d35553e3c7ccd59b1382224d62
2017-04-06 10:23:04 -07:00
Colin Cross 7b7363fffb Merge "Rearrange java library outputs" 2017-04-06 15:30:45 +00:00
Treehugger Robot 41d5cd7420 Merge "Move proguard before classes.jar" 2017-04-06 02:39:13 +00:00
Colin Cross 941b682099 Rearrange java library outputs
Jack can silently handle using a java library as a static java
library by merging in the java library dex file.  This causes
problems when switching to javac, because dex doesn't support
dex merging with multidex enabled?

Make the output files consistent between java libraries and static
java libraries.  Java libraries will now produce:
classes-pre-proguard.jar: the classes before proguard processing
classes.jar: the final jar file containing classes before dexing
javalib.jar: a jar containing classes.dex

Static java libraries will eventually only produce
classes-pre-proguard.jar and classes.jar.  All inter-library
linking is done with classes.jar, so a java library can be
used as a static java library.

There are too many dependencies outside the build system that
expect javalib.jar to exist for static and host java libraries,
so for now continue to build a javalib.jar that is a copy of
classes.jar.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Test: m -j java
Bug: 36901093
Change-Id: I6730e2d3ec38004874265b2a690442dec57b33f4
2017-04-05 18:04:37 -07:00
Colin Cross 950f1efbbc Move proguard before classes.jar
Downstream users of a library always link against javalib.jar, which
is either the dex jar for java libraries or a copy of
proguard.classes.jar for static java libraries.  In preparation for
making java libraries a superset of static java libraries, make
classes.jar always be the final class-containing jar for use
downstream, and always create a classes-pre-proguard.jar for
users that need a jar without shrinking or obfuscation.

Also rename the intermediates to be consitent: classes-<tool>.jar

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
Merged-In: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
2017-04-06 00:46:23 +00:00
Chih-hung Hsieh c4a7ed3530 Merge "Encode special characters in email addresses." 2017-04-06 00:40:51 +00:00
Chih-Hung Hsieh bee0dec6c4 Encode special characters in email addresses.
Now accept email addresses with '+' character.

Bug: 33166666
Test: checkowners.py -v -c `find . -name OWNERS`
Change-Id: I7792551e6be74e942906a75344233439d4bfeca3
2017-04-05 14:16:49 -07:00