Commit graph

160 commits

Author SHA1 Message Date
evitayan
996c18c78a Update ike.jar's name in code coverage configuration
ike has been renamed to android.net.ipsec.ike. This commit applies
this name updates to the code coverage configuration.

Bug: 148625578
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false android.net.ipsec.ike.com.android.ipsec_intermediates/ contains jacoco-report-classes.jar
Change-Id: Ic46a1091899eb5bc9560739ec86a9bea08585075
Merged-In: Ic46a1091899eb5bc9560739ec86a9bea08585075
(cherry picked from commit 2e5606736f)
2020-02-25 00:47:30 -08:00
Automerger Merge Worker
1bf59ab8ab Merge "Add support for experimentally enabling RBE support on specific rules." am: 5e0dbe4e3e am: 205edb5da3 am: a171ec4e95
Change-Id: I2922a3dd955162fa9f713ebfe9fe1852d76fd2c3
2020-01-28 20:31:14 +00:00
Ramy Medhat
8ea054a81e Add support for experimentally enabling RBE support on specific rules.
This CL adds RBE support to javac, r8, and d8 rules which is only
enabled if respective environment variables are set.

Test: an aosp_crosshatch build with and without the new variables.
Change-Id: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
2020-01-28 12:42:47 -05:00
Anton Hansson
91133e6e44 Add framework-sdkextensions to jars to instrument
Required to get code coverage.

Bug: 143937446
Test: verify LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR is set
      for framework-sdkextensions
Change-Id: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
Merged-In: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
(cherry picked from commit 9492b09dae)
2020-01-17 09:57:52 +00:00
Anton Hansson
9492b09dae Add framework-sdkextensions to jars to instrument
Required to get code coverage.

Bug: 143937446
Test: verify LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR is set
      for framework-sdkextensions
Change-Id: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
2020-01-17 09:56:37 +00:00
Jeff Sharkey
38338a951d Move MediaStore.java inside APEX boundary.
Recent work has paved the way to get MediaStore.java building against
"core_platform", and this change is actually shifting MediaStore.java
inside the MediaProvider APEX boundary.

This involves defining a new "updatable-mediaprovider" library JAR
and ensuring that it's spliced into classpaths where needed to keep
everything building and working.

Note that the MediaProvider APK itself is still bundled, so we're
manually including the MediaStore.java when building that APK so that
we can continue referencing @hide symbols, but there's a STOPSHIP
comment to remove that once we get the APK building against
"system_current".

Bug: 144247087
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I6d6da165848b934f4ca7ecfca7b97de6f97897e3
2019-12-19 22:16:04 +00:00
Jiyong Park
231d056d50 Add updatable_media_stub to framework
The module framework is now a build-only library whose purpose is to
provide hidden APIs from the non-updatable part of the platform and APIs
from the modules. Merging updatable_media_stub to framework, like the
stub libraries from other modules.

As a result, updatable_media_stub can be removed from DefaultLibraries.

Bug: N/A
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: I7f80716119ad6ac627e5666def9fe17112dcde3b
(cherry picked from commit 4c258d282b)
Change-Id: I7f80716119ad6ac627e5666def9fe17112dcde3b
2019-12-19 11:57:47 +09:00
Jiyong Park
4c258d282b Add updatable_media_stub to framework
The module framework is now a build-only library whose purpose is to
provide hidden APIs from the non-updatable part of the platform and APIs
from the modules. Merging updatable_media_stub to framework, like the
stub libraries from other modules.

As a result, updatable_media_stub can be removed from DefaultLibraries.

Bug: N/A
Test: m
Change-Id: I7f80716119ad6ac627e5666def9fe17112dcde3b
2019-12-18 17:28:17 +09:00
Automerger Merge Worker
e2e6c72cd7 Merge "Enable covergae for ike.jar which will be in mainline module IPsec(IKE)" am: fa2ac9f6e9 am: abd4fde926 am: d04d769639
Change-Id: I891237f0e8cedba332a8fd1ef5789d1a92632ce6
2019-12-18 01:41:09 +00:00
evitayan
13b0d51ffb Enable covergae for ike.jar which will be in mainline module IPsec(IKE)
Enable jacoco for ike.jar to set up code coverage. ike will be
shipped in mainline module com.android.ipsec

Bug: 146012420
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false
Change-Id: I886551d980c0d9651b11c80051f17609bb3531d8
2019-12-17 15:23:38 -08:00
Martin Stjernholm
213d6533cc Merge "Move/dedupe some host path functions in package_ctx.go." am: 455e3a089d am: 47a7da1485
am: 1c0a6ebb26

Change-Id: I72f384073fff467ba53a8dea9422b4296605bb26
2019-12-09 16:14:37 -08:00
Martin Stjernholm
7260d066ea Move/dedupe some host path functions in package_ctx.go.
These functions don't need a PackageContext object.

Test: m
Bug: 145934348
Change-Id: Ia1da2c76cbad292f9ca79617199b2b5b6b265568
2019-12-09 22:04:21 +00:00
Pete Gillin
1209d7ebbc Merge changes I0d679648,I31542e7f am: 31d57588c9 am: 6414dde54e
am: 176de85374

Change-Id: I06ce4efde1122b79b757cef2985ac4ecabad80a6
2019-11-11 10:28:06 -08:00
Pete Gillin
a7a3d64a36 Remove the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN option.
Previously, this setting environment variable to false reverted to an
OpenJDK 9 toolchain. This change removes that option.

Test: m core-all-system-modules
Test: zcat out/verbose.log.gz | grep 'prebuilts/jdk/jdk[0-9]*'
Test: EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=false m core-all-system-modules (fails)
Bug: 131683177
Change-Id: I0d679648e1236925ce3ef7e1652379127e846b00
2019-11-11 11:03:58 +00:00
Pete Gillin
a2affbbb00 Add a new option OVERRIDE_JLINK_VERSION_NUMBER.
This is a counterpart to the existing OVERRIDE_ANDROID_JAVA_HOME,
which is not very useful by itself in a Java module world. All jlink
commands will fail if a user sets OVERRIDE_ANDROID_JAVA_HOME without
setting OVERRIDE_JLINK_VERSION_NUMBER to the corresponding value
(unless they happen to be specifying a different OpenJDK 11
toolchain).

Test: OVERRIDE_ANDROID_JAVA_HOME=my-jdk10 OVERRIDE_JLINK_VERSION_NUMBER=10 m core-all-system-modules (with an OpenJDK 10 toolchain symlinked at my-jdk10 just for testing)
Test: zcat out/verbose.log.gz | grep 'jmod create'
Bug: 131683177
Change-Id: I31542e7f46303bba538d998171a3efe6d0215c7b
2019-11-08 12:34:07 +00:00
Allen Hair
74cd286e42 Instrument framework-minus-apex for coverage.
After ag/9580351, the framework classes are produced by the
framework-minus-apex module instead. Update the
InstrumentFrameworkModules list to include framework-minus-apex so the
framework classes are instrumented by the coverage build.

Bug: 144105776
Test: ./build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true TARGET_PRODUCT=cf_x86_phone TARGET_BUILD_VARIANT=userdebug droid dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true NATIVE_COVERAGE=true SKIP_BOOT_JARS_CHECK=true
Change-Id: I26b5f4df4a61d2264d9e177941aed4ca85baa90d
2019-11-07 15:09:15 -08:00
Pete Gillin
abbcddaaf4 Switch to an OpenJDK 11 toolchain by default.
Prior to this change, the default was to use and OpenJDK 9 toolchain,
with the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true environment
variable available to opt into OpenJDK 11. After this change, the
default is to use OpenJDK 11, with
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=false available to opt out.

This change affects:
 - The version of javac used.
 - The version of javadoc used.
 - The version of other tools used during the build process (e.g. jar,
   jmod, and jlink).
 - For Java bytecode executed on the host, the version of the java
   executable used, and so the versions of the JVM and the OpenJDK
   libraries in the system module (or bootclasspath).

This change does not affect:
 - The Java language level, i.e. the version of Java expected in
   source code (the -source option to javac) or the version of Java
   bytecode produced (the -target option to javac).
 - Anything to do with code execution on the device.

Bug: 131683177
Test: make java droid docs cts tests
Test: zcat out/verbose.log.gz | grep 'prebuilts/jdk/jdk[0-9]*'
Test: make RunBluetoothRoboTests RunCarSettingsLibRoboTests
Test: cts-tradefed help
Test: atest CtsHostTzDataTests
Test: atest CtsLibcoreTestCases
Change-Id: I09dc22f1af4d1f2d7d3b85c08cb0ed9a1105aaca
Merged-In: Iaae89ef25c92ec099575c026fc50e41da4e143e8
2019-11-05 11:33:58 +00:00
Pete Gillin
4fd368316e Switch to an OpenJDK 11 toolchain by default.
Prior to this change, the default was to use and OpenJDK 9 toolchain,
with the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true environment
variable available to opt into OpenJDK 11. After this change, the
default is to use OpenJDK 11, with
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=false available to opt out.

This change affects:
 - The version of javac used.
 - The version of javadoc used.
 - The version of other tools used during the build process (e.g. jar,
   jmod, and jlink).
 - For Java bytecode executed on the host, the version of the java
   executable used, and so the versions of the JVM and the OpenJDK
   libraries in the system module (or bootclasspath).

This change does not affect:
 - The Java language level, i.e. the version of Java expected in
   source code (the -source option to javac) or the version of Java
   bytecode produced (the -target option to javac).
 - Anything to do with code execution on the device.

Bug: 131683177
Test: make java droid docs cts tests
Test: zcat out/verbose.log.gz | grep 'prebuilts/jdk/jdk[0-9]*'
Test: make RunBluetoothRoboTests RunCarSettingsLibRoboTests
Test: cts-tradefed help
Test: atest CtsHostTzDataTests
Test: atest CtsLibcoreTestCases
Change-Id: Iaae89ef25c92ec099575c026fc50e41da4e143e8
2019-11-01 14:46:58 +00:00
Pete Gillin
a1c9e9da55 Remove support for EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9.
Prior to this change, setting that to "false" turned the default Java
language level back to 8. This change removes that option.

Bug: 115604102
Test: m java droid docs tests cts
Change-Id: I97bfd0dc8d941008b4071c6efe1c0c24950c4f1f
2019-10-25 16:55:06 +01:00
Pete Gillin
1f52e93db2 Add experimental option to use OpenJDK 11 toolchain.
With this change, setting the environment variable
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true switches from the OpenJDK 9
toolchain to the OpenJDK 11 one (prebuilts/jdk/jdk11).

Since the version of the java.base module has to match the version of
the jlink tool which consumes it, the --module-version argument to the
jmod create call is also switched.

Test: make
Test: EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN make
Bug: 131683177
Change-Id: I606d22538165f309fe5537bd67a26390b1dd5771
2019-10-09 18:38:14 +01:00
Colin Cross
6617b6d624 Merge "Use prebuilts for more tools in unbundled builds" 2019-09-09 17:21:44 +00:00
vichang
adf1a128b0 Merge "Add new core-icu4j after separating icu4j from core-libart"
am: dfee9b4364

Change-Id: Ia46581e56d89d19e06511f9df6eedf8a5ea0d785
2019-08-12 09:11:38 -07:00
Colin Cross
bdf9514e45 Use prebuilts for more tools in unbundled builds
Move the logic from Make that uses prebuilts for more tools for
unbundled builds, and export the values back to make.

Test: m checkbuild
Change-Id: I8c7031e0feaa9328a2b73db6dc8e63e12d1d12f7
2019-08-08 12:56:34 -07:00
Victor Chang
07b5b4cdb8 Add new core-icu4j after separating icu4j from core-libart
Bug: 138994281
Test: m droid
Change-Id: I1e9fe3e344dcdde14fe4880a19440c5085c092e5
2019-08-08 16:02:02 +01:00
Sasha Smundak
61272795a7 Merge "Support source code cross-referencing for C++ and Java"
am: 247de68b89

Change-Id: I5284d9be9865e95671ce8ec1927f74059f7fdf44
2019-07-29 18:13:05 -07:00
Sasha Smundak
2a4549ec98 Support source code cross-referencing for C++ and Java
Use Kythe (https://kythe.io) to build cross reference for the Android
source code. ~generate the input for it during the build. This is done
on demand: if XREF_CORPUS environment variable is set, build emits a
Ninja rule to generate Kythe input for each compilation rule. It
also emits two consolidation rules (`xref_cxx` and `xref_java`),
that depend on all Kythe input generation rules for C++ and Java.

The value of the XREF_CORPUS environment variable is recorded in the
generated files and thus passed to Kythe. For the AOSP master branch it is
`android.googlesource.com/platform/superproject`, so the command to build
all input for Kythe on that branch is:
```
XREF_CORPUS=android.googlesource.com/platform/superproject m xref_cxx xref_java
```

Each Kythe input generation rule generates a single file with .kzip
extension. Individual .kzip files have a lot of common information, so
there will be a post-build consolidation step run to combine them.
The consolidated .kzip file is then passed to Kythe backend.

The tools to generate .kzip files are provided by Kythe (it calls them
'extractors'). We are going to build them in toolbuilding branches
(clang-tools and build-tools) and check them in as binaries into master
and other PDK branches:
For C++,  `prebuilts/clang-tools/linux-x86/bin/cxx_extractor`
for Java, `prebuilts/build-tools/common/framework/javac_extractor.jar`

Bug: 121267023
Test: 1) When XREF_CORPUS is set, build generates Ninja rules to create
.kzip files; 2) When XREF_CORPUS is set, building
`xref_cxx`/`xref_java` creates .kzip files; 3) Unless XREF_CORPUS is
set, build generates the same Ninja rules as before

Change-Id: If957b35d7abc82dbfbb3665980e7c34afe7c789e
2019-07-26 09:16:47 -07:00
Colin Cross
a373a94fc0 Merge changes Ic2a585ea,I11ccabc4,Icc932c4a,I020556c7,I08713e91
am: ed9a92c311

Change-Id: I0367335939181566063b777184e864a7afb02308
2019-07-22 14:04:58 -07:00
Colin Cross
33961b54e6 Convert droidstubs to android.RuleBuilder
The droiddoc rules are ripe for converting to android.RuleBuilder,
they conditionally use many input files which is hard to track
with the standard blueprint.Rule style, as the argument and the
dependency have to be handled independently.  Start converting
to android.RuleBuilder by converting the droidstubs module.

Test: m docs
Test: m checkapi
Test: m updateapi
Change-Id: I08713e91149471e88a40115f69824cf5eaf88fb6
2019-07-18 14:28:14 -07:00
Sasha Smundak
e26ae3f2bf Merge "Tune invocations and print full diagnostics on crash for d8 and r8."
am: a89cf59a4f

Change-Id: I9afd4b5af3119e57bbd21ed1e42c340ca35d1962
2019-07-10 13:45:01 -07:00
Sasha Smundak
ee5c60384f Tune invocations and print full diagnostics on crash for d8 and r8.
Bug: 132766811
Test: treehugger
Change-Id: Id6943008e65b9dc3479e8758445e8d679529a8cb
2019-07-09 11:26:20 -07:00
Dan Willemsen
ebb0478869 Merge changes If25be604,I0a310229,I44155630 am: 42d33779cd
am: f32716e448

Change-Id: I08a9a38e59896cbec930d6087f96eaa9b327d4cc
2019-06-14 01:29:49 -07:00
Treehugger Robot
42d33779cd Merge changes If25be604,I0a310229,I44155630
* changes:
  Add another jar used by kotlinc
  Actually depend on the headers from renderscript
  Fix a few missing dependencies in APEX building
2019-06-13 17:40:01 +00:00
Dan Willemsen
1cfbdbe1b2 Add another jar used by kotlinc
Bug: 130111713
Test: treehugger
Change-Id: If25be6047625cec4ed9802142876cfd8e9ccd3eb
2019-06-13 05:22:03 +00:00
Alexander Smundak
c98ec46440 Merge "Tune JVM, print full diagnostics on crash." am: 90aa101152
am: 8975b8f376

Change-Id: I85865160062d8ced76a239e9e5becbeff92227c9
2019-06-12 09:06:07 -07:00
Sasha Smundak
26c6d9e9fb Tune JVM, print full diagnostics on crash.
JVM occasionally (0.5% time) crashes on entering a method with SIGSEGV.
It might be due to excessive load on the host machine. Reduce the number
of the compiler threads to 6, and do not start all the GC threads
immediately. If JVM crashes, copy full diagnostics to stderr.

Bug: 132766811
Test: treehugger
Change-Id: Ib7bfd568f6d32456bf623cbb615ffc990c326a34
2019-06-11 13:30:13 -07:00
Jimmy Chen
cc4923a063 Merge "Revert "Revert "Revert "Print full diagnostics file when Java process crashes."""" am: 7c9689f7b7
am: 3e0d465e8b

Change-Id: I378ddb41a37ef4274b11e97823e4495cf0536480
2019-06-05 03:17:18 -07:00
Treehugger Robot
7c9689f7b7 Merge "Revert "Revert "Revert "Print full diagnostics file when Java process crashes."""" 2019-06-05 09:53:22 +00:00
Jimmy Chen
e88eaa7db7 Revert "Revert "Revert "Print full diagnostics file when Java process crashes."""
This reverts commit b4be092855.

Reason for revert: break build

Change-Id: I11fc5eb5f635a5d99eba962f5817851629e50ab2
2019-06-05 06:47:11 +00:00
Alexander Smundak
8d08aa2cdc Merge "Revert "Revert "Print full diagnostics file when Java process crashes.""" am: 22d3d6ba5c
am: 439ef91ee5

Change-Id: Ibd71d3e71449330b3cdd3d9505eeea0c8bf0f9cc
2019-06-04 17:51:29 -07:00
Treehugger Robot
22d3d6ba5c Merge "Revert "Revert "Print full diagnostics file when Java process crashes.""" 2019-06-04 17:16:10 +00:00
Alexander Smundak
b4be092855 Revert "Revert "Print full diagnostics file when Java process crashes.""
This reverts commit d71dc6b5e0.

Reason for revert: ag/974065 fixes the problem that caused the revert

Change-Id: I3ba9eecdab34602aaf19fa518520ac932c9b97af
2019-06-03 16:53:22 +00:00
Alexander Smundak
2ca7d3ca58 Merge "Revert "Print full diagnostics file when Java process crashes."" am: d5dd534465
am: 62459d6586

Change-Id: Ibd9278cfcf0f20e3188da07d2cc6e61eb5bba50f
2019-05-31 02:56:34 -07:00
Treehugger Robot
d5dd534465 Merge "Revert "Print full diagnostics file when Java process crashes."" 2019-05-31 09:37:36 +00:00
Alexander Smundak
d71dc6b5e0 Revert "Print full diagnostics file when Java process crashes."
This reverts commit 9d6df2246c.

Reason for revert: This change set the value of JAVA make variable to a string containing "foo bar". When soong_ui is asked to evaluate such string, it drops the quotes, causing bash to treat 'foo' and 'bar' as separate command line arguments.

Change-Id: If4e3c4c950c305bb67a572de3d86119c2da81dc1
2019-05-31 03:15:55 +00:00
Sasha Smundak
9040ad7d49 Merge "Print full diagnostics file when Java process crashes." am: 7b1ca80579
am: 534d99369c

Change-Id: If3406f23f2f8048ed0872fd1b071fac31b138ec3
2019-05-30 14:43:10 -07:00
Treehugger Robot
7b1ca80579 Merge "Print full diagnostics file when Java process crashes." 2019-05-30 21:16:52 +00:00
Sasha Smundak
9d6df2246c Print full diagnostics file when Java process crashes.
Bug: 132766811
Test: treehugger
Change-Id: I8cca2486f2194a8643007a53e4a695d2a18abbf8
2019-05-29 17:46:22 -07:00
Colin Cross
67999a12d5 Merge changes If15abf79,Iaae177ef am: ff3f43857f
am: 45cc967424

Change-Id: I4b322e79f5177131cd35ae7b943a008fa26c95e2
2019-05-28 09:58:26 -07:00
Colin Cross
7211910fd0 Add manifest_check tool
Add a tool that can check that the <uses-library> tags in an
AndroidManifest.xml file match a list provided by the build.

Bug: 132357300
Test: manifest_check_test
Change-Id: If15abf792282bef677469595e80f19923b87ab62
2019-05-24 13:43:27 -07:00
Colin Cross
4af387c20e Move manifest_fixer to a python_binary_host module
In preparation for making it use multiple files so that some
implementation can be shared with a new tool.

Also make manifest_fixer_test a python_test_host, and add it
to TEST_MAPPING.

Test: m checkbuild
Change-Id: Iaae177efcb978187b126d90359b82cdfd3176857
2019-05-24 13:43:19 -07:00