Commit graph

15162 commits

Author SHA1 Message Date
Tobias Thierer
c209fb1799 Merge "javadoc/droidoc: Don't add .jar files to sourcepath." 2018-03-27 09:54:13 +00:00
Treehugger Robot
1f7bf445e7 Merge "Products launching with API 28 needs system-as-root" 2018-03-27 03:40:22 +00:00
Treehugger Robot
73b009e96c Merge "RRO for framework-res.apk is not force built against SystemSDK" 2018-03-27 03:28:32 +00:00
Jiyong Park
c0ece103ec RRO for framework-res.apk is not force built against SystemSDK
When BOARD_SYSTEMSDK_VERSIONS is set, any apk in the vendor partition
is force built against SystemSDK (or Android SDK if LOCAL_SDK_VERSION is
set to current). However, there should be one exception to this: RRO for
framework-res.apk. This is because the RRO is currently overriding
resources that are not part of SystemSDK. Until SystemSDK is expanded to
cover resources that are eligible for overriding, let's allow the direct
dependency from RRO to framework-res.apk.

Bug: 35859726
Bug: 76398918
Test: m -j
Merged-In: Ib9981b107d78691eef21f4525ebdac9866d5c50e
Change-Id: Ib9981b107d78691eef21f4525ebdac9866d5c50e
(cherry picked from commit d8c4c30ba4)
2018-03-27 09:40:11 +09:00
Tobias Thierer
e5665cdb4e javadoc/droidoc: Don't add .jar files to sourcepath.
javadoc expects directories on the sourcepath, not jar files.
The original commit 88b607994a
in 2009 was already passing the jar files, and every revision
since then seems to have kept this habit through cargo cult.

This CL removes the superfluous jar file arguments from the
sourcepath argument to javadoc.

Test: Treehugger
Bug: 76436487

Change-Id: I44b4b8ba248ad4deafbb6462e6f7398f15bd2845
2018-03-27 00:33:18 +01:00
Justin Yun
65c680e285 Set __ANDROID_API__ for vendor binaries to vndk version.
When building vendor modules with BOARD_VNDK_VERSION=current, the
API of the vendor modules will be current PLATFORM_VNDK_VERSION.
__ANDROID_API_FUTURE__ will be used as before if the version is a
CODENAME.

If BOARD_VNDK_VERSION is not "current", that means the VNDK version
of the vendor modules is BOARD_VNDK_VERSION.

Bug: 74833244
Test: Build and check boot.
Change-Id: Iccc603f1b5ffa066e74ba1357f3fbbcc13c58f76
2018-03-27 08:22:11 +09:00
Bowgo Tsai
ed3b1ca12c Products launching with API 28 needs system-as-root
With project Treble, it's possible to only update system.img across
Android major releases without changing other partitions. However,
for non-A/B devices, ramdisk cannot be updated via a system-only OTA
because it resides in /boot partition.

This leads to two major incompatibility issues:
  - The older /init in ramdisk might not be able to parse the *.rc files
    on /system.
  - The ramdisk contains /init.rc, which also may be out of date compared to
    what is required for the new /system.

Therefore, for new devices launched in P with full Treble support, ramdisk
should be merged into system.img by setting
BOARD_BUILD_SYSTEM_ROOT_IMAGE := True.

Upgrading devices can keep using non-system-as-root configuration.

Bug: 64194858
Test: manual makefile prodding
Change-Id: Ic04c63bd2aac3afa686a6f5cb124beebbcd6a5ee
2018-03-26 23:16:06 +08:00
Andreas Gampe
c3e151954f Build: Amend minidebug odex setup
Add PRODUCT_OTHER_JAVA_DEBUG_INFO similar to PRODUCT_SYSTEM_SERVER_DEBUG_INFO.
Use WITH_DEXPREOPT_DEBUG_INFO as global default, and allow the product
to opt out by setting the above to "false."

Bug: 75259124
Test: m
Change-Id: Id4a2e5d00a1b73a7e7a0a65146042c0aa0c1b411
2018-03-23 10:40:10 -07:00
Treehugger Robot
c0811e291c Merge "Products launching with API 28 need 64-bit binder interface." 2018-03-22 21:52:26 +00:00
Tao Bao
b4ec6d752a Remove the hard-coded path of build_verity_metadata.py.
build_image.py used to invoke build_verity_metadata.py with a hard-coded
path of 'system/extras/verity/build_verity_metadata.py', which makes it
hard to run unittests from non-$(ANDROID_BUILD_TOP) directory.

This CL adds the dependency on the tool, so that it gets installed to
$(HOST_OUT_EXECUTABLES), then removes the hard-coded path.

Bug: 74544459
Bug: 76015688
Test: `m dist`
Test: python -m unittest test_validate_target_files
Change-Id: I0dcf4eb067a0db6f099cb589eb99a151a05c7f2b
2018-03-21 21:15:59 +00:00
Colin Cross
2a63439a31 Merge changes I54b8ec9c,Ibef28507,Ia858de22,Ide3050ec,Ib6e00be4, ...
* changes:
  Add asan-specific CleanSpec
  Use a srcjar for aapt and aapt2 output
  Move R.txt and make aapt2 generate it
  Move aapt2.mk before java.mk
  Remove redundant renderscript_target_api computation
  Move java renderscript support to java_renderscript.mk
  Use srcjar and resource zip as output of renderscript rules
2018-03-21 19:59:41 +00:00
Treehugger Robot
d39eeb44f1 Merge "Includes odm SELinux contexts files for recovery" 2018-03-21 07:02:36 +00:00
Colin Cross
f6d68cf6fe Use a srcjar for aapt and aapt2 output
Dumping files in the *_intermediates/src causes incremental build
problems, because we don't know when to delete them if they are
no longer generated.  Switch to outputting a srcjar instead, and
pass it in to the turbine and javac compiles.

Bug: 73885582
Test: m checkbuild
Change-Id: Ibef28507522339d930c09426d0c98372eb864cb6
Merged-In: Ibef28507522339d930c09426d0c98372eb864cb6
(cherry picked from commit 2d1cddd567)
2018-03-20 15:26:27 -07:00
Colin Cross
2ae710c29f Move R.txt and make aapt2 generate it
Move R.txt from $(intermediates.COMMON)/src to $(intermediates.COMMON)
in preparation for moving aapt/aapt2 java files out of src.  Also
make aapt2 generate R.txt, and make it an implicit output of the rule
and and input to the aar rule.

Bug: 73885582
Test: m out/target/common/obj/JAVA_LIBRARIES/SettingsLib_intermediates/javalib.aar
Test: m checkbuild
Change-Id: Ia858de226355965b69794c002f841333df16a612
Merged-In: Ia858de226355965b69794c002f841333df16a612
(cherry picked from commit 7c24f8ec85)
2018-03-20 15:26:27 -07:00
Colin Cross
7a28158b90 Move aapt2.mk before java.mk
aapt2.mk will export a srcjar that will be compiled by java.mk, so
it needs to be evaluated first.  Also move java_renderscript.mk
before aapt2.mk so that the generated resoures are available.

Bug: 73885582
Test: m checkbuild
Test: rm -rf out/target/common/obj/APPS/RsHelloCompute_intermediates &&
      m out/target/common/obj/APPS/RsHelloCompute_intermediates/src/R.stamp
Change-Id: Ide3050ec993a945f7077b75e952c3b3532306ede
Merged-In: Ide3050ec993a945f7077b75e952c3b3532306ede
(cherry picked from commit 8528eabbba)
2018-03-20 15:26:27 -07:00
Colin Cross
39772fedde Remove redundant renderscript_target_api computation
renderscript_target_api is set by java_renderscript.mk, it doesn't
need to be computed again in static_java_library.mk and
package_internal.mk.

Bug: 73885582
Test: no change to ninja file
Change-Id: Ib6e00be425c385f4911def19ed5042a740f2c79b
Merged-In: Ib6e00be425c385f4911def19ed5042a740f2c79b
(cherry picked from commit 55cce23360)
2018-03-20 15:26:27 -07:00
Colin Cross
1e047d39a5 Move java renderscript support to java_renderscript.mk
Move java renderscript support to java_renderscript.mk in
preparation to moving it before aapt.  Filter *.rs files
out of LOCAL_SRC_FILES and forbid them in java_common.mk
so that using *.rs files is an error if java_renderscript.mk
was not included.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib37ce89daee58b025dec98f733c5a08149641afd
Merged-In: Ib37ce89daee58b025dec98f733c5a08149641afd
(cherry picked from commit 71822d6fb9)
2018-03-20 15:26:27 -07:00
Colin Cross
dc1e028994 Use srcjar and resource zip as output of renderscript rules
Replace RenderScript.stamp with a srcjar, with a resource zip as
an implicit output.  This makes the renderscript rules self contained,
which will make it easier to move them before aapt.

Bug: 73885582
Test: m checkbuild
Change-Id: I12d33e52019aebac6ea33271939228e4690a4173
Merged-In: I12d33e52019aebac6ea33271939228e4690a4173
(cherry picked from commit e00e2fae52)
2018-03-20 15:25:51 -07:00
Nan Zhang
0aa96a05fb Add dist-for-goals for droiddoc docs.zip
Old droiddoc will install the *-docs.zip & API files to the dist.

And also remove INTERNAL_PLATFORM_*API_FILE variables from config.mk and
get rid of the dependencies on api-stubs, system-api-stubs, test-api-stubs
timestamp.

Test: m -j api-stubs-docs
Bug: b/70351683
Change-Id: I08923bb5f62d2f55961d9a2865723d7b3fae7206
Merged-In: I08923bb5f62d2f55961d9a2865723d7b3fae7206
2018-03-20 11:42:23 -07:00
Julien Desprez
ee9ea1d601 Merge "Add loganalysis to cts" 2018-03-20 02:44:20 +00:00
Treehugger Robot
ad29fe419e Merge "Use bsdiff to generate recovery-from-boot.p for system-root-image." 2018-03-20 00:00:34 +00:00
jdesprez
4619031efe Add loganalysis to cts
Tradefed depends on Loganalysis so it should also be part
of cts. Luckily there was no overlap (cts never called a
part of TF that use loganalysis) so it never failed
with classNotFound before.

Test: build cts
Bug: 75979908
Change-Id: I2542ecd077149f7165aff120d67054943df20b54
2018-03-19 16:47:22 -07:00
Tao Bao
6d5d623987 Use bsdiff to generate recovery-from-boot.p for system-root-image.
This CL handles a path that uses system-root-image on non-A/B device.
For this path, we can't generate recovery-from-boot patch with imgdiff,
because boot/recovery images contain different number of entries (only
recovery iamge has ramdisk image now).

Using BOARD_USES_FULL_RECOVERY_IMAGE can work around the issue, at the
cost of extra size. Compared to carrying full recovery image, this CL
saves the cost of the kernel size, by putting a patch that's roughly the
size of the recovery ramdisk.

The applypatch executable already detects and handles a bsdiff patch
automatically. No change required to that end.

Note that it won't further reduce the patch size by handling that
ramdisk entry specially, because (a) that's the only difference between
the two images; and (b) there's no corresponding data in boot image to
be diff'd against.

Bug: 72731506
Test: `m dist` with aosp_angler-userdebug. Check the device can install
      recovery image successfully (after intentionally corrupting the
      recovery image).
Test: Build aosp_angler-userdebug with BOARD_BUILD_SYSTEM_ROOT_IMAGE set.
      Verify the generated patch files.
Test: Run validate_target_files.py with the target_files.zips.
Change-Id: I69c06f51ba8c39ae059c5e9a6872a9f10600cf17
2018-03-19 14:13:02 -07:00
Colin Cross
238bb91678 Merge "Provide testcases directory for host cross out (windows) modules" 2018-03-19 20:40:50 +00:00
Colin Cross
c9907cc8f6 Merge "Replace extract_srcjars.sh with zipsync" 2018-03-19 20:33:08 +00:00
Søren Gjesse
d04f28db7b Merge "Enable R8 by default (second attempt for Q)" 2018-03-19 07:27:20 +00:00
Colin Cross
e887ccbf12 Provide testcases directory for host cross out (windows) modules
If HOST_CROSS_OUT_TESTCASES is not defined, then a module that
builds for windows and has a test config will attempt to install
the config file to /<module>/<module>.config.

Fixes:
[ 54% 99/183] Copy: /simpleperf_unit_test/x86/simpleperf_unit_test.exeninja: error: mkdir(/simpleperf_unit_test): Permission denied

Test: m simpleperf_unit_test
Change-Id: I07dcecbce9c710b29fec5fbdedc462be3245b578
2018-03-17 05:14:13 +00:00
Martijn Coenen
c3162eeff0 Products launching with API 28 need 64-bit binder interface.
This time around we're really deprecating the 32-bit
binder interface (v7), even for 32-bit devices.

Upgrading devices can keep using it.

Bug: 69775513
Test: manual makefile prodding
Change-Id: I3850418ca267e72593f5f12b940e5382b29b024a
Merged-In: I3850418ca267e72593f5f12b940e5382b29b024a
2018-03-16 09:43:39 +01:00
Colin Cross
3f99cd5933 Replace extract_srcjars.sh with zipsync
Use zipsync instead of extract_srcjars.sh.

Also fixes an issue where unzipping a resource zip would
ignore anything that wasn't a *.java file.

Bug: 73885582
Test: m checkbuild
Change-Id: I1c25f65afa196614879071c8655866febebac185
2018-03-15 16:40:05 -07:00
Colin Cross
1f4f67201d Merge "Update turbine command line flags" 2018-03-15 22:39:28 +00:00
Colin Cross
0c0adb993c Allow compiles with only srcjars
Some javac and turbine compiles have no source files but sources
from srcjars.  Continue with compilation if the java source list
is empty but the srcjar source list is not.

Bug: 73885582
Test: m checkbuild
Change-Id: Ica412de2dd1b1bfc12c01c3eafca884220d42771
2018-03-15 13:07:33 -07:00
Colin Cross
6b27285619 Update turbine command line flags
The latest version of turbine requires a -- after the javac
options, and uses multiple --bootclasspath arguments instead
of a javac-style colon separated list.

Test: m javac-check
Bug: 74339924
Change-Id: I3f694ac375eab61954d4fe63c1166a18314bf75f
2018-03-15 06:04:53 +00:00
Colin Cross
34af6a41ff Merge changes I97ea3ff3,Ib4351a5b,I74b61809,If2653f84,I2932f9e9, ...
* changes:
  Allow aapt2 rules to take zipped resource files
  Add LOCAL_SRCJARS support
  Remove unused .fs file suppport
  Remove unused file lists
  Remove sharding support from make
  Move aapt flags from java_common.mk to aapt_flags.mk
2018-03-14 23:29:49 +00:00
Colin Cross
bc0c494d3a Allow aapt2 rules to take zipped resource files
Allow aapt2 rules to take zipped resource files similar to the
way the javac rules take srcjars.  For now, unzip the files using
extract_srcjars.sh, and then use aapt2 compile --dir.  Eventually
it could be done with aapt2 compile --zip.

Bug: 73885582
Bug: 74574557
Test: m checkbuild
Change-Id: I97ea3ff305e7a9ef2a908b4cf0bca903af62c6b1
2018-03-14 14:13:18 -07:00
Søren Gjesse
f71d68de18 Enable R8 by default (second attempt for Q)
Fixed bugs which was discovered in the last attempt.

Bug: 74508478

Test: m -j PRODUCT-taimen-userdebug
Test: m -j PRODUCT-elfin-userdebug
Test: Check that some .vdex files built have R8 generated code

(cherry picked from commit a3b796d998)

Change-Id: Ibe08137cd6db94b1fc487267e169d3f5ee598846
Merged-In: I2a8e0e5cad1d698ae73ba152e34a08a496112d7d
2018-03-14 22:09:10 +01:00
Treehugger Robot
d3547d9d5b Merge "Enable apps to build with resource namespaces" 2018-03-14 21:05:55 +00:00
Colin Cross
11e2d55c0f Add LOCAL_SRCJARS support
Allow java modules to take jars containing .java files as an input.
For turbine, pass them directly to turbine.  For javac, extract them
to a directory and pass a list of the files to javac.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib4351a5b4b165a55e5fb02ee2680466db368983a
2018-03-14 12:05:04 -07:00
Colin Cross
93d6550c53 Remove unused .fs file suppport
.fs files are obsolete.

Bug: 73885582
Test: m checkbuild
Change-Id: I74b618099333fe565c7b235994be64e6466d2da6
2018-03-14 12:05:01 -07:00
Colin Cross
c3e7074df1 Remove unused file lists
RS_FILES and AIDL_FILES were used for cleaning up the intermediate
src dir, but are no longer used after
If7529979de6fa62a651933a3a974f47b033851d6 and
I01feff7cc399ac5b88b83333a1ac86928d0a81e6.

Bug: 73885582
Test: m checkbuild
Change-Id: If2653f846b568fd2587c8e055ef820e17760f133
2018-03-14 12:04:58 -07:00
Colin Cross
5ef6e79c21 Remove sharding support from make
Sharding is not used in make any more, the large java modules
(libcore and framework) have moved to Soong.  Keeping sharding
support complicates java compiling, so remove it.

Bug: 73885582
Test: m checkbuild
Change-Id: I2932f9e96bfc8f2ebf82095b16d6c0b3c51613f0
2018-03-14 12:04:55 -07:00
Colin Cross
b6013af085 Move aapt flags from java_common.mk to aapt_flags.mk
The aapt flags were being set in java_common.mk, which is used by
various entry points.  host_dalvik_java_library.mk and
host_java_library.mk, and java_library.mk don't support aapt, only
package_internal.mk and static_java_library.mk do.  Move the aapt
flags into aapt_flags.mk, and include it from package_internal.mk
and static_java_library.mk.

Bug: 73885582
Test: no change to build-${TARGET_PRODUCT}.ninja
Change-Id: I124393846d37b9bbc941272cce4274121ac235ef
2018-03-14 12:04:35 -07:00
Adam Lesinski
960de8efcd Enable apps to build with resource namespaces
Setting LOCAL_AAPT_NAMESPACES := true enables
namespaces for an app and requires any library resources
to be fully qualified by their package.

Test: manual
Bug: 73885582
Change-Id: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
Merged-In: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
2018-03-14 12:04:01 -07:00
Colin Cross
5c66c2864a Allow locally disabling R8
Bug: 74746744
Test: m checkbuild
Change-Id: I5741f15821cf8de5df494ed8ad31d32a44657514
2018-03-14 17:00:23 +00:00
jdesprez
b8f85204a6 Update the base autogenerated config template for instru
For APCT auto-generated configuration, the template will
include the test-suite-tag that will allow it to be
picked up automatically.

Test: none
Bug: 74440293
Change-Id: Ia82e8287f212f4daec97523394517bfbbe7a86d3
2018-03-13 13:43:42 -07:00
Dan Willemsen
a0c1cc97bd Merge "Remove obsolete BRILLO variable" 2018-03-12 21:26:03 +00:00
Dan Willemsen
19bd9b99ce Remove obsolete BRILLO variable
Test: none
Change-Id: Ia4474927709ccfa1ff76f5dda1d8aa13ef9d1004
2018-03-10 15:23:12 -08:00
Dan Willemsen
6b3a8380cc Fix xz with SANITIZE_HOST
There isn't an Address Sanitizer prebuilt of xz, so always use the same
xz prebuilt.

Bug: 36130900
Test: SANITIZE_HOST=address m nothing; check ninja file
Test: m libc
Change-Id: Iba3599d4289ad5afb573dbec5ac8fc463668b1c6
2018-03-09 22:38:37 -08:00
Treehugger Robot
8e287901c3 Merge "Use xz prebuilt" 2018-03-10 03:00:29 +00:00
Dan Willemsen
893859573d Use xz prebuilt
Instead of whichever xz happens to be on the PATH.

Bug: 36130900
Test: m
Change-Id: Ib37d8db4e935ef8f69f3d43b5065c22d34028cf3
2018-03-09 12:56:01 -08:00
Nan Zhang
ccdecc7e02 Fix droiddoc variable name in clear_vars.mk
Test: m -j
Bug: b/70351683
Change-Id: I8cb4429a7e6bebde541a09f0328dddb937c0aced
2018-03-09 12:39:34 -08:00