Commit graph

14532 commits

Author SHA1 Message Date
Treehugger Robot
d62b4af8b7 Merge changes from topic "put-dep-in-apex"
* changes:
  Add jsonmodify tool
  Put dependency in apex_manifest.json
2019-08-06 00:21:11 +00:00
yidong.zhang
263802ebda Merge "Fix recovery-variant VNDK libs miss-installed to recovery img"
am: 52644cb29a

Change-Id: I05db8d67248c11dce6a04d90ae53705ddc3f9228
2019-08-05 15:20:49 -07:00
Treehugger Robot
52644cb29a Merge "Fix recovery-variant VNDK libs miss-installed to recovery img" 2019-08-05 22:02:46 +00:00
Mitch Phillips
cead9bad66 Merge "Disable LTO when building with fuzzer support."
am: df7d2cc9f8

Change-Id: Ie4f0e1c6266cca662c4eb133ce2bd9ce85b1dcd9
2019-08-05 11:39:28 -07:00
Kun Niu
fb6a70e5a1 Merge "Build module from source branch instead of using prebuilds when coverage is enabled."
am: a535be6012

Change-Id: Ia5f294ceec3d15f7455792a91eef1330e0131f4f
2019-08-05 11:38:53 -07:00
Mitch Phillips
df7d2cc9f8 Merge "Disable LTO when building with fuzzer support." 2019-08-05 18:18:51 +00:00
Kun Niu
a535be6012 Merge "Build module from source branch instead of using prebuilds when coverage is enabled." 2019-08-05 18:04:49 +00:00
Mitch Phillips
34b493fec5 Disable LTO when building with fuzzer support.
Bug: 131771163

LTO is currently broken when building with SANITIZE_TARGET=fuzzer. The
compiler bug is currently being addressed upstream (see linked bug), but
we have applied a local workaround in the build system to disable LTO
when building using the fuzzer config.

There is a bug here however. In the sanitizer mutator we explicitly
remove -flto and add -fno-lto. The sanitizer mutator runs after the LTO
mutator, so (in general) this works just fine. The problem exists when a
target specifies an explicit 'lto: { ... }' flag in their Android.bp. In
this case, the sanitizer mutator disables LTO, then the flags are parsed
from the Android.bp, re-enabling LTO.

This patch fixes this issue. If the sanitizer mutator has added the
-fsanitize=fuzzer-no-link flags, then the LTO mutator won't add the LTO
flags after this fact.

Test: Build a target with SANITIZE_TARGET=fuzzer (or a cc_fuzz target),
where there is an explitiy 'lto: { ... }' and watch it now succeed in
building.

Change-Id: I6643909417f666539c23469816926b806e204b06
2019-08-02 16:57:55 -07:00
Kun Niu
10c9f83f26 Build module from source branch instead of using prebuilds when coverage is enabled.
Test: successfully get coverage data from coverage build.
Bug: 137865099
Change-Id: I7df96c2b2c2ec2859393fb2c19ffe1081d112c96
2019-08-02 10:13:46 -07:00
yidong.zhang
d06ecc8af1 Fix recovery-variant VNDK libs miss-installed to recovery img
When no-vendor-variant VNDK is enabled,the vendor variant of VNDK
libraries are not installed.This should not be fit for recovery module.
Recovery module deps should be always installed.

Bug: 138812833
Test: `adb reboot recovery;` recovery mode boot ok

Change-Id: I0c3b8ac0fb0176677ddd94ba7216dd068f2eb81b
2019-08-02 16:24:15 +08:00
Dan Willemsen
57d5786d59 Merge "Remove support for ONE_SHOT_MAKEFILE"
am: d778b93168

Change-Id: I32ef15cf94df3524e4e805327d4af246c95226a6
2019-08-01 14:31:53 -07:00
Dan Willemsen
d778b93168 Merge "Remove support for ONE_SHOT_MAKEFILE" 2019-08-01 21:11:02 +00:00
Elliott Hughes
4177df9567 Merge "Reland "Remove product_is_iot.""
am: 80e071d1da

Change-Id: I875289d3b5f88034b4e1256054b41fb9e05dfdd1
2019-08-01 11:59:54 -07:00
Elliott Hughes
80e071d1da Merge "Reland "Remove product_is_iot."" 2019-08-01 18:24:26 +00:00
Jooyung Han
04329f131a Add jsonmodify tool
This tool is used to modify apex_manifest.json when building apex
module.

Here's the usage:

usage: jsonmodify [-h] [-o output] [-v path value] [-s path value]
                     [-r path] [-a path [value ...]]
                     [input]

positional arguments:
  input                 JSON file

optional arguments:
  -h, --help            show this help message and exit
  -o output, --out output
                        write result to a file. If omitted, print to stdout
  -v path value, --value path value
                        set value of the key specified by path. If path
                        doesn't exist, creates new one.
  -s path value, --replace path value
                        replace value of the key specified by path. If path
                        doesn't exist, no op.
  -r path, --remove path
                        remove the key specified by path. If path doesn't
                        exist, no op.
  -a path [value ...], --append_list path [value ...]
                        append values to the list specified by path. If path
                        doesn't exist, creates new list for it.

Bug: 138695532
Test: m jsonmodify
Test: echo {} | jsonmodify -v name hello -a list.nested a b c
{
  "name": "hello",
  "list": {
    "nested": [
      "a",
      "b",
      "c"
    ]
  }
}

Change-Id: I2cd043c614b3ad2306a0c27ccee302633c6d2525
2019-08-02 00:08:05 +09:00
Jooyung Han
e16330393a Put dependency in apex_manifest.json
To generate ld.config.txt dynamically(b/123722631), each APEX should
provide some dependency information:
a) list of libraries which other APEXes(or system) can use from this apex
b) list of libraries which this apex uses from other APEXes(or system)

This change puts dependency information in apex_manifest.json at
build-time with two additional keys:
a) provideNativeLibs
b) requireNativeLibs

Bug: 138695532
Test: m (runs soong tests)
Test: find $OUT/apex -name apex_manifest.json  -exec cat {} \;
 (shows contents of apex_manifest.json files)

Change-Id: Iaad12c8c35454222ad177ce923cce76ef12a8a5a
2019-08-01 23:45:37 +09:00
Elliott Hughes
1f3a239953 Reland "Remove product_is_iot."
This reverts commit 5089c11b1e.

Change-Id: Iaedc22e63560a01ab01859982dc627569a421025
Test: treehugger
2019-08-01 14:42:12 +00:00
Roland Levillain
1334934d12 Merge "Materialize the copy commands of an APEX rule as a Ninja response file."
am: ec5fc70856

Change-Id: I518abfeba6fcd55ba05745304552c7f741e2e632
2019-08-01 07:24:35 -07:00
Roland Levillain
ec5fc70856 Merge "Materialize the copy commands of an APEX rule as a Ninja response file." 2019-08-01 13:51:22 +00:00
Slava Shklyaev
a9c30574ce Merge "Add neuralnetworks to ndkPrebuiltSharedLibs"
am: 395ab52ee9

Change-Id: Ida1de881468a7e8eb0dbb3509ded14ec6ea59248
2019-08-01 03:49:09 -07:00
Nelson Li
742677d7b6 Merge "Revert "Remove product_is_iot.""
am: 604374742d

Change-Id: I85167277df48f3887d17a2670167b6aba6c5519d
2019-08-01 03:37:17 -07:00
Slava Shklyaev
395ab52ee9 Merge "Add neuralnetworks to ndkPrebuiltSharedLibs" 2019-08-01 10:30:00 +00:00
Treehugger Robot
604374742d Merge "Revert "Remove product_is_iot."" 2019-08-01 10:16:24 +00:00
Nelson Li
5089c11b1e Revert "Remove product_is_iot."
This reverts commit 14fa562fbb.

Reason for revert: Broken build on 5772180

error: frameworks/av/media/utils/Android.bp:49:23: unrecognized property "product_variables.product_is_iot"

Bug: 138764596
Change-Id: I37944dfb974e4180a683361f514b404f92b943e5
2019-08-01 06:28:05 +00:00
Elliott Hughes
7bb10aa40d Merge "Remove product_is_iot."
am: 75b3788d6c

Change-Id: Ic639b5f1ac256be3369c6fe789bbef428aeac353
2019-07-31 22:07:05 -07:00
Treehugger Robot
75b3788d6c Merge "Remove product_is_iot." 2019-08-01 04:42:40 +00:00
Dan Willemsen
ce41e943be Remove support for ONE_SHOT_MAKEFILE
Test: treehugger
Change-Id: Icdbe62bcb7bc4717228c5d974962b939d8eafee6
2019-07-31 18:11:27 -07:00
Roland Levillain
5c533a0c75 Merge "Fix some typos in error messages in apex/apex.go."
am: 88e3f7e3de

Change-Id: I4018d96934d229c6ec0c04de1ea862b473542932
2019-07-31 10:55:19 -07:00
Treehugger Robot
88e3f7e3de Merge "Fix some typos in error messages in apex/apex.go." 2019-07-31 17:43:21 +00:00
Elliott Hughes
ed0eeb211d Merge "Switch to toybox egrep(1) and grep(1)."
am: 521602194b

Change-Id: I7a18a20f4f091ceaf015329b1e3aac8da15f12a2
2019-07-31 10:32:23 -07:00
Elliott Hughes
521602194b Merge "Switch to toybox egrep(1) and grep(1)." 2019-07-31 16:55:43 +00:00
Roland Levillain
96cf4d4646 Materialize the copy commands of an APEX rule as a Ninja response file.
For some APEX packages (i.e. the Runtime Testing APEX), the set of
files to copy can be so large that the copy commands (which are part
of the Ninja shell command executed for an APEX package) may exceed
the maximum length of argument to the exec() functions (ARG_MAX). To
work around this limitation, record these copy commands in a Ninja
response file (rspfile) and `source` this file in the Ninja command to
execute them.

Test: m nothing (`apex/apex_test.go` amended)
Test: m com.android.runtime.testing (with CL https://android-review.googlesource.com/c/platform/art/+/1008034/ cherry-picked)
Bug: 129534335
Change-Id: I09ff2d9cf66bfd4cbc12cb724a45d455d08da0b2
2019-07-31 17:22:00 +01:00
Steven Moreland
e3ff85b968 Merge "Automatically inherit common properties."
am: d28f688e69

Change-Id: I2608257a595ade933d291ef5c4fb1f2c633c292b
2019-07-31 09:10:41 -07:00
Steven Moreland
d28f688e69 Merge "Automatically inherit common properties." 2019-07-31 15:47:51 +00:00
Roland Levillain
4644b22b75 Fix some typos in error messages in apex/apex.go.
Test: m
Change-Id: Iee54bd0e2e0d6651d82b7fbae246f20643e49ceb
2019-07-31 14:09:17 +01:00
Jiyong Park
fb45ee3d1e Merge "Delete prebuilt APEXes when installing source-built APEXes"
am: a822256e15

Change-Id: I576969455e028010da6631f06010fd6369c4b589
2019-07-31 00:40:06 -07:00
Treehugger Robot
a822256e15 Merge "Delete prebuilt APEXes when installing source-built APEXes" 2019-07-31 07:03:49 +00:00
Jeongik Cha
a741ebf342 Merge "Add a rule about platform_apis"
am: 8a64f8c907

Change-Id: Ifdd8bd693fee625f63db403ce7a4dbc9209eb398
2019-07-30 18:33:08 -07:00
Jeongik Cha
8a64f8c907 Merge "Add a rule about platform_apis" 2019-07-31 01:09:35 +00:00
Dan Willemsen
ded55a4ee8 Default to the status table output
am: 1eee154c3b

Change-Id: Ieaf0653cac9f080eb15d2e52683fefdb6788eb4d
2019-07-30 17:47:02 -07:00
Steven Moreland
12f23e0883 Automatically inherit common properties.
Before, the values were often simply ignored. If bad values are provided
now, we should be able to catch them.

Bug: 119771576
Test: relying on this for AIDL/HIDL
Change-Id: I8d2ff26da0b2d01ebe7f78c26d69c7b618a65367
2019-07-30 22:42:19 +00:00
Dan Willemsen
1eee154c3b Default to the status table output
For smart terminals, default to using the status table, using 1/4 of the
terminal height (with a min of 1 and a max of 10).

This behavior can still be overriden to a specific height with
SOONG_UI_TABLE_HEIGHT, and turned off by setting SOONG_UI_TABLE_HEIGHT
to 0.

Test: m   <adjust terminal height, see it shrink when it gets too short>
Test: SOONG_UI_TABLE_HEIGHT=20 m
Test: SOONG_UI_TABLE_HEIGHT=0 m
Change-Id: I224348a29a6e07f168c92cf5514a94bd27e32618
2019-07-30 13:44:03 -07:00
Elliott Hughes
14fa562fbb Remove product_is_iot.
Test: treehugger
Change-Id: I0935f463138e1d2a364cd2a5bc8b6e977da1ec47
2019-07-30 08:43:50 -07:00
Roland Levillain
d571a52d49 Merge "Handle test_per_src modules as indirect dependencies in APEXes."
am: cadffcdd66

Change-Id: I6e420de099250d40069a188b4eef618b0b403591
2019-07-30 04:10:50 -07:00
Roland Levillain
cadffcdd66 Merge "Handle test_per_src modules as indirect dependencies in APEXes." 2019-07-30 10:41:20 +00:00
Jiyong Park
03b68ddd10 Delete prebuilt APEXes when installing source-built APEXes
To build the platform for ASAN, we do

`m && SANITIZE_TARGET='addresss' m`

However, at the end of the second build, the system partition could have
conflicting APEXes; prebuilt APEXes from the first build and
source-built APEXes from the second build. Since the file names for the
prebuilt and the source-built are different (e.g.
com.google.android.media.apex v.s. com.android.media.apex), we end up
having two files for the same APEX. This is confusing apexd at runtime
and the device fails to boot.

To fix this, when building a non-prebuilt APEX, the prebuilt APEX might
have been installed by the previous build is deleted.

Bug: 138146044
Test: lunch aosp_cf_x86_pasan; m && SANITIZE_TARGET='address' m
check that out/target/product/vsoc_x86/system/apex has
com.android.*.apex only.

Change-Id: Ib5a021a297cf0173ea5a3b50e9398b1cf295c558
2019-07-30 13:52:15 +09:00
Dan Willemsen
7830315feb Merge "Remove reference to PRODUCT-*"
am: 2d531bf7e1

Change-Id: I6c9f9792cbcf5d805a9df1c1e0daa509e4160cee
2019-07-29 21:07:47 -07:00
Treehugger Robot
2d531bf7e1 Merge "Remove reference to PRODUCT-*" 2019-07-30 03:46:21 +00:00
Vic Yang
6f127a7fa3 Merge "Add sort_bss_symbols_by_size property for shared libs"
am: 446441fc19

Change-Id: I83344693e2d67721b1fb38eda4d72f993fa419f1
2019-07-29 20:10:54 -07:00
Vic Yang
446441fc19 Merge "Add sort_bss_symbols_by_size property for shared libs" 2019-07-30 02:34:23 +00:00