Commit Graph

12079 Commits

Author SHA1 Message Date
Treehugger Robot a48f8c8070 Merge changes I918b4878,I85238d93,Iefee8a91
* changes:
  Add an output file tag for proguard dictionaries
  Add InstallBypassMake
  Document wokaround for yama ptrace restrictions
2019-08-09 00:12:27 +00:00
Steven Moreland 08f9262577 Merge "-D__ANDROID_NDK__ for SDK builds." 2019-08-08 16:22:53 +00:00
Steven Moreland c324729692 -D__ANDROID_NDK__ for SDK builds.
The NDK is built like this. Having it for app builds within the Android
build system allows us to distinguish platform code from app code.

This is specifically to distinguish AIDL interfaces using libbinder_ndk.
'myBinder-ndk_platform' libs will use additional functionality that
'myBinder-ndk' libs won't use (in the future, these may be separate
variants with the same name, see b/121157555).

Bug: 136027762
Test: using this to distinuish code in NDK vs platform code
Change-Id: I4de6f2e066982e7573ffd28cda44407d9e5648e4
2019-08-07 13:06:06 -07:00
Alexander Smundak 02ed5df4ac Merge "Allow reading zipfile list from a file." 2019-08-07 17:02:53 +00:00
Anna Trostanetski bc93803081 Merge "Create a module that extracts and installs compat_config." 2019-08-07 15:46:43 +00:00
Treehugger Robot 289eb5bed0 Merge "Add TEST_MAPPING for build/soong/apex" 2019-08-07 14:31:23 +00:00
Paul Duffin d5a57d8fc5 Merge changes from topic "restrict-libandroidicu-usages"
* changes:
  Support restrictions based on a module's OsClass
  Support restrictions based on a module's dependencies
2019-08-07 10:34:19 +00:00
Jooyung Han 07149d36aa Add TEST_MAPPING for build/soong/apex
build/soong/apex is highly coupled with system/apex.
So it is reasonable to "import" presubmit tests from system/apex.

Test: atest --test-mapping build/soong/apex
Bug: 138984456
Change-Id: I7447e04a63b86486daef0f2a7642842101c0029f
2019-08-07 17:33:24 +09:00
Treehugger Robot fb4ecc42ce Merge "Add cc_*.target.recovery.static_libs" 2019-08-07 03:45:17 +00:00
Hsin-Yi Chen ff7321b32a Merge "Skip ABI checks for APEX variants of opt-in libraries" 2019-08-07 02:00:43 +00:00
Sasha Smundak 1459a9259e Allow reading zipfile list from a file.
Android build generates 180K+ zip files that are to be merged and the
result passed to the indexing pipeline to generate the source code
cross-reference. Their names cannot be passed on the command line,
hence the need for this change. That required extensive changes to
the code as it no longer can be assumed that all the input files can
be kept open.

Bug: 121267023
Test: internal + treehugger + combine index files
Change-Id: I0a829f96ff7187ad967fb6b8cede387501ec57cc
2019-08-06 14:23:35 -07:00
Stephen Hines 7f0560d962 Merge "Add support for AUTO_*_INITIALIZE to build/soong." 2019-08-06 21:04:04 +00:00
atrost db25ac07a5 Create a module that extracts and installs compat_config.
Currently it extracts from the provided jar file compat/compat_config.xml
(generated by compat-changeid-annotation-processor) and installs on
/system/etc/sysconfig.
Future improvements:
 - Merge all the configs going for the system image into one, so that
   duplicate change ids across modules are failing the build instead of
   runtime.
 - Support uploading the config onto APEX for APEX modules.

Test: flashed device locally, config files found and read by
com.android.server.compat.CompatConfig.
Bug: 138222363

Change-Id: I64b11fdc466f746702e7e73f612794e024de2288
2019-08-06 19:21:46 +01:00
Colin Cross 2d975b197e Add an output file tag for proguard dictionaries
Allow modules to depend on the proguard dictionary of another module
using module{.proguard_map}.

Bug: 122332855
Test: m checkbuild
Change-Id: I918b487872c1a8ef8a51c0b994277efb0512d157
2019-08-06 09:45:04 -07:00
Colin Cross 607d8587e4 Add InstallBypassMake
Allow modules to mark themselves as InstallBypassMake, which will
cause android.PathForModuleInstall to return a path in $OUT_DIR
instead of $OUT_DIR/soong.  This can be used for modules that
can handle installation to the final location on their own.  The
main blocker for most modules is support for the "required" property,
which requires adding dependencies on the installed location of
other modules.

Bug: 122332855
Test: m checkbuild
Change-Id: I85238d937ff30335167d4b3fec79bbefc734b5e1
2019-08-06 09:45:04 -07:00
Colin Cross 8baf29fb10 Document wokaround for yama ptrace restrictions
Fixes: 138580915
Test: m checkbuild
Change-Id: Iefee8a914225d465a1feb37690a54423be332841
2019-08-06 09:44:39 -07:00
Paul Duffin f1c9bbee88 Support restrictions based on a module's OsClass
Bug: 137543088
Test: m nothing
Change-Id: Ibb05f222594d8180746b612c04ab1538a1cf3c0b
2019-08-06 11:09:09 +01:00
Paul Duffin 3578188fac Support restrictions based on a module's dependencies
Adds a neverallow InDirectDeps(deps) verb that will allow a neverallow
rule to restrict access to a specific dependency, irrespective of how
it is specified.

Bug: 137543088
Test: m nothing
Change-Id: I0c6bb702d55175e9b78b79e86e96924c5dd83efa
2019-08-06 11:09:02 +01:00
Hsin-Yi Chen af17d74a1a Skip ABI checks for APEX variants of opt-in libraries
Test: make findlsdumps
Bug: 138219814
Change-Id: I2ae6fadad5af4f7b648aa15307a0bd11339ffc7c
2019-08-06 17:54:01 +08:00
Yifan Hong e7efbc8c78 Add cc_*.target.recovery.static_libs
Test: use static_libs in target.recovery

Change-Id: Ib2a10d09e205932be83e74274a641fd8544f7188
2019-08-05 19:56:44 -07:00
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
Treehugger Robot 52644cb29a Merge "Fix recovery-variant VNDK libs miss-installed to recovery img" 2019-08-05 22:02:46 +00: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 d778b93168 Merge "Remove support for ONE_SHOT_MAKEFILE" 2019-08-01 21:11:02 +00: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 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 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
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
Treehugger Robot 88e3f7e3de Merge "Fix some typos in error messages in apex/apex.go." 2019-07-31 17:43:21 +00: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 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
Treehugger Robot a822256e15 Merge "Delete prebuilt APEXes when installing source-built APEXes" 2019-07-31 07:03:49 +00:00
Jeongik Cha 8a64f8c907 Merge "Add a rule about platform_apis" 2019-07-31 01:09:35 +00: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 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