Commit Graph

39661 Commits

Author SHA1 Message Date
Yao Chen 8ce8dc2efa Set the default ring buffer size for stats log, and set it loggable.
Bug: 69323063
Test: manual
Change-Id: I19de884927bc4999d503b919d851048609be1470
2017-11-21 09:02:12 -08:00
Treehugger Robot dcbc2e9a26 Merge "Ensure partition_tag is always set correctly" 2017-11-21 04:09:21 +00:00
Colin Cross 80ec993a58 Merge "Convert signtos to Android.bp" 2017-11-21 03:26:42 +00:00
Colin Cross 3c363ad729 Convert signtos to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: Ia468cde0492e64858b7a603deba9b22b95e56ff4
2017-11-21 03:26:31 +00:00
Bowgo Tsai aac41d585c Merge "Revert "Reorder assert-max-image-size and AVB signing"" 2017-11-21 03:02:19 +00:00
Bowgo Tsai 47e0b62d6e Revert "Reorder assert-max-image-size and AVB signing"
This reverts commit b855c0c304.

Change-Id: Ia82071bf42fcc6d15dabdf15f4eb5d1749c8cdb8
2017-11-21 02:39:51 +00:00
Treehugger Robot eea732dbcf Merge "Reorder assert-max-image-size and AVB signing" 2017-11-21 01:23:28 +00:00
Treehugger Robot c1d7537d99 Merge "Switch gcnodir name from basename to just removing .so" 2017-11-20 23:04:38 +00:00
Treehugger Robot db7dfacb96 Merge "releasetools: Always create IMAGES/ directory." 2017-11-20 22:39:37 +00:00
Dan Willemsen ba9badf8ec Switch gcnodir name from basename to just removing .so
$(basename) was catching all of the hidl services that have versions
like "1.0" in their name, marking the .0-service portion as a suffix to
be removed.

Instead just remove ".so" and assume that everything else isn't actually
a suffix.

Bug: 69271974
Test: NATIVE_COVERAGE=true COVERAGE_PATHS=hardware/interfaces m; compare
      ninja files
Change-Id: I76e27d9ab1f9d4862cc2607c5f2ed9c121879421
2017-11-20 13:03:25 -08:00
Tao Bao bf70c318b7 releasetools: Allow building AVB-enabled recovery.img.
Bug: 68224784
Test: Enable AVB on aosp_bullhead-userdebug. `m dist`. Note that the
      prebuilt vendor.img needs to be AVB-signed first.
Test: `m dist` with aosp_walleye-userdebug.
Change-Id: I18235e4d0dde6af71a96e46ec434480cc9a22bef
2017-11-20 12:44:18 -08:00
Tao Bao ae396d9b0c releasetools: Always create IMAGES/ directory.
AddImagesToTargetFiles() takes either a zip file, or a zip root as
input. We used to create IMAGES/ directory only when working with zip
root input. Commit 262bf3f0b5 has changed
to also stage boot / recovery images there when working with a zip file.
This CL makes sure the directory is always available under both modes.

Bug: 63456822
Test: zip -d target_files.zip IMAGES/\*;
      add_img_to_target_files.py target_files.zip
Test: sign_target_files_apks.py target_files.zip signed-target_files.zip
Change-Id: Iea91d0403cdec1b16bb93bb71d3ed06856b8f7c3
2017-11-20 12:44:18 -08:00
Treehugger Robot cbf6fd55bf Merge "Make more Treble make variables read only." 2017-11-20 19:09:21 +00:00
Jiyong Park 003ea369dd Ensure partition_tag is always set correctly
partition_tag is now set to either VENDOR_, OEM_, or ODM_
even when LOCAL_[VENDOR|OEM|ODM]_MODULE isn't set but LOCAL_MODULE_PATH
is explicitly set to under $(TARGET_OUT_[VENDOR|OEM|ODM]).

Test: build walleye

Change-Id: I0f902061889fe0af1c39f6222e54faa80dd15794
2017-11-20 11:01:50 +09:00
Dan Willemsen d6f229842a Merge "Switch aidl and zipalign prebuilts to build-tools" 2017-11-18 04:50:33 +00:00
Jae Shin ca3ac0b8fc Merge "Generate VNDK snapshot zip as a build artifact" 2017-11-18 03:12:59 +00:00
Jae Shin e6b7c84ef7 Generate VNDK snapshot zip as a build artifact
Define a new phony target 'vndk' such that 'make vndk dist'
outputs VNDK snapshot zip file to DIST_DIR.

Bug: 66059995
Test: m -j vndk dist TARGET_PRODUCT=aosp_{arch}_{a, ab}
BOARD_VNDK_VERSION=current
Change-Id: I6fd763a91205b21fba414d1f3068408a6826fad8
2017-11-18 03:11:55 +00:00
Dan Willemsen 6353304dc9 Switch aidl and zipalign prebuilts to build-tools
So that they can be updated more regularly than prebuilts/sdk/tools.

Bug: 69431993
Test: tapas ExactCalculator; m
Change-Id: Id07ab43f9d9e0c794cc15f21b75ae88c3547d8bd
2017-11-17 18:40:45 -08:00
Dan Willemsen da5fbe3c38 Merge "Add LOCAL_AAPT2_ONLY" 2017-11-18 02:17:48 +00:00
Colin Cross 1c0112f556 Merge "Remove FORCE from gpl_source.tgz" 2017-11-18 00:38:41 +00:00
Tao Bao 2f7fab9ab9 Merge "releasetools: Fix the rebuilding of vbmeta.img." 2017-11-18 00:22:14 +00:00
Dan Willemsen bb6393c5a4 Add LOCAL_AAPT2_ONLY
This allows modules to specify that they may only be used from modules
using aapt2. Using aapt2 removes absolute path references to modules, so
this can be useful if a module is preparing to move its sources, or
replace itself with a prebuilt aar.

Test: m
Test: Label frameworks/support/design; m
Test: Label frameworks/support/v4; m
Test: build/soong/build_test.bash
Change-Id: Icfb3d4b19a6a0e3a3bb00091d2a97a4d88c0c761
2017-11-17 15:54:15 -08:00
Chih-Hung Hsieh 1876acdd53 Add default -Wall -Werror or -Wall.
* Skip Android.bp, prebuilt, and HEADER_LIBRARIES targets.
* If neither -Wno-error nor -Werror is used, add default -Wall -Werror.
  However, if the build target is in a project
  under one of ANDROID_WARNING_ALLOWED_PROJECTS, add only -Wall.
* Dump name of modules using -Wno-error or added -Wall -Werror
  into file $(PRODUCT_OUT)/wall_werror.txt.

Bug: 66996870
Test: normal build
Change-Id: Ief8cf776e8613ed073a64dd271534688845d5c2c
2017-11-17 14:06:35 -08:00
Colin Cross 24e034a0bd Remove FORCE from gpl_source.tgz
Package gpl_source.tgz directly into the dist directory (which is
always removed between build server builds) so that FORCE is not
needed.  This prevents the build system from seeing a dirty rule
at the end of a make checkbuild dist.

Bug: 68062417
Test: m checkbuild dist
Change-Id: I4a9d9deb1611cc9ba266e8c1ac086a7ef48061c4
2017-11-17 14:05:19 -08:00
Colin Cross f1f66974c6 Merge changes from topics "soong_logtags", "droiddoc_srcjars"
* changes:
  Allow converting logtags to java without merged logtags file
  Add support for srcjars to droiddoc
2017-11-17 21:32:27 +00:00
Steven Moreland 0e6301c996 Make more Treble make variables read only.
This makes the following readonly if they are defined:
- PRODUCT_FULL_TREBLE_OVERRIDE
- Linker/sepolicy/vintf overrides for PRODUCT_FULL_TREBLE

Test: multiproduct_kati
Change-Id: Ib33e2e23b74a049e87667358bed331f86e517837
2017-11-17 12:46:54 -08:00
Tobias Thierer 2655e57bbb Merge "Tweak comments for OpenJDK 9 build toolchain logic." 2017-11-17 18:20:39 +00:00
Chih-hung Hsieh 315761ace1 Merge "Recognize new clang-tidy android-* warnings." 2017-11-17 17:07:49 +00:00
Tobias Thierer 7ef760b832 Tweak comments for OpenJDK 9 build toolchain logic.
This addresses review comments on the preceding CL
http://r.android.com/539055

Test: Treehugger
Change-Id: Icb0674190db3d638546a0ed49dbcb97d0698e549
2017-11-17 15:35:59 +00:00
Bowgo Tsai b855c0c304 Reorder assert-max-image-size and AVB signing
This change fixes the following warning message:
  WARNING: out/target/product/$(TARGET_DEVICE)/boot.img approaching \
  size limit (33554432 now; limit 33554432)

This is because AVB signing will increase boot.img to
BOARD_BOOTIMAGE_PARTITION_SIZE, in order to place the AVB metadata at
the end of the partition. We should check max image size first then use
avbtool to sign it.

The max allowed size will be (partition size - AVB_HASH_META_SIZE) when
AVB is enabled.

Bug: 69115400
Test: build and checks there is no size limit warning message
Change-Id: If9545e64a0d1714a2ec2440f9bd38293e7b1ba9a
2017-11-17 23:25:38 +08:00
Tobias Thierer 446c9ba370 Merge "Break EXPERIMENTAL_USE_OPENJDK9 into {USE,TARGET}_OPENJDK9." 2017-11-17 15:14:40 +00:00
Tobias Thierer f6bd495728 Break EXPERIMENTAL_USE_OPENJDK9 into {USE,TARGET}_OPENJDK9.
This CL topic breaks the single flag value EXPERIMENTAL_USE_OPENJDK9
into two flags USE_OPENJDK9 and TARGET_OPENJDK9 which are computed
independently in config.mk and config.go; this means that later
build logic no longer depends on / duplicates the semantics of an
unset EXPERIMENTAL_USE_OPENJDK9, because that later build logic
can use USE_OPENJDK9 and TARGET_OPENJDK9 instead. Thus, it becomes
slightly easier to change this default in future CLs (touching
only config.mk and config.go).

It also makes it more straightforward to convert .mk files
to .bp.

This CL also introduces a new allowed value "false" for
EXPERIMENTAL_USE_OPENJDK9. This fourth possible value currently
has the same semantics as a default/unset
EXPERIMENTAL_USE_OPENJDK9, but allows people to explicitly
switch back to the old semantics when the default changes.

Test: make showcommands core-oj (in environments with
      EXPERIMENTAL_USE_OPENJDK9 set to "", "1.8", and "true").
Bug: 38177295

Change-Id: Iaade9610b237722e5d175143808b8653b1e98996
2017-11-17 13:14:11 +00:00
Treehugger Robot 81eeb78200 Merge "Rename r8 to r8-compat-proguard" 2017-11-17 03:11:29 +00:00
Alan Leung 7d6144d34b Rename r8 to r8-compat-proguard
Test: USE_R8=false USE_D8=true m -j32 && USE_R8=true USE_D8=true m -j32

Change-Id: I2610340cf75f8db5920e33fac542f0dcf294ce29
2017-11-16 17:24:01 -08:00
Chih-Hung Hsieh 2cd467b36c Recognize new clang-tidy android-* warnings.
Test: warn.py build.log
Change-Id: I9bcd1fffcb567346a3d959f98821e2cf58e87ba2
2017-11-16 15:42:11 -08:00
Colin Cross 0bb782bd4e Allow converting logtags to java without merged logtags file
Most logtags files only have entries with hardcoded numbers.
Allow these files to be converted to java without needing the
merged logtags file.

Test: m checkbuild
Change-Id: I4cd38aa502fc9b8e50af92ff8296d3ad6abfb56e
2017-11-16 14:58:05 -08:00
Colin Cross e89df93231 Add support for srcjars to droiddoc
Soong generates the R.java for framework-res.apk to a srcjar.
Droiddoc will need to consume them, so add support to the droiddoc
rules for extracting sources from a srcjar.

Test: m checkbuild
Change-Id: I064889c9063b642835d9f668e2568b61d0fabe35
2017-11-16 14:58:05 -08:00
Tomasz Wasilczyk 1c26bc9b27 Silence yet more superfluous build messages.
Bug: 69315492
Test: it builds
Change-Id: I89fcbf9f6435da7ff1c374020870c989b671af2a
2017-11-16 10:14:27 -08:00
Treehugger Robot 70964e8024 Merge "Clear some aapt2.mk inputs after use" 2017-11-16 04:12:25 +00:00
Dan Willemsen d927abe8a8 Clear some aapt2.mk inputs after use
my_generated_res_dirs wasn't being reset in some cases in between
different modules. To be safe, clear every input variable that I was sure
was not being used by the caller after aapt2.mk.

Test: m
Test: m ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I37c861d99637cad77a2a378a119bf66cee373b3a
2017-11-15 17:00:46 -08:00
Tomasz Wasilczyk 4dbdb60698 Merge "Silence superfluous build messages." 2017-11-15 22:27:30 +00:00
Treehugger Robot 288521a615 Merge "Silence PRODUCT_COPY_FILES ignored messages" 2017-11-15 21:51:46 +00:00
Dan Willemsen 403b98aa25 Silence PRODUCT_COPY_FILES ignored messages
We don't have great alternatives for some of these use cases, so for now
just silence them, writing them to $OUT/product_copy_files_ignored.txt
(and if `dist' is specified, $DIST_DIR/logs/product_copy_files_ignored.txt)

Test: lunch aosp_arm-userdebug; m nothing
Test: lunch aosp_arm-userdebug; m dist
Change-Id: If0228bc8d907346e3505ae136cb477ef37a5c867
2017-11-15 11:13:23 -08:00
Tomasz Wasilczyk 29ec06b7ba Silence superfluous build messages.
Bug: 69315492
Test: it builds
Change-Id: Ic02484b80fa27c53786204402930ed5f33ec7fda
2017-11-15 10:34:01 -08:00
Tao Bao 905c84cada Merge "releasetools: Fix the size check for AVB images." 2017-11-15 18:15:20 +00:00
Tao Bao 262bf3f0b5 releasetools: Fix the rebuilding of vbmeta.img.
If only vbmeta.img is missing from the target_files.zip,
'add_img_to_target_files.py -a' will fail to re-create vbmeta.img.

++++ vbmeta ++++

Traceback (most recent call last):
  File "./build/make/tools/releasetools/add_img_to_target_files.py", line 693, in <module>
    main(sys.argv[1:])
  File "./build/make/tools/releasetools/add_img_to_target_files.py", line 687, in main
    AddImagesToTargetFiles(args[0])
  File "./build/make/tools/releasetools/add_img_to_target_files.py", line 584, in AddImagesToTargetFiles
    boot_contents = boot_image.WriteToTemp()
AttributeError: 'NoneType' object has no attribute 'WriteToTemp'

Because it has skipped loading the boot.img, which leads to the above error.

Bug: 63456822
Test: As follows:
  $ zip -d target_files.zip vbmeta.img
  $ add_img_to_target_files.py -a target_files.zip
Test: `m dist` on aosp_arm64-userdebug
Change-Id: Ieba5f0b6848c3ec5d8bcfd24d48cc5af8b39f06c
2017-11-14 17:05:57 -08:00
Tao Bao 9dd909e6db releasetools: Fix the size check for AVB images.
When generating full OTAs for AVB-enabled targets, it fails the size
assertion for boot.img.

  ERROR: boot size (31457280) is 100.00% of limit (31457280)

The size assumption is no longer true for AVB-signed images, because
the actual image size should be always identical to the limit.

Bug: 67841177
Test: Enable AVB on bullhead. `m dist`.
Change-Id: I9bd432ccd88094628eb71308554839549eccb6d9
2017-11-14 15:43:36 -08:00
Treehugger Robot 8a89848373 Merge "Keep PRODUCT_FULL_TREBLE to true even when some requirements are not met" 2017-11-14 22:14:28 +00:00
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