Commit graph

9284 commits

Author SHA1 Message Date
Treehugger Robot
8ba38f45ac Merge "Rename APEX file_contexts as <name>-file_context" 2018-11-16 02:24:59 +00:00
Evgenii Stepanov
1e79844f15 Apply HWASan to libc-in-recovery.
HWASan is disabled in recovery strictly for code size, not for
correctness. With this change, HWASan binaries and libraries can be
used in recovery.

The real reason is the make build system which has no idea of the big
picture, and makes it hard to disable HWASan in _all_ recovery modules
recursively. A few static libraries have sneaked in.

Bug: 119582521
Test: sideload an OTA onto a hwasan device
Change-Id: I6536cc7bf5bfb37f939b585545a23c2068fbd47f
2018-11-15 17:34:18 -08:00
Jaewoong Jung
16c7d3d263 Revert "Revert "Revert "Revert "Export static libraries.""""
This reverts commit 555c114283.

Reason for revert: The namespace issue in the pi-dev-plus-aosp-without-vendor branch is now fixed.

Change-Id: I26ed591447797a8ee505f43bdd209162418b6c5e
2018-11-16 01:20:05 +00:00
Elliott Hughes
bb19518a54 Move env(1) to toybox.
Test: clean build
Change-Id: I52770c022f7d34fb83c990f485b0ca3ea29e97ee
2018-11-15 13:55:56 -08:00
Elliott Hughes
c508121448 Merge "Move comm(1) to toybox." 2018-11-15 16:49:44 +00:00
Elliott Hughes
6105c35d33 Merge "Move sleep(1) to toybox." 2018-11-15 16:49:17 +00:00
Treehugger Robot
493637cf1c Merge "Fix resources in unbundled builds without sdk_version set" 2018-11-15 15:48:55 +00:00
Colin Cross
42308aa174 Fix resources in unbundled builds without sdk_version set
Unbundled builds can be performed on modules that don't have
sdk_version set if they are in a platform checkout that has
framework-res.  Don't skip calling decodeSdkDep in unbundled
builds.

Bug: 117295826
Test: tapas PackageInstaller && m
Change-Id: I3de093cea05670e0b65e99820c07592973b90b3d
2018-11-14 21:44:17 -08:00
Elliott Hughes
6bdad22f7b Move comm(1) to toybox.
Test: clean build
Change-Id: I2d78388ef7211af6d517702c97f3b95ed2f30a46
2018-11-14 20:49:52 -08:00
Treehugger Robot
61d5f9a7c7 Merge "Enable benchmarks on darwin" 2018-11-15 01:09:27 +00:00
Elliott Hughes
2907ceaae2 Move sleep(1) to toybox.
Test: clean build
Change-Id: I724278466c4d1367add79f949d1869e1e50a192d
2018-11-14 14:30:56 -08:00
Jiyong Park
02196574a9 Rename APEX file_contexts as <name>-file_context
It was <name>_file_context before. Changing for better readability.

Bug: 119034475
Test: m apex.test com.android.tzdata com.android.runtime
Change-Id: I0d3d3319370cdbb366d06626c8ac978ca8d875c3
2018-11-15 07:25:08 +09:00
Colin Cross
5857f7c1a9 Merge "Enable kotlinc flags in blueprint files" 2018-11-14 19:32:50 +00:00
Elliott Hughes
128a486ffd Merge "Move uniq(1) to toybox." 2018-11-14 17:45:20 +00:00
Zoran Jovanovic
8736ce29e8 Enable kotlinc flags in blueprint files
Add support for adding kotlinc files in the module.

Some flags are unnecessary as they are added by
default (-no-jdk and -no-stdlib), or are not needed
on an Android build (-include-runtime), or may
conflict with the build (-kotlin-home and
-Xintellij-plugin-root), so the error stops the
build if they are added.

Test: part of java/java_test.go
Change-Id: If3b2777062daaa490a20c014e9b1bb4b1cb0a8df
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sony.com>
2018-11-14 15:02:46 +00:00
Treehugger Robot
ad9eab8b51 Merge "APEX can be flattened" 2018-11-14 11:47:51 +00:00
Elliott Hughes
7a907c9291 Move uniq(1) to toybox.
Test: clean build
Change-Id: I4819098fd298dbc4f3e424e437a448e1fb1baeaf
2018-11-13 22:12:30 -08:00
Elliott Hughes
8ed9032948 Merge "Move cat(1) to toybox." 2018-11-14 05:26:21 +00:00
Jiyong Park
8fd6192480 APEX can be flattened
When TARGET_FLATTEN_APEX is set to true, APEXes are flattened, which
means files in an APEX is not packaged into the mini file system image,
but instead directly copied to the system partition.

This option is for devices where kernel does not support loopback
devices or the maximum number of loopback devices is too small (though
the threshold is TBD as of now).

This CL also fixes a bug that jars having bytecode are installed instead
of those having dex.

Bug: 118485880
Test: TARGET_FLATTEN_APEX=true m apex.test; tree
out/target/product/.../system/apex/apex.test shows list of files in it.

Test; m apex.test, then a file out/target/product/.../system/apex/apex
.test.apex exists.

Change-Id: I5a3d62d392d05f2779c4925388afe4f6e460059b
2018-11-14 13:41:54 +09:00
Jiyong Park
b9619f0746 Merge "Move file_contexts file for APEXes to under /system/sepolicy" 2018-11-14 03:57:28 +00:00
Treehugger Robot
4855c4f460 Merge "Add to support armv8-2a on 2nd arch. variant" 2018-11-14 00:51:53 +00:00
Colin Cross
5f45e81f84 Enable benchmarks on darwin
libgoogle-benchmark works fine on darwin, enable it.

Bug: 77585931
Test: m checkbuild
Change-Id: I8d1cfe4ada634675c8c4c16f42681069d0311771
2018-11-13 15:28:07 -08:00
Elliott Hughes
5d593238e2 Move cat(1) to toybox.
Test: builds
Change-Id: I9a367c3204891518994bfe889072dd1cf9aed490
2018-11-13 13:08:13 -08:00
Treehugger Robot
07002e0101 Merge "Switch to clang-r344140b" 2018-11-13 20:35:56 +00:00
Treehugger Robot
41c715573b Merge "Fix the host bionic linker check; add tests" 2018-11-13 17:52:13 +00:00
Pirama Arumuga Nainar
538be1f81c Switch to clang-r344140b
Bug: http://b/119270185

This prebuilt has a cherry-pick to fix PGO instrumentation.

Test: m ANDROID_PGO_INSTRUMENT=all,
      Build and boot a few devices in internal branch.
Change-Id: I97ca17fbc039a17db57b2749a1adf2ef981c5918
2018-11-13 17:21:01 +00:00
mtk15504
270ba75991 Add to support armv8-2a on 2nd arch. variant
Add arch. variant option to support cores that implement armv8-2a ISAs.

Test: set TARGET_2ND_ARCH_VARIANT := armv8-2a, build successful and 32bit app launch ok

BUG: 118414869
Change-Id: I755b8858726bd887068923123bad106aed7b1ec8
2018-11-13 16:40:38 +08:00
Dan Willemsen
10bf17cf45 Fix the host bionic linker check; add tests
Gold uses two PT_LOAD programs: RX, RW
LLD is using three PT_LOAD programs: R, RX, RW

All non-static host bionic executables are linked with LLD, as it's
required in order to embed the linker. The dynamic linker is considered
a static executable for this definition.

When the linker had been built with Gold, we inserted the the RX&RW
loads in the middle of the executable's readonly load, splitting the R
load into two. When this happened, all of the linker's loads existed 1:1
in the final executable.

Now that the linker is built with LLD, we're inserting the loads into
the same place, but LLD merges the first part of the executable's R load
with the linker's R load, so there's not a 1:1 matching.

So just make sure that all of the linker's loads are contained within
the executable's loads (and with the appropriate flags).

Test: m blueprint_tools (runs new tests)
Test: build host bionic binaries
Change-Id: If7868d2ab8980d27ba5ab8994fefe0d6142f215a
2018-11-12 22:29:44 -08:00
Jiyong Park
1a7cf08ebb Add filename_from_src property to prebuilt_etc
Base name of the output file of a prebuilt_etc is by default the module
name. This default behavior can be customized by either via the
'filename' property or the new 'filename_from_src' property. The former
explicitly sets the base name while the latter makes the file name to be
that of the source file.

Test: m (prebuilt_etc_test added)
Change-Id: Ic2900417bda62993f6de2612d993234b82b74479
2018-11-13 12:43:34 +09:00
Jiyong Park
d0a65bae17 Move file_contexts file for APEXes to under /system/sepolicy
For centralized development of sepolices, file_contexts files for APEXes
are all moved to under /system/seplicy.

The meaning of the existing file_contexts has been changed; when it is
set to <value>, then /system/sepolicy/apex/<value>_file_contexts is
used. When unset, it defaults to the name of the module. The property is
not removed in order to support creating multiple versions of the same
apex (for testing purpose) built with same file_contexts file.

Bug: 119034475
Test: m apex.test com.android.tzdata com.android.runtime
Change-Id: I7d14a9e37baea9ab78d9e15e1164cce54d256f56
2018-11-13 10:59:40 +09:00
Chih-Hung Hsieh
2fcac47e9d Revert "Add lld --no-rosegment flag to work with unwinder."
This reverts commit b18814e7a4.

Reason for revert: The originating bug is now fixed.

Test: make checkbuild
Change-Id: Iabcfbeed5977336fc27fb1ccbad269c1fa81ef6e
2018-11-12 21:09:28 +00:00
Elliott Hughes
51dbeebd51 Merge "Move id(1) and whoami(1) to toybox." 2018-11-12 19:58:47 +00:00
Colin Cross
c17727d06b Shard arch property structs
Arch property struct types are created at runtime.  Go has a limit
of 2**16 bytes for the name of a type, and the type of a struct
created at runtime is a string containing all the names and types
of its fields.  To avoid going over the limit, split the runtime
created structs into multiple shards.

Also undo MoreBaseLinkerProperties now that it is no longer
required.

Bug: 80437643
Test: m checkbuild
Test: no change to out/soong/build.ninja
Change-Id: I035b20332ec63f3d4b1696855c5b0b0a810597b7
2018-11-12 19:04:13 +00:00
Elliott Hughes
9b370f5ada Move id(1) and whoami(1) to toybox.
Test: builds
Change-Id: I32347c94438c394eb31f5af9f51cee11ad0ef247
2018-11-11 10:57:58 -08:00
Colin Cross
4e81d709ab Document host_supported and device_supported
Test: none
Change-Id: I151fa044a61a0fc993ce4ea672fda762c15025cc
2018-11-11 02:37:48 +00:00
Yi Kong
ee53a98e31 Remove unnecessary warning suppression
All instances of no-self-assign-overloaded warning have been fixed,
remove the suppression flag.

Test: m checkbuild
Change-Id: I70d9d6f721b36ebb5c3974893f79a09e4b1d1f4d
2018-11-09 23:09:19 +00:00
Jaewoong Jung
eeb2c4b03d Merge "Revert "Revert "Revert "Export static libraries."""" 2018-11-09 22:31:23 +00:00
Jaewoong Jung
555c114283 Revert "Revert "Revert "Export static libraries."""
This reverts commit eb05c2a633.

Reason for revert: Yet another broken build.

Change-Id: I4198f2dd5c7848365d71d03f6dbd598998fb9bd8
2018-11-09 22:25:37 +00:00
Jaewoong Jung
11044b094f Merge "Revert "Revert "Export static libraries.""" 2018-11-09 21:16:10 +00:00
Treehugger Robot
0f6aa7b56f Merge "Fail gracefully when apek_key is not found" 2018-11-09 16:46:04 +00:00
Jaewoong Jung
eb05c2a633 Revert "Revert "Export static libraries.""
This reverts commit 3affc07ca0.

Reason for revert: The notice dependency bug is now fixed.

Change-Id: I5424ade9d742fbe190651097c04914a29db6dfa0
2018-11-09 16:02:34 +00:00
Peter Collingbourne
abde584fd1 Stop passing the gold plugin path to llvm-ar.
llvm-ar takes a --plugin argument but it is ignored for compatibility,
so passing it has no effect.

Change-Id: I4fc51d226d66cf2a43462d3d4ccc12e6e5ebb226
2018-11-08 20:13:16 -08:00
Yi Kong
ec2f6cba80 Merge "Revert "Prevent clang from using the x18 register on arm64."" 2018-11-09 01:32:34 +00:00
Yi Kong
8c3c0f50d0 Revert "Prevent clang from using the x18 register on arm64."
This reverts commit 98d8580c3a.

Change no longer needed with the new LLVM toolchain update.

Bug: 112907825
Bug: 111759196
Change-Id: Ife3ce47a602dd850ac84bb51abc70c0ca157776e
2018-11-08 21:07:08 +00:00
Jiyong Park
fa0a37365b Fail gracefully when apek_key is not found
When the private key file can not be obtained, e.g., due to missing git
project where the apex_key module is defined, fail gracefully with an
error message instead of panicing.

Bug: 119256776
Test: modify the key property in /systme/apex/Android.bp to
apex.test.key2 and run `ALLOW_MISSING_DEPENDENCIES=true m apex.test`
The build fails with

error: system/apex/Android.bp:32:8: module "apex.test" variant "android_common_apex.test": key: private_key for "apex.test.key2" could not be found

Change-Id: I2cd5fed0f046de1f0b380fbdac5f8b82816b0e24
2018-11-09 05:55:32 +09:00
Martin Stjernholm
c51ffaf1f2 Merge "Add shared_libs to vendor and recovery targets." 2018-11-08 10:55:01 +00:00
Treehugger Robot
2eb88c7135 Merge "Use the real compiler for compdb" 2018-11-08 01:41:19 +00:00
Alex Light
be96aeac1a Use the real compiler for compdb
Some tools (eg ccls) require that the compiler in argv[0] of the
compdb be an actual compiler binary. Until now we had simply filled
that slot with /bin/false. This change fills it with the current
default clang binary instead.

Test: make -j50 SOONG_GEN_COMPDB=1 SOONG_GEN_COMPDB_DEBUG=1 SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing
Test: Use ccls
Change-Id: I920e8d3113e398b629228070a904dbf1535856e0
2018-11-07 11:35:47 -08:00
Martin Stjernholm
ef449fe62e Add shared_libs to vendor and recovery targets.
Prerequisite for https://android-review.googlesource.com/815573.

Test: Built system/core/libunwindstack with https://android-review.googlesource.com/815573
Bug: 118374951
Change-Id: I6dd7ba1416f34291792c8ac5cf74048753f3e2f6
2018-11-07 11:00:59 +00:00
Yi Kong
8a89f21746 Merge "Update clang to r344140" 2018-11-07 01:39:56 +00:00