Commit graph

40638 commits

Author SHA1 Message Date
Tianjie Xu
5d60cd2d3e Merge "Add multithread support to call imgdiff with block-limit" 2017-11-14 18:54:08 +00:00
Jiyong Park
55e17a753e Keep PRODUCT_FULL_TREBLE to true even when some requirements are not met
When some of the full treble requirements are turned off,
PROUCT_FULL_TREBLE became false, which in turn cleared macro variables
guarded in treble: {cflags: "..."}.

Until when Soong recognizes each of the requirements (e.g.
treble_sepolicy: { }), don't reset PRODUCT_FULL_TREBLE to false
even when some of the requirements are not met.

Bug: 62019611
Bug: 68710251
Test: get_build_var PRODUCT_FULL_TREBLE returns true for aosp_walleye
Test: aosp_walleye boots to the UI
Change-Id: Iad3ee4f4462c82e9f9e1897f3ec019cdd16da358
2017-11-14 19:14:44 +09:00
Jaekyun Seok
cc29444e0a Merge "Move system default values in system partition"
am: 7c61a4eaef

Change-Id: I42cf2aecb3d2d1be25f58d91925fcfe3ee7e4558
2017-11-14 06:00:21 +00:00
Treehugger Robot
7c61a4eaef Merge "Move system default values in system partition" 2017-11-14 05:57:14 +00:00
Jaekyun Seok
4022ec99a6 Move system default values in system partition
The following properties are specified under platform/build as system
default values.

- tombstoned.max_tombstone_count
- debug.atrace.tags.enableflags
- dalvik.vm.dex2oat-minidebuginfo

So they should move into system partition.

Bug: 64661857
Test: confirmed that the default properties were stored in
/system/etc/prop.default on sailfish device
Change-Id: Ic34c05fd9761e281962b6bb425e4babedfca45a9
2017-11-14 05:43:35 +00:00
Tianjie Xu
2536607d90 Add multithread support to call imgdiff with block-limit
With the new implementation of handling large apks, we need to call
imgdiff with block-limit to split the apk and generate the patch at
the same time. The call to imgdiff would significantly increase the
time consumption of the "FindTransfers" function which we used to
execute sequentially. This cl addresses this issue and speeds up the
process by making the imgdiff call parallel.

Bug: 34220646
Test: Create and sideload an incremental package for angler
Change-Id: Id62e348418fc1d22e32ea6c8ac16d9ab3ec92d7b
2017-11-13 14:58:05 -08:00
Alex Deymo
ea26c8104e Merge "Update binary name to "brotli"."
am: cbb4ec6cf0

Change-Id: Idd96e18f08b67568e84d75bcd460a6bad0a1c42f
2017-11-13 22:51:23 +00:00
Alex Deymo
cbb4ec6cf0 Merge "Update binary name to "brotli"." 2017-11-13 22:43:22 +00:00
Steven Moreland
73bacf3f2b Merge changes from topic "full-treble-split"
am: 1f70f332fe

Change-Id: I3351fed398e5f7b8be190330e46944f9e7e05f47
2017-11-13 21:11:01 +00:00
Steven Moreland
cb71efa50a Use PRODUCT_ENFORCE_VINTF_MANIFEST.
am: 9588438023

Change-Id: I7202cd5f9b858f7f90cca60d2c5c2ea7d79499c8
2017-11-13 21:10:13 +00:00
Treehugger Robot
1f70f332fe Merge changes from topic "full-treble-split"
* changes:
  Break up PRODUCT_FULL_TREBLE into variables.
  Use PRODUCT_ENFORCE_VINTF_MANIFEST.
2017-11-13 21:06:34 +00:00
Steven Moreland
33fdd8c4ef Break up PRODUCT_FULL_TREBLE into variables.
PRODUCT_SEPOLICY_SPLIT
PRODUCT_TREBLE_LINKER_NAMESPACES
PRODUCT_ENFORCE_VINTF_MANIFEST

Being able to selectively toggle these does several things:
- it's better software engineering (no longer conflating vars)
- easier bringup for devices.
- devices which don't require full Treble can opt out of only
  parts of it and still get the benefits of others.

Bug: 62019611
Test: manual

Merged-In: I728e32869baf043ae9a54e83e513fb99e560c827
Change-Id: I728e32869baf043ae9a54e83e513fb99e560c827
2017-11-13 10:32:52 -08:00
Steven Moreland
9588438023 Use PRODUCT_ENFORCE_VINTF_MANIFEST.
PRODUCT_FULL_TREBLE is being split up into smaller,
more manageable flags.

Bug: 62019611
Test: manual
Change-Id: I046f9eb4099cf441842f3d0e6908d99df063c27e
2017-11-13 09:32:24 -08:00
Alex Deymo
b10e07aea7 Update binary name to "brotli".
With the update of brotli to version 1.0.1 the new binary tool is now
called "brotli". This patch updates the scripts to use the new name.

Bug: 34220646
Test: `make dist`; ota_from_target_files on non-A/B device.
Change-Id: Ie8da4333388d029d5960a723a55efd875d8ee820
2017-11-13 18:11:45 +01:00
Tao Bao
4fa1453f31 Merge "releasetools: Reduce the memory use in test_common.py."
am: 44cb0db6a7

Change-Id: I6195ddee03d5bd3efcf4ffc00b46ffa490a83eb3
2017-11-11 01:40:07 +00:00
Tao Bao
44cb0db6a7 Merge "releasetools: Reduce the memory use in test_common.py." 2017-11-11 01:32:31 +00:00
Dan Willemsen
5a7339b36c Merge "Enable missing dependency checks"
am: 207b009c86

Change-Id: If2cfad594a6c44057fe1eb1b2ae44510ed100ba4
2017-11-11 00:39:32 +00:00
Dan Willemsen
207b009c86 Merge "Enable missing dependency checks" 2017-11-11 00:35:00 +00:00
Michael Schwartz
5c638f1edf Merge "Archive checkvintf in otatools"
am: 20401e3d84

Change-Id: Id0ef525cfc5ebccf34b3d2e74e515c69edaed3f7
2017-11-10 22:19:10 +00:00
Michael Schwartz
20401e3d84 Merge "Archive checkvintf in otatools" 2017-11-10 22:12:28 +00:00
Dan Willemsen
46383ef613 Merge "Turn unusual tags into errors"
am: 57d78295ef

Change-Id: Ib676947207aa1c6b6494f0d924ebd40d94c82a64
2017-11-10 21:53:23 +00:00
Treehugger Robot
57d78295ef Merge "Turn unusual tags into errors" 2017-11-10 21:47:09 +00:00
Ryan Campbell
0118fa50f5 Merge "Support gcno packaging for executables."
am: 279f91510a

Change-Id: I2af53b3bcdabf6c6376b1552957e35e33a114789
2017-11-10 21:23:28 +00:00
Treehugger Robot
279f91510a Merge "Support gcno packaging for executables." 2017-11-10 21:05:42 +00:00
Colin Cross
4666a08608 Merge "Convert signapk to Android.bp"
am: 3563ac582a

Change-Id: I064a04f5bceb2bed124c1709cc5a668ff9945fff
2017-11-10 19:24:09 +00:00
Colin Cross
3563ac582a Merge "Convert signapk to Android.bp" 2017-11-10 19:17:26 +00:00
Michael Schwartz
6473e75479 Archive checkvintf in otatools
checkvintf will be used to verify compatibility of OTA packages.

Bug: 68327258
Test: `m -j dist` and inspect archive for checkvintf
Change-Id: I1d4cfcff537a03adee28d1e6ba9403a2e1635fe0
2017-11-10 09:38:28 -08:00
Dan Willemsen
bd8f84fca1 Turn unusual tags into errors
Test: build/soong/build_test.bash
Change-Id: If68bea3929763747137f8acc4a045933f40f5e17
Merged-In: If68bea3929763747137f8acc4a045933f40f5e17
(cherry picked from commit c35641913d)
2017-11-09 17:13:39 -08:00
Dan Willemsen
e43d8ee8ff Enable missing dependency checks
With this enabled, we'll check the entire build graph for missing
dependencies -- even if you don't need to build the module. So it'll
present more errors, but surface them earlier.

These can be turned off manually with an environment variable if the
branch is expected to have missing dependencies:

  ALLOW_MISSING_DEPENDENCIES=true
  SOONG_ALLOW_MISSING_DEPENDENCIES=true   (previous method)

That will be set automatically when using 'mm', which doesn't load the
entire build graph. It will also be set when using 'tapas' to build
unbundled apps, since those are usually on reduced branches.

This provides better error messages when a library is missing:

system/core/init/Android.mk: error: init_tests (NATIVE_TESTS android-arm64) missing libinit (SHARED_LIBRARIES android-arm64)
Available variants:
  libinit (STATIC_LIBRARIES android-arm64)
  libinit (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
system/core/init/Android.mk: error: init_tests (NATIVE_TESTS android-arm) missing libinit (SHARED_LIBRARIES android-arm)
Available variants:
  libinit (STATIC_LIBRARIES android-arm64)
  libinit (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/core/main.mk:852: error: exiting from previous errors.

instead of:

ninja: error: 'out/target/product/generic_arm64/obj/SHARED_LIBRARIES/libinit_intermediates/export_includes', needed by 'out/target/product/generic_arm64/obj/NATIVE_TESTS/init_tests_intermediates/import_includes', missing and no known rule to make it

Test: Manually introduce errors, check for expected output
Test: multiproduct_kati on AOSP and internal master, no new breakages
Change-Id: I5847f813045929813214137403c499b44ef67907
Merged-In: I5847f813045929813214137403c499b44ef67907
2017-11-10 01:13:07 +00:00
Tao Bao
b55251898d Merge "releasetools: Write back default_system_dev_certificate."
am: ff87a9f9d9

Change-Id: I6fad2f4997eefbfc80d35ffb44775473f894a0d2
2017-11-09 23:56:00 +00:00
Tao Bao
ff87a9f9d9 Merge "releasetools: Write back default_system_dev_certificate." 2017-11-09 23:46:53 +00:00
Colin Cross
ad44dd4f3c Convert signapk to Android.bp
See build/soong/README.md for more information

Test: m checkbuild
Change-Id: I89a7fa7647e7081ca49720fae3be23ce84ab38e5
2017-11-09 15:11:34 -08:00
ShuJie Wang
95f4a845d4 Merge "build: clean up proguard_flag_files"
am: 7cd5386b51

Change-Id: I7bc2cf26372745ce2b18b7525a340ab5557c92bd
2017-11-09 19:00:12 +00:00
Treehugger Robot
7cd5386b51 Merge "build: clean up proguard_flag_files" 2017-11-09 18:44:20 +00:00
Tao Bao
f718f90212 releasetools: Write back default_system_dev_certificate.
When signing a target_files.zip, the OTA certificate specified by
default_system_dev_certificate could be replaced with a mapped key. When
that happens, we must explicitly specify --package_key when generating
OTA packages with ota_from_target_files.py. Otherwise the OTA package
will be signed with the wrong key, which leads to verification failures.

This CL updates the default_system_dev_certificate value in
misc_info.txt accordingly.

Test: Sign a target_files.zip and replace the OTA key. Check
      META/misc_info.txt in the generated target_files.zip.
  $ ./build/make/tools/releasetools/sign_target_files_apks.py -v \
      --replace_ota_keys \
      -k build/target/product/security/testkey=build/target/product/security/platform \
      out/dist/aosp_marlin-target_files-eng.tbao.zip \
      signed-marlin-target_files-test.zip

Change-Id: I093234b5add3e27c5b3887cefeffd74e6f0a3e98
2017-11-09 10:23:50 -08:00
ShuJie Wang
76e93ba6cf build: clean up proguard_flag_files
we should clean up proguard_flag_files if LOCAL_PROGUARD_ENABLED
not defined in current module in case legacy proguard_flag_files
slips into current jack_all_deps dependencies.

Test: make -j8

Change-Id: I45618fc8e821ab7a8b964fa621824209e1e9894c
Signed-off-by: ShuJie Wang <wangshujie@xiaomi.com>
2017-11-09 15:26:28 +08:00
Vishwath Mohan
aef48af62a Merge "CFI include/exclude path support (Make)"
am: 61bc4f790e

Change-Id: I8316a559068d018179f7b1d1ba9dcace0a7e2866
2017-11-09 03:06:03 +00:00
Vishwath Mohan
61bc4f790e Merge "CFI include/exclude path support (Make)" 2017-11-09 02:57:16 +00:00
Tao Bao
31b0807310 releasetools: Reduce the memory use in test_common.py.
test_common constructs a few 2GiB strings in memory, which leads to huge
memory footprint (18GiB). This CL moves away from in-memory strings to
generators, which reduces the memory use down to 41MiB. It also reduces
the time cost from 294s to 139s as an extra benefit for free.

The CL addresses some trivial pylint warnings as well.

* Before

$ /usr/bin/time -v python -m unittest -v test_common
...
----------------------------------------------------------------------
Ran 11 tests in 294.986s

OK
	Command being timed: "python -m unittest -v test_common"
	User time (seconds): 110.51
	System time (seconds): 109.34
	Percent of CPU this job got: 74%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 4:55.06
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 18894172
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 1
	Minor (reclaiming a frame) page faults: 20774908
	Voluntary context switches: 48
	Involuntary context switches: 3241
	Swaps: 0
	File system inputs: 184
	File system outputs: 8406424
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

* After

$ /usr/bin/time -v python -m unittest -v test_common
...
----------------------------------------------------------------------
Ran 11 tests in 139.100s

OK
	Command being timed: "python -m unittest -v test_common"
	User time (seconds): 59.00
	System time (seconds): 4.73
	Percent of CPU this job got: 45%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 2:19.17
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 41252
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 106569
	Voluntary context switches: 44
	Involuntary context switches: 103
	Swaps: 0
	File system inputs: 8
	File system outputs: 8422808
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

Fixes: 68988396
Test: See above.
Change-Id: I00f16603a4ee59fb085b189c6f5b5ee9d2378690
2017-11-08 17:10:33 -08:00
Dan Willemsen
f68edeafdc Merge changes from topic "soong_ui_java"
am: a3d94873cf

Change-Id: Ic105acbad02e4eda504b6fedcb2a6eac6788ba8e
2017-11-08 20:40:14 +00:00
Dan Willemsen
a3d94873cf Merge changes from topic "soong_ui_java"
* changes:
  Remove Java PATH check, deprecate using PATH in Kati
  Remove JAVA_NOT_REQUIRED
2017-11-08 20:31:31 +00:00
Vishwath Mohan
23b2d2e531 CFI include/exclude path support (Make)
This CL adds the ability to centrally enable or disable CFI for
components using either an environment or product config
variable. This is a better, nore manageable option that enabling CFI
across each component individually.

Bug: 67507323
Test: CFI_INCLUDE_PATHS= system/nfc m -j40
Test: CFI_EXCLUDE_PATHS = frameworks/av m -j40

Change-Id: I02fe1960a822c124fd101ab5419aa81e2dd51adf
2017-11-08 03:46:31 -08:00
Dan Willemsen
2ec3e4a257 Remove Java PATH check, deprecate using PATH in Kati
The Java PATH fixup is now handled within soong_ui, along with the
values of ANDROID_JAVA_HOME based on OVERRIDE_ANDROID_JAVA_HOME /
EXPERIMENTAL_USE_OPENJDK9.

Mark PATH as deprecated, so that any reads/writes will cause warnings.
This will be switched to obsolete once it's verified that there are no
more users.

Using PATH within Kati means that we've got to rebuild the ninja files
whenever your PATH changes, which is not ideal, especially since some of
the envsetup functions can change your PATH. In most cases you only need
to use PATH within the bash portions of the build rules ($${PATH}), which
isn't treated as a make variable, so won't produce an error.

I'm also planning on replacing PATH in a future change with our own
directory that has placeholders for everything in your PATH. This will
let us remove tools that shouldn't be used from the build.

Test: m nothing
Test: build/soong/build_test.bash on AOSP and internal master
Change-Id: I18d8d19cfba313ff9176345bf73ac34e8dbebfbb
2017-11-08 00:24:35 -08:00
Søren Gjesse
58c6122f44 Merge "Use prebuild R8 for USE_R8=true"
am: 8639879e60

Change-Id: I0dc51624869f8f417e81872da397f138b7f48881
2017-11-08 07:54:49 +00:00
Søren Gjesse
8639879e60 Merge "Use prebuild R8 for USE_R8=true" 2017-11-08 07:50:00 +00:00
Dan Willemsen
617dce0c29 Merge "Add PRODUCT_ADB_KEYS"
am: f599f4010e

Change-Id: I182bd8d15887f3561db73015a8a45caf9e5ad869
2017-11-08 03:23:29 +00:00
Treehugger Robot
f599f4010e Merge "Add PRODUCT_ADB_KEYS" 2017-11-08 03:12:17 +00:00
Jaekyun Seok
bc94fb4340 Merge changes from topic "system_default_prop"
am: 4cb631f624

Change-Id: Idf0c10bdcb44e021f1f56b11e8abd7168d0c5499
2017-11-08 01:52:02 +00:00
Dan Willemsen
90879f50ea Remove JAVA_NOT_REQUIRED
This is no longer required.

Test: cs/JAVA_NOT_REQUIRED
Change-Id: I9f64e153c9f4af7df1c8dee4eaea3c7458be61c0
2017-11-07 17:43:36 -08:00
Treehugger Robot
4cb631f624 Merge changes from topic "system_default_prop"
* changes:
  Move ART default properties into system partition
  Add PRODUCT_SYSTEM_DEFAULT_PROPERTIES
2017-11-08 01:42:40 +00:00