Commit Graph

1665 Commits

Author SHA1 Message Date
David Brazdil
c6c75a6564 Merge "Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing" am: 6a038d662b am: 3613f69675
am: 0dff3fc393

Change-Id: I2b7384c56dff8b0ab661f5f4c81b36faddb7d6ab
2018-10-22 06:00:18 -07:00
Mathew Inwood
bcde1c52a6 Put maxTargetSdk=P APIs onto light greylist.
Since the per-SDK level enforcement support is not ready in ART yet, we
can't implement the correct enforcement for maxTargetSdk=P. Putting these
APIs on the dark greylist causes problems for existing apps, so put them
on the light greylist instead.

Test: m
Bug: 117899984
Change-Id: Ib3dad2f50eb6a769ba9f21cec4bac01275888ef6
2018-10-22 13:44:15 +01:00
David Brazdil
6a038d662b Merge "Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing" 2018-10-22 12:43:39 +00:00
Dan Willemsen
9dda44fc51 Merge changes from topic "refactor_dist" am: ac270964f1 am: 92d1847f56
am: a94e9a6e38

Change-Id: I8cc3adf3249ffa3010249c7240dc4ccb76376de3
2018-10-20 16:04:44 -07:00
Dan Willemsen
7ddc50a066 Refactor common makefile fragments
In preparation for setting up another Kati stage, move some common
settings and tools into a common folder. This way it's a bit easier to
see that they're safe to use, and that they shouldn't depend on anything
outside of the common folder.

Bug: 117463001
Test: build-aosp_arm.ninja is the same before and after
Change-Id: Ief4b75a4dbe45b73ffd03bf32c60695c816d979d
2018-10-20 14:43:58 -07:00
David Brazdil
8a6b9a7baf Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing
Setting environment variable UNSAFE_DISABLE_HIDDENAPI_FLAGS=true
will skip the build step which annotates dex files with information
about public and non-public API membership. This is meant to speed
up incremental local builds.

USE AT OWN RISK: Dex files built with this flag will execute with
hidden API access checks disabled and therefore may exhibit different
behaviour compared to production code.

WARNING: Some JARs cannot be compiled with this flag as ART hardcodes
hidden API access flags of intrinsified methods. Attempting to compile
dex files containing such methods will trigger an assertion.

Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true mmm frameworks/base
Bug: 113278235
Bug: 112388925
Change-Id: I51fe99ab53e1bb2aa0db64b22a321dd1e1ed47e1
2018-10-19 20:16:49 +01:00
Mathew Inwood
31175015c5 Merge "Write greylist annotation metadata to a csv file." am: c948d1a101 am: 964070be62
am: 592d644e83

Change-Id: I9d7dc5e8b0d723c4ee81abc17b7aabaca1bdee5e
2018-10-18 08:25:07 -07:00
Mathew Inwood
8c96298a92 Write greylist annotation metadata to a csv file.
Also add support for merging these into a single file elsewhere in the
build.

Test: m, inspect generated greylist.csv
Bug: 117314178
Change-Id: If28110fc1ed090222e55c274e8363110753d10f1
2018-10-16 12:06:02 +01:00
Colin Cross
ed2120d57e Merge "Remove extra JNI libs from prebuilt APKs" am: 0443b46066 am: 4e04fff35e
am: 1ac0bbefc1

Change-Id: I9d645b071472af437b5f037091789d427c060422
2018-10-10 20:01:25 -07:00
Treehugger Robot
0443b46066 Merge "Remove extra JNI libs from prebuilt APKs" 2018-10-09 22:35:26 +00:00
Colin Cross
0e8a2ee172 Remove extra JNI libs from prebuilt APKs
If an APK specifies LOCAL_PREBUILT_JNI_LIBS embedded in the prebuilt
APK, remove any that aren't listed.  Restores the behavior from before
I82dd3aa441712772a1d1ddd6aaf5f41179facaa7.

Bug: 69500920
Test: m checkbuild
Change-Id: I971a9c4206604c172d77144df4c0ed9a8b1c5dd0
2018-10-09 13:06:01 -07:00
nelsonli
7e618d9423 Merge "Build System: Ignore copies in copy-many-files if src == dst" am: 5112afe657 am: f52da96e11
am: 3cd2b2f563

Change-Id: I5b8148f7fd3f4a0899ab01e3a525c11008c91452
2018-10-09 03:47:21 -07:00
nelsonli
c91284dcd8 Build System: Ignore copies in copy-many-files if src == dst
BUG: 117224272

Test: 1. Modify build/core/base_rules.mk
         Add the following line after line 617
	  $(eval my_compat_dist_$(suite) += out/a:out/a))
      2. touch out/a
      3. make -j BluetoothInstrumentationTests
      4. It should build pass without any dependency errors.

Change-Id: I40372eab5b74e042f605c3cb38e72942531ed69a
2018-10-09 14:46:40 +08:00
Colin Cross
d42f15d724 Merge "Use zip2zip for uncompress-dexs and uncompress-shared-libs" am: 0ab356ac20 am: ce594b4549
am: d3371bd1ab

Change-Id: I22fd914d31494fce8036ed28507621da1e9e83de
2018-10-08 17:51:54 -07:00
Colin Cross
2a51a25495 Merge "Don't zip hiddenapi output jar into jar" am: f05a023a5a am: 808af69564
am: bcf2fa33d3

Change-Id: I7ced2ae5b772bec65cc18645b6cb75088650d9ba
2018-10-08 15:49:07 -07:00
Colin Cross
dac94fff8f Use zip2zip for uncompress-dexs and uncompress-shared-libs
Unzipping and rezipping files causes the umask of the host machine
to affect the permissions in the APK.  Use the new zip2zip -0 feature
to rewrite the zip file with selected files uncompressed.

Bug: 69500920
Test: m checkbuild
Change-Id: I82dd3aa441712772a1d1ddd6aaf5f41179facaa7
2018-10-08 12:49:11 -07:00
Colin Cross
c3c62fba96 Don't zip hiddenapi output jar into jar
Zip classes*.dex so that the jar does not contain an empty
classes.jar.

Test: m out/target/common/obj/JAVA_LIBRARIES/android.test.base.impl_intermediates/javalib.jar
Change-Id: I53bdd2035b2963dd781734da64058c95e1cff9d4
2018-10-08 11:23:59 -07:00
Anton Hansson
1d97d35f90 Merge "Move a few more string functions to strings.mk" am: d6e5cb1add am: 21e7c05f7e
am: c0bbfed0dd

Change-Id: I7f17e606ca4d179b43e9b5dbdd41f8443b71e5ae
2018-10-04 07:17:15 -07:00
Anton Hansson
d6e5cb1add Merge "Move a few more string functions to strings.mk" 2018-10-04 13:47:55 +00:00
Anton Hansson
8478f12427 Merge "Fix TWS requirement in definitions.mk" am: ee08d635c7 am: 9920578c25
am: f07cec3b69

Change-Id: I26cd047f958930c8311e79f716e61435158a8828
2018-10-03 09:10:34 -07:00
Anton Hansson
4967b34ddd Move a few more string functions to strings.mk
So they can be used in product.mk

Bug: 80410283
Test: make
Change-Id: Ic94754f6b48a3281ca1dd8c195a3410b543eb366
2018-10-03 15:59:39 +01:00
Anton Hansson
a0f91bd506 Fix TWS requirement in definitions.mk
Removing this TWS breaks the build. Add a backslash to avoid
needing it.

Test: make
Change-Id: I4f8e127218ffbf55a3e11600569f0100e914d2e2
2018-10-03 13:38:00 +01:00
Colin Cross
2ae0d2518d Merge "Pass classpath to d8" am: 1ac080e9e5 am: 5fa79d2afd
am: 807dd63e65

Change-Id: I568884edfca04ab5989b1bfe0cca226f9c6c4bbb
2018-09-27 16:47:54 -07:00
Treehugger Robot
1ac080e9e5 Merge "Pass classpath to d8" 2018-09-27 23:27:45 +00:00
Yifan Hong
29dcc01a54 Merge "to-upper and to-lower move to strings.mk" am: 1f5c41bacf am: b9f8a6fa45
am: 0576f6ed91

Change-Id: I832bcda3ea704d44c52abdb3f1224150a74313a4
2018-09-25 11:05:30 -07:00
Yifan Hong
c49bddfb67 to-upper and to-lower move to strings.mk
So that config.mk can use these functions.
Test: builds

Change-Id: I6634226cbed56c34977803ff9c75b8d481c21c34
2018-09-24 14:45:41 -07:00
Colin Cross
ec17af3364 Pass classpath to d8
d8 requires the full classpath if --min-api requires default method
or try-with-resources desugaring.  Always pass the full classpath,
since it will already have been built to generate the input jar.

Bug: 116243313
Test: m checkbuild
Change-Id: I363b4d3145e23d4eed77455c1897430206f3ac22
2018-09-21 12:36:53 -07:00
Dario Freni
ab2ead7504 Merge "Pass the intermediate dir to appcompat.sh" am: abda944667 am: ea0c204d4f
am: 1eaeb2093a

Change-Id: I83468f462a2927507c8264307e1d1ec8fceedb3e
2018-09-19 17:42:01 -07:00
Colin Cross
adbd94b1ea Merge "Don't set -pie for windows modules" am: a70669e4a5 am: f31d9e78bb
am: 637d2329d1

Change-Id: I7b0f2c0f25c8eef27c24a6972f1de65ed59bd88d
2018-09-19 17:40:44 -07:00
Treehugger Robot
abda944667 Merge "Pass the intermediate dir to appcompat.sh" 2018-09-20 00:00:54 +00:00
Colin Cross
a70669e4a5 Merge "Don't set -pie for windows modules" 2018-09-20 00:00:42 +00:00
Dario Freni
75266ab671 Pass the intermediate dir to appcompat.sh
For ASAN build the intermediate dir might differ from the default
directory.

Test: m (on an affected ASAN build)
Bug: 116020783
Change-Id: Ie4f282ea651d710351799f3fc24dba42e79ee63d
2018-09-19 23:18:38 +01:00
Colin Cross
feb4a7e4ae Don't set -pie for windows modules
Adding -pie to LOCAL_LDFLAGS for host linking leaves it around
when doing the host cross Windows linking, resulting in a warning:
clang-7: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]

Add it later in binary.mk after the flags have been copied to the
single-use my_ldflags.

Bug: 115776263
Test: m checkbuild
Change-Id: I70d71fa1ec6445631dc7e89ef61927a3304375e2
2018-09-19 15:18:17 -07:00
Dan Willemsen
4797cf2ede Merge "Remove *_OUT_INTERMEDIATE_LIBRARIES" am: c4af7d75dc am: a127ddfe6b
am: d734e9c32a

Change-Id: Ic85e410e3b510604f3ecb448647d097a9da32798
2018-09-19 10:46:22 -07:00
Dan Willemsen
c4af7d75dc Merge "Remove *_OUT_INTERMEDIATE_LIBRARIES" 2018-09-19 17:19:37 +00:00
Dan Willemsen
5ba4114e2f Merge "Fix installclean incremental builds w/veridex" am: c55b42358d am: 962f88574b
am: 6a1f125c6e

Change-Id: I71c1be25df144088e78b31e0e20e440787ae8cd5
2018-09-18 02:48:44 -07:00
Treehugger Robot
c55b42358d Merge "Fix installclean incremental builds w/veridex" 2018-09-18 09:16:14 +00:00
Søren Gjesse
56094acb4a Merge "Don't include data resources when running R8" am: 75e1c77f1b am: cfc4e3ec90
am: a60ee3f917

Change-Id: I0443f2ba5b327243f3bb491ff4211f4d12ea00c8
2018-09-17 23:47:28 -07:00
Søren Gjesse
75e1c77f1b Merge "Don't include data resources when running R8" 2018-09-18 06:22:21 +00:00
Dan Willemsen
b73ccb7a25 Fix installclean incremental builds w/veridex
$(HOST_OUT)/obj/PACKAGING is cleaned via `installclean`, so regular
built modules should not be depending on it. Explicitly call out the
dependencies instead.

Test: m; m installclean; m
Change-Id: I0f318257e4742d6b7bd099dc06958ca8aba0cfb8
2018-09-17 16:01:14 -07:00
Colin Cross
f18eeb7340 Merge changes from topic "make_umask" am: d828c07b56 am: fbdc2fe2d1
am: bafd10b2e0

Change-Id: Ibcc2b95d97870f7b100688a46abd051a740d3046
2018-09-17 14:39:15 -07:00
Colin Cross
91b1146ac1 Make package functions take an argument am: 7b226865c1 am: 62f450722c
am: f31ab94fef

Change-Id: I69d8c84b2de066e07332c81716774e36586eb34f
2018-09-17 14:37:35 -07:00
Dan Willemsen
8cf6b65445 Remove *_OUT_INTERMEDIATE_LIBRARIES
Always use the exact libraries like Soong does instead.

Test: m
Change-Id: Ifd48020073dd045247f76f84627c497e94562286
2018-09-15 10:52:13 -07:00
Roland Levillain
47016b1fbf Merge "Revert "Make package functions take an argument"" am: d55eb7643d am: f16ce8df3c
am: b20027a82b

Change-Id: I1bb791ac5457ec06b181403b788d45e4fa843cd7
2018-09-15 09:23:51 -07:00
Colin Cross
c9e4976832 Replace some uses of zip with merge_zips, soong_zip, and zip2zip
zip maintains permissions when adding files to zips, which causes
the final jars and apks to change based on the umask of the build.
Move some of the rules that were using zip to soong_zip instead.

Since soong_zip doesn't support adding files to existing zips,
create a new zip file for each part of the package creation
process and then merge them together at the end with merge_zips.

Bug: 69500920
Test: m checkbuild
Change-Id: Id253df776ce19ec4cac3a36fa470a50461ea3cad
2018-09-15 09:16:26 -07:00
Colin Cross
7b226865c1 Make package functions take an argument
In preparation for rearranging the way jars and apks are built.

Relands Ib9f0da132196942062c58fd5b12e84588106724e with a fix to
correctly include classes.dex in hostdex jars.

Test: m checkbuild
Change-Id: I397544456b8ce5827716fcd1828de707b719c2bb
2018-09-15 09:10:37 -07:00
Treehugger Robot
d55eb7643d Merge "Revert "Make package functions take an argument"" 2018-09-15 16:05:39 +00:00
Roland Levillain
70bd104353 Revert "Make package functions take an argument"
This reverts commit 5ea65dcc5e.

Reason for revert: Breaks some ART gtests on host.

Change-Id: I314692e31628a14d824e28544fdb3c765fc100f6
2018-09-15 12:46:44 +00:00
Colin Cross
75ec8c9f6e Merge "Make package functions take an argument" am: dcfdb91c07 am: 99bd49a9fa
am: 96597963fa

Change-Id: I4ef712bdcda1eb488f0c44c80678881e85a834af
2018-09-14 20:32:50 -07:00
Colin Cross
dcfdb91c07 Merge "Make package functions take an argument" 2018-09-15 03:16:56 +00:00