Commit graph

14222 commits

Author SHA1 Message Date
allenhair
e0a367384d Merge "Fix coverage build." 2017-11-01 17:22:16 +00:00
Nicolas Geoffray
21a3aef7d7 Merge "Add a product variable for priv-apps dependencies." 2017-11-01 13:40:20 +00:00
Treehugger Robot
9767853ed0 Merge "Export AAPT-related variables to soong" 2017-10-31 23:39:24 +00:00
Treehugger Robot
46e7f55f6d Merge "Add hwbinder.jar to PDK." 2017-10-31 21:30:48 +00:00
Steven Moreland
266632f327 Add hwbinder.jar to PDK.
This is a no-install subset of frameworks.jar. Required
for HIDL libraries to be able to be built against at
build time.

Bug: 68433855
Test: hwbinder_intermediates are in platform.zip
Change-Id: Ia879c6a6908c00069eaf819278c9d5da6a649b68
2017-10-31 21:30:28 +00:00
Allen Hair
1d226aaf0f Fix coverage build.
Bug: 68713631
Test: m showcommands dist ANDROID_COMPILE_WITH_JACK=false \
    EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true \
    SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false tests
Change-Id: Ic2540a7db26b7fe6d2ee2bb5feb54a4334deafcc
2017-10-31 14:06:00 -07:00
Colin Cross
66a11b7ccc Merge "Revert "CFI compatibility with static executables and nested archives"" 2017-10-31 21:01:41 +00:00
Treehugger Robot
41f54061b2 Merge "Remove make version check" 2017-10-31 20:31:27 +00:00
Dan Willemsen
badd598c98 Merge "Mark some TARGET_* inputs as readonly" 2017-10-31 19:43:55 +00:00
Orion Hodson
8350c4c540 Revert "CFI compatibility with static executables and nested archives"
This reverts commit 3d3e1cf260.

Rationale: part of a group of commits that left aosp_x86_64 not
building. (See https://android-build.googleplex.com/builds/
submitted/4426589/aosp_x86_64-eng/latest/logs/build_error.log)

Bug: 30227045
Test: builds
Change-Id: Ie22590abe3d1cdccb8d141baf6480d49dedf8789
2017-10-31 17:41:16 +00:00
Dan Willemsen
2c3f8366e2 Mark some TARGET_* inputs as readonly
Nobody should be changing these past this point.

Test: build_test.bash
Change-Id: I6eb574a0b4d339912d4a09f8f752294871965041
2017-10-30 19:38:25 -07:00
Vishwath Mohan
22b6abc96d Merge "CFI compatibility with static executables and nested archives" 2017-10-31 01:42:16 +00:00
Colin Cross
c7bd540a6e Export AAPT-related variables to soong
Test: m checkbuild
Change-Id: I1816df9b9cc7b51e228d6d847cefa2d51a524897
2017-10-30 17:31:44 -07:00
Colin Cross
8b664d0d96 Merge "Remove PRODUCT_AAPT2_CFLAGS and PRODUCT_AAPT_FLAGS" 2017-10-30 20:58:08 +00:00
Dan Willemsen
ce9a40650d Remove make version check
We should never be using make here anymore, only Kati.

Test: none
Change-Id: I6e716d76e3656c2bad1cf17c6de92bdeda763d5b
2017-10-30 13:52:47 -07:00
Dan Willemsen
41cc5022c1 Merge "Prevent using config.mk from make, clean up unused code" 2017-10-30 20:11:32 +00:00
Stephen Hines
2957066979 Merge "Switch to clang-4393122." 2017-10-30 19:35:17 +00:00
Colin Cross
d5cce4c360 Remove PRODUCT_AAPT2_CFLAGS and PRODUCT_AAPT_FLAGS
PRODUCT_AAPT2_CFLAGS and PRODUCT_AAPT_FLAGS are only used to pass
--pseudo-localize.  The flag doesn't need to be conditional on the
product, because the pseudo locale will be stripped out later if it
is not wanted.  Having it conditional on the product causes the
AAPT2-compiled resources to vary between products, which causes
unnecessary rebuilds when swithcing products.

Remove the variables, always add --pseudo-localize, and move
the AAPT2 compiled output to the common intermediates.

Test: m checkbuild
Change-Id: Iacc914114616b5bd19d9a1011802f4f9bca9bc19
2017-10-27 16:25:55 -07:00
Vishwath Mohan
3d3e1cf260 CFI compatibility with static executables and nested archives
This CL makes the following changes:
(a) It disables diagnostics for CFI which requires the runtime ubsan
library (which isn't included in static executables).

(b) It applies the ar flags for CFI correctly for nested .a
archives.

(c) Applies the version script to export CFI shadow for non-static
binaries

(d) Doesn't apply cross-dso CFI for static executables

Bug: 30227045
Test: Static executables build correctly and do not complain about
missing symbols from the ubsan runtime library.
Test: Nested .a files correctly use the gold plugin.

Change-Id: Id8fe3c13f6b76565aafbf1266e95f50d1447a790
2017-10-27 03:26:27 -07:00
Treehugger Robot
0bbd8d9e37 Merge changes from topic "aosp-oc-mr1-emulator"
* changes:
  emulator: fix widevine drm vndbinder denial
  emulator: fix selinux issues
  emulator: squash misc modifications from oc-emu-dev
  emualtor: keep libopenjdkjvmti*.so on sdk images
  emulator: move rild.libpath to vendor
  sdk:enable emulator to launch in build environment
  build-emulator: fully treblize emulator image
  Build vendor image for emulator
2017-10-27 06:21:30 +00:00
Colin Cross
0239edea1d Merge changes I3bafbb2d,If30943ef
* changes:
  Desugar default methods if required
  Fix desugaring when LOCAL_SDK_VERSION is not set
2017-10-27 01:40:15 +00:00
bohu
813249bfdf emulator: squash misc modifications from oc-emu-dev
Change-Id: Ia6c3ff0805b88ef284524a4e6faa5615016b359c
Merged-In: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-10-26 16:45:05 -07:00
bohu
49415ab9b1 emualtor: keep libopenjdkjvmti*.so on sdk images
BUG: 38353037

Those libopenjdkjvmti*.so files are needed by profilers.
Those files are shipped on real devices as well.

Change-Id: I28dad25eb61da424dcf87ab1f17277df340f9124
Merged-In: Iac7dd2844b0f3ea5194dec8732fbaacf53c4bf4a
2017-10-26 16:45:05 -07:00
Yahan Zhou
3afe69d846 Build vendor image for emulator
BUG: 37511975

Test: lunch sdk_gphone_x86-user, make with dist option, unzip
sdk_gphone_x86-emulator-eng.xxxx.zip to system image folder, emulator
can boot

Change-Id: I330adc6da2999031d4ed2d8c4ade4667c1d0b511
Merged-In: I75b9f0de17fece3dec5ae1662400808af321bd4d
2017-10-26 16:45:05 -07:00
Colin Cross
5ea99d420b Desugar default methods if required
Desugar default methods if requested by LOCAL_MIN_SDK_VERSION < 26.
Also remove --desugar_try_with_resources_if_needed=false, it is no
longer necessary if we always proguard against frameworks.jar.
Fixes d8 issues when it sees unexpected default methods that dx
was passing through.

This reapplies I81796b452d5a70a951e175727953d4295ca32c0c after
If30943efcaea44b2db1b38a6c1d558113324757f.

Test: m checkbuild
Change-Id: I3bafbb2d63de2a6b50bc8c7ff40259b54d24f128
2017-10-26 13:09:07 -07:00
Colin Cross
98caed6e7f Fix desugaring when LOCAL_SDK_VERSION is not set
When LOCAL_SDK_VERSION is not set, frameworks.jar is put
in the classpath for javac.  If it is also in the classpath
(as opposed to the bootclasspath) for desugar then desugar
tries to rewrite classes that implement interfaces with
default methods to contain calls to the generated companion
classes for those interfaces.  frameworks.jar will not
contain the companion classes, which causes proguard to
fail.

Move frameworks.jar to the bootclasspath, which matches more
closely with builds against the SDK stubs jars.

Also remove the static libraries from the classpath, they have
already been merged into the input jar.

Test: m checkbuild
Change-Id: If30943efcaea44b2db1b38a6c1d558113324757f
2017-10-26 13:09:07 -07:00
Treehugger Robot
d1af74bd70 Merge "Check for module names in LOCAL_ADDITIONAL_DEPENDENCIES" 2017-10-26 17:32:28 +00:00
Dan Willemsen
0c821a9882 Check for module names in LOCAL_ADDITIONAL_DEPENDENCIES
If anything looks like a module name instead of a path (so if it doesn't
have a / in it), forbid it from being in LOCAL_ADDITIONAL_DEPENDENCIES.

Phony modules should not be dependencies, since they're never considered
clean, and will force rebuilds. It will also force installation when
we're only attempting to checkbuild. Most of the time
LOCAL_REQUIRED_MODULES should be used instead, which will trigger the
required modules to be installed if the local module is installed.

Bug: 68042065
Test: build/soong/build_test.bash on aosp and internal
Change-Id: I058ed6734d895eba3417b1d47c7f4a6b341bc137
2017-10-25 23:23:28 -07:00
Søren Gjesse
2f05802a78 Merge "Define proguard dictionary output for R8" 2017-10-26 06:08:43 +00:00
Treehugger Robot
fbe8759872 Merge "Skip instrumenting non-class files" 2017-10-26 02:50:01 +00:00
Jeff Gaston
6fdbdc86f6 Skip instrumenting non-class files
Jacoco normally recurses into .jar files, but we don't want it to.
Some .jar files may be intentionally corrupt test files.

Test: m -j showcommands dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false cts google-tradefed-all general-tests tests
Bug: 68056327
Change-Id: I1550e3acafd7cd9a65164742370e051d3eb3bf69
2017-10-25 16:36:05 -07:00
Colin Cross
4d85d55e09 Merge "Revert "Desugar default methods if required"" 2017-10-25 22:33:08 +00:00
Colin Cross
53aa02d2d2 Revert "Desugar default methods if required"
This reverts commit 6548d2a98d.

Reason for revert: broke apps build

Change-Id: Ibc503fa89b51e1f64f78cb6cee3e3ad7bbd8f2eb
2017-10-25 22:32:14 +00:00
Treehugger Robot
1f9af6e54a Merge "Install (vendor|system/vendor)/build.prop always" 2017-10-25 22:30:30 +00:00
Colin Cross
437bbed858 Merge changes I81796b45,Iaf585336
* changes:
  Desugar default methods if required
  Always raise proguard libraries
2017-10-25 21:44:18 +00:00
Jeff Gaston
e84fdb7b2d Consider empty LOCAL_JACK_COVERAGE_INCLUDE_FILTER to match everything
Test: m EMMA_INSTRUMENT=true
Bug: 68056327

Change-Id: I4af136490e572ba603d2a77f70e49d1feec1eb00
2017-10-25 20:16:43 +00:00
Jeff Gaston
f001a5097c Update a Turbine Jacoco check
Test: m EMMA_INSTRUMENT=true
Bug: 64308460
Change-Id: Idbfa58bdea178495e1f717043b908670fd4b15ed
2017-10-25 20:15:51 +00:00
Jeff Gaston
f88c967670 Merge "Make Jacoco exclusions relative to the current directory" 2017-10-25 19:16:22 +00:00
Søren Gjesse
4ab5b02e62 Define proguard dictionary output for R8
When running with R8 instead of Proguard + dx the proguard mapping is
produced together with the dex output.

Bug: 68249935
Test: m -j ahat-test
Change-Id: Ica5ef455eb3bd1eabe55c43e9e026f47cadace1c
2017-10-25 17:16:53 +02:00
Treehugger Robot
44e5fad30f Merge "Create product sysprops on vendor partition." 2017-10-25 08:57:14 +00:00
Jaekyun Seok
f9af5fa6ab Install (vendor|system/vendor)/build.prop always
For now, vendor build properties are added into /system/build.prop
when property split isn't enabled.
So we have the duplicate codes to add them to /system/build.prop and
/vendor/build.prop case by case.

But either /vendor/build.prop or /system/vendor/build.prop can exist
always.
So this CL will install $(TARGET_OUT_VENDOR)/build.prop always and
remove the duplication.

Bug: 68115808
Test: tested on aosp_x86-userdebug
Change-Id: Ic734418890629d011c733c2d8d14739275e64a78
2017-10-25 13:12:07 +09:00
Jeff Gaston
5dd3057526 Merge "Remove quoting of Jacoco exclusions" 2017-10-25 03:53:29 +00:00
Ryan Campbell
63fc0e681d Create product sysprops on vendor partition.
Duplicate essential product sysprops for manufacturer, model, brand, name, and device
from system on vendor so that mixed builds (vendor.img + GSI system.img) have correct
product information in their CTS/VTS reports.

Test: make
Bug: 64458205
Merged-In: Ib63b37772be493b9e035d9b7e8c5e2cf66f2fa8c
Change-Id: Ib63b37772be493b9e035d9b7e8c5e2cf66f2fa8c
(cherry picked from commit aea0f92ff3)
2017-10-25 11:35:14 +09:00
Sandeep Patil
127f501287 build: fix builds when first_api_level isn't defined as property
Bug: 67965044
Test: Build pixel
Merged-In: I4bce5a4f4d0751a30bf7abda0da5e7d73313c9ef
Change-Id: I4bce5a4f4d0751a30bf7abda0da5e7d73313c9ef
Signed-off-by: Sandeep Patil <sspatil@google.com>
(cherry picked from commit b79196f0ca)
2017-10-25 07:27:09 +09:00
Steven Moreland
ec082650a1 Move ro.product.first_api_level to vendor/build.prop
Shipping API level is associated with the vendor image. When
a device ships in, say, O and is then run against the O-MR1
GSI image, the shipping API level is currently reported as
the shipping API level which the GSI was built with. This means
that various tests and control flows assume that the image
is the newest possible image. However, this is not the case.

Bug: 67965044
Test: boot on pixel
Merged-In: If18cc99e2599957d88860e0902a99ff3f67e5fd8
Change-Id: If18cc99e2599957d88860e0902a99ff3f67e5fd8
(cherry picked from commit 9411f9b4dc)
2017-10-25 07:26:56 +09:00
Colin Cross
6548d2a98d Desugar default methods if required
Desugar default methods if requested by LOCAL_MIN_SDK_VERSION < 26.
Also remove --desugar_try_with_resources_if_needed=false, it is no
longer necessary if we always proguard against frameworks.jar.
Fixes d8 issues when it sees unexpected default methods that dx
was passing through.

Test: m checkbuild
Change-Id: I81796b452d5a70a951e175727953d4295ca32c0c
2017-10-24 13:29:36 -07:00
Colin Cross
b5f25a257f Always raise proguard libraries
The platform build system doesn't have the concept of a "compile sdk
version", it uses the "min sdk version" throughout the compilation
process.  This means that no stage of the compilation process can
introduce references to APIs that do not exist in the selected
LOCAL_MIN_SDK_VERSION without causing problems.  Support library
worked around this by effectively making the "compile sdk version"
"current" when running proguard if support library was in the direct
dependency list.

Extend the support library hack everywhere, and always use "current"
or the full bootclasspath when running proguard.

Test: m checkbuild
Change-Id: Iaf5853361767f0ea3e9ad4ec908aadd72d639c79
2017-10-24 13:29:36 -07:00
Jeff Gaston
8fcf6a4846 Make Jacoco exclusions relative to the current directory
Test: m EMMA_INSTRUMENT=true
Bug: 68056327
Change-Id: Ia6bf1cf78920107404fed4cbd8259d4442b04755
2017-10-24 12:34:38 -07:00
Jeff Gaston
b64f70557a Remove quoting of Jacoco exclusions
So that "*" works again

Test: m EMMA_INSTRUMENT=true
Bug: 68056327

Change-Id: Ieaad8bfbdeb0562910e6027682663049b0187c5e
2017-10-24 12:34:38 -07:00
Søren Gjesse
6836c47b8b Merge "Added support for using R8 instead of Proguard + dx"
am: 9047dce212

Change-Id: Ibf7489aa1af1b2ae5fc5540b3eceec0c4a67a32b
2017-10-24 06:45:36 +00:00