Commit graph

12218 commits

Author SHA1 Message Date
Colin Cross
26e1b6d6c2 Merge "Use java prebuilts" 2017-07-19 22:08:48 +00:00
Tobias Thierer
8003d944a1 Merge "Make 'make docs' work on OpenJDK 9 toolchain." 2017-07-19 09:49:33 +00:00
Treehugger Robot
cc96704ad2 Merge "Remove JNI_H_INCLUDE from make." 2017-07-19 01:33:50 +00:00
Ivan Lozano
ad9dde8a86 Merge "Allow integer_overflow sanitizer path exclusion." 2017-07-19 01:06:28 +00:00
Ivan Lozano
9a82bfdc68 Allow integer_overflow sanitizer path exclusion.
Add support for excluding paths from having integer_overflow applied to
them when using SANITIZE_TARGET=integer_overflow via an
INTEGER_OVERFLOW_EXCLUDE_PATHS make and product variable. This covers
the make side of the change.

Bug: 30969751
Test: Build with SANITIZE_TARGET=integer_overflow
SANITIZE_TARGET_DIAG=integer_overflow
INTEGER_OVERFLOW_EXCLUDE_PATHS=<path> and confirmed this was no
longer being applied to binaries in that path.

Change-Id: I24e328257bc5a7962024c8676a1e23d7d70a8666
2017-07-18 15:14:22 -07:00
Steven Moreland
5d3b159bfb Remove JNI_H_INCLUDE from make.
It's now specified and exported from Soong.

Bug: 63762847
Test: make libraries find their headers

Change-Id: Ica5afe7465d90230628f3a924e929df38d25cdd9
2017-07-18 14:44:21 -07:00
Tobias Thierer
0b05860556 Make 'make docs' work on OpenJDK 9 toolchain.
OpenJDK 9's javadoc tool doesn't support the -bootclasspath
command line option, even with -source 1.8.

Instead, under OpenJDK 9, javadoc needs to be passed a
--patch-module argument to tell it the location of the
classes patching packages from java.* modules.

The source files in libcore/{dalvik,libart,luni,ojluni} and
external/icu/android_icu4j that go into PRIVATE_BOOTCLASSPATH
patch packages from the modules java.base, java.desktop,
java.logging, java.prefs, java.sql, jdk.net, and
jdk.unsupported. However, this CL takes the simpler approach
of placing them all in java.base, which appears to work for
the purposes of the javadoc run.

Test: Ran the following both on OpenJDK 8 toolchain and on
      OpenJDK 9 (with EXPERIMENTAL_USE_OPENJDK9=true):
      rm -rf out/target/common/docs/ && make docs
Test: Compared (via meld) the contents of out/target/common/docs
      for the two toolchains (there were some differences, see bug).
Bug: 62049770

Change-Id: If3dd927477ca32dab7ffb528350de872e1017184
2017-07-18 16:03:35 +01:00
Treehugger Robot
c7e3e962f8 Merge "Revert "Use dx.jar directly"" 2017-07-18 07:08:19 +00:00
Colin Cross
e44e75aa89 Revert "Use dx.jar directly"
This reverts commit e37a3c959a.

Reason for revert: breaks art test runner

Change-Id: Ice0cd3020ddec7f31eb789867a45f047a75a05d0
2017-07-18 05:22:59 +00:00
Colin Cross
c68434c971 Merge "Use dx.jar directly" 2017-07-17 20:40:13 +00:00
Jeff Gaston
483fae7430 Merge "Update to latest jacoco usage" 2017-07-17 20:36:39 +00:00
Treehugger Robot
abf553c9d3 Merge "custom_images: support verity fec (forward error correction)" 2017-07-14 23:51:47 +00:00
Tianjie Xu
1b28eca1a1 Merge "Generate brotli compressed {}.new.dat for full OTA" 2017-07-14 23:21:54 +00:00
Treehugger Robot
126e625fed Merge "Fix LOCAL_JAR_PROCESSOR dependency" 2017-07-14 23:06:48 +00:00
Colin Cross
1931750940 Use java prebuilts
Point the make java variables at JDK prebuilts in
prebuilts/jdk/jdk8, add them to the path, and clean up
some old overrides.

Bug: 62956999
Test: m -j checkbuild
Change-Id: Ibbeb30fab96e45aedd5bb6d710d1170f85789982
2017-07-14 14:18:53 -07:00
Jeff Gaston
aaae43cd24 Update to latest jacoco usage
Bug: 36792868
Test: EMMA_INSTRUMENT_STATIC=true m -j

Change-Id: I419b543283b52be9a72f5c6b10e4cbea68782174
2017-07-14 13:04:05 -07:00
Treehugger Robot
f4f8e91a5d Merge "Define paths for vendor native tests." 2017-07-14 18:34:59 +00:00
Tianjie Xu
b0a29ad8c2 Generate brotli compressed {}.new.dat for full OTA
Brotli has a better compression ratio than deflation. So for non-AB
full OTA, we can compress the new.dat with brotli first and store it
in the zip package.
This increase the OTA generation time by ~5 minutes for a full OTA
(measured based on 2.0G system.new.dat)

Bug: 34220646
Test: Generate a full OTA for bullhead
Change-Id: I9c0550af8eafcfa68711f74290c8e2d05a96648f
2017-07-14 10:53:21 -07:00
Bowgo Tsai
8ec2a1cb08 custom_images: support verity fec (forward error correction)
Bug: 63691195
Test: `make custom_images` with CUSTOM_IMAGE_SUPPORT_VERITY_FEC := true
Test: boot device with the custom image built above

Change-Id: I198fa1e0697cb00712bbfb6f1a717ec623703ede
2017-07-14 21:47:13 +08:00
Treehugger Robot
b253e8e854 Merge "Don't allow JNI headers for vendors" 2017-07-14 03:34:50 +00:00
Colin Cross
89b802b994 Fix LOCAL_JAR_PROCESSOR dependency
The LOCAL_JAR_PROCESSOR rule should depend on the path to the
processor jar and not the module name.

Test: m -j && m -j
Change-Id: I5ebd4cd3ad4429918edfd0a8cb5cb9a4e7e86ca7
2017-07-13 19:25:47 -07:00
Steven Moreland
cbfba70a9f Define paths for vendor native tests.
Test: manually check paths are desired using:
  $(error $(TARGET_OUT_VENDOR_NATIVE_TESTS))
  with both 'm -j' and 'm -j BOARD_VNDK_VERSION=current'
Fixes: 62495833
Change-Id: I236718f845d8ab604a0aec06b3220bc1c4f3d36b
2017-07-13 15:46:00 +00:00
Jiyong Park
b43a52d79d Don't allow JNI headers for vendors
This is already blocked in Soong. Do the same for make.

Bug: 63553556
Test: BOARD_VNDK_VERSION=current m -j libSampleAuthJNI cannot be built
Change-Id: I04a89b3f9de903a6b0384f13d5a80886344c14b4
2017-07-13 15:51:07 +09:00
Jiyong Park
cb8e636ed0 fix: device_kernel_headers can't be found in the make world
Since device_kernel_headers is marked as 'vendor:true', it is exported
to the make world as device_kernel_headers.vendor. Use the correct name
with the .vendor suffix.

Bug: none
Test: BOARD_VNDK_VERSION=current m -j does not complain about
device_kernel_headers.

Change-Id: If3eaa3c5832820c914ef427668d70fa8d8d0bf97
2017-07-12 18:29:17 +09:00
Howard Chen
0c5f1e575d Support kernel modules in the odm image
This patch reuses the build-image-kernel-modules macro to build the
odm/lib/modules directory according to the BOARD_ODM_KERNEL_MODULES
which contains list of kernel module files.

Bug: 36012197
Test: android master build on pixel
Change-Id: I2c004132a89e7f230690b4d26c98c3d5b2769f11
2017-07-10 10:44:58 +08:00
Jiyong Park
0c59dab590 Device-specific kernel headers are accessbile again
Device-specific kernel headers (TARGET_PROJECT_SYSTEM_INCLUDES) have
been added to the global include paths. However, since global include
paths are no longer provided when a lib is built for vendors, the
device-specific kernel headers becomes inaccessible. To solve this
problem, a pseudo header library 'device_kernel_headers' is defined
and it is added to all Android.mk defined lib/bins.

Also, in order to give this info to the soong world,
TARGET_PROJECT_SYSTEM_INCLUDES is exported as a new product config
DeviceKernelHeaders.

Bug: 62939405
Test: choosecombo to aosp_sailfish (or any other Pixel/Nexus targets)
BOARD_VNDK_VERSION=current m -j gralloc.msm8996 (or any other vendor
libs using vendor-specific kernel headers)

Change-Id: I3f0a2b893cc9352d6c13f3151e8834477d15c07b
2017-07-08 10:16:23 +09:00
Treehugger Robot
c86c8502ac Merge "Give TARGET_OUT_HEADERS to vendor modules" 2017-07-07 22:25:00 +00:00
Colin Cross
e37a3c959a Use dx.jar directly
Use $(JAVA) to invoke dx.jar instead of the dx wrapper script.
Also allow the dx command line or the dx jar to be specified on
the command line.  Allows better dependencies on dx.jar, and
doesn't rely on having java on the path.

Bug: 62956999
Test: m -j checkbuild
Change-Id: I5f265132690ad28b3139954fea44eb0c4a43393a
2017-07-07 13:34:33 -07:00
Colin Cross
bc45a33c93 Merge "Refactor prebuilt tools" 2017-07-07 20:19:24 +00:00
Ivan Lozano
05900230fd Merge "Add integer_overflow sanitization build option." 2017-07-07 20:07:20 +00:00
Colin Cross
cd20d5980c Refactor prebuilt tools
Put the prebuilt and non-prebuilt tools selections into the two
clauses of an if block to simplify the next patch.

Test: m -j checkbuild
Change-Id: Idd01bc81a2b619f7fc23df7566a01b46598433a3
2017-07-07 18:16:28 +00:00
Treehugger Robot
d659f806e5 Merge "Enable stripping of java debug information when required." 2017-07-07 15:24:32 +00:00
Treehugger Robot
ae67473255 Merge "Increase max heap size for javac to 2GB." 2017-07-07 01:57:16 +00:00
Ivan Lozano
4a363734b3 Add integer_overflow sanitization build option.
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
2017-07-06 18:21:37 -07:00
Bryan Eyler
d4794315ff Re-compute DX command if it changes for PDK.
Bug 62360631
Tested build of PDK.

Test: builds
Change-Id: I7cbd649a8a3ce4326e513d5a808b76fbb011d99e
Merged-In: I7cbd649a8a3ce4326e513d5a808b76fbb011d99e
(cherry picked from commit af4bde4239)
2017-07-06 16:22:01 -07:00
Colin Cross
a12d38a721 Increase max heap size for javac to 2GB.
Compiling Dialer requires increasing the javac heap size above
1GB, probably due to the extensive use of annotation processors.
Increase it to 2GB.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I4dd3759a98ea915469e69f563dc49be8a25d518e
Merged-In: I4dd3759a98ea915469e69f563dc49be8a25d518e
(cherry picked from commit 0e785c79b8)
2017-07-06 16:13:00 -07:00
Przemyslaw Szczepaniak
2e81b3c49f Enable stripping of java debug information when required.
We're removing LocalVariableType / LocalVariableType in order to
save space. Enabling stripping reduces AOSP  image size save
by ~12MB.

Bug: 38224820
Test: CtsLibcoreTestCases
Change-Id: I3168d73ec6825aa5879db7e1135d7ed61d488d72
2017-07-06 08:31:14 +00:00
Howard Chen
8eff2d7c8e Merge "Add a make maco to convert string to upper case" 2017-07-06 03:46:07 +00:00
Jiyong Park
7f8be9f695 Give TARGET_OUT_HEADERS to vendor modules
Many vendor modules are using headers that are copied to
$(TARGET_OUT_HEADERS)/some/path via LOCAL_COPY_HEADERS. In order to let
them use the headers via #include <some/path/header.h>,
$(TARGET_OUT_HEADERS) is again added to the system include path.

Bug: 63340459
Test: BOARD_VNDK_VERSION=current m -j gives less 'cannot find header'
errors.

Change-Id: I472e74533b437653c76dc416f7f4527c0e90750d
2017-07-06 09:45:26 +09:00
Treehugger Robot
efb6fddf39 Merge "Align size of vbmeta image to 4k boundary" 2017-07-06 00:29:52 +00:00
Treehugger Robot
691f5cec3a Merge "Build: Add PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD" 2017-07-05 18:05:36 +00:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Andreas Gampe
831fc713f8 Build: Add PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD
Add product variable that can override the ART module behavior
packing. Rules and meaning are detailed in art/Android.mk.

Bug: 62087184
Test: m
Change-Id: I88e1cb0925cf62c3951b486a178d4dfc5e888a93
2017-06-30 11:37:38 -07:00
Bowgo Tsai
0556231cae Align size of vbmeta image to 4k boundary
Adding option "--padding_size 4096" in BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS
instead of INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS. The former setting will
be propogated to `make dist` while the latter is only used for `make`.

Bug: 38454093
Test: `make dist` and check vbmeta.img is being padded.
Merged-In: I929288b218761a4637a2a2ef0679d3ff85c70731
Change-Id: I929288b218761a4637a2a2ef0679d3ff85c70731
(cherry picked from commit 9e95beab31)
2017-07-01 00:34:02 +08:00
Dimitry Ivanov
b519d002f3 Merge "Add libdl.so to the list of system shared libs" 2017-06-29 22:12:03 +00:00
Dan Austin
9978b5274c Update coverage sanitizer flags in make
Update the coverage sanitizer flags in make to use the new
flavor of coverage sanitization.

Bug: 63108942

Test: Test fuzzer runs with coverage guards.

Change-Id: I12bda1767b69d0d89557e5f8a91da50b0f137ff3
2017-06-29 08:53:02 -07:00
Howard Chen
b83b205265 Add a make maco to convert string to upper case
There's already a to-lower function. Add a to-upper function to make
it complete.

Bug:36012197
Test: `make` pass, flash images from $OUT and boot device with chain
partitions

Change-Id: I39fe8c277a3cf6b87fc3c411eeab2fa5fb40007b
2017-06-29 16:18:47 +08:00
Dimitry Ivanov
cdf3927ec4 Add libdl.so to the list of system shared libs
Note that libdl is already (always) implicitly loaded
because libc.so has a dependency on it.

Also make sure that libc.so always preceding libdl.so
in dt_needed list.

Bug: http://b/62815515
Test: make
Change-Id: I94c9d676b7fa98438b452d24f6c3bbf93166c6a9
2017-06-27 16:05:13 -07:00
Tao Bao
95a95c3a5e Allow packing custom radio images into target_files zip.
Radio images are added to INSTALLED_RADIOIMAGE_TARGET, which by default
will be packed under RADIO/ in a target_files zip. This CL introduces
BOARD_PACK_RADIOIMAGES that allows additionally copying them into
IMAGES/, which will then be included into <product>-img.zip.

Bug: 62195105
Test: Define BOARD_PACK_RADIOIMAGES and `m dist`. Check the generated
      target_files zip and <product>-img.zip.
Change-Id: I3deafd2dfecd1d4dbfdfc2d002fc40ef22fb60ea
2017-06-27 13:50:12 -07:00
Colin Cross
b12d4b7ac2 Get java config from soong
Soong will export java config variables.

Test: builds
Change-Id: If185543f8f36a30e7632946c16351d44f012bd6a
2017-06-22 17:21:05 -07:00