Commit graph

1274 commits

Author SHA1 Message Date
Paul Duffin
065000e3f5 Merge "Never allow java_library_host with no_standard_libs: true" am: 393590d8a8
am: 3321670746

Change-Id: Iebd7f4cd4979860ea1b2f9433373546c114d2160
2019-06-13 00:17:11 -07:00
Paul Duffin
a14f280cb0 Merge "Allow java_test.go tests to use any Android.bp file" am: 45656aacab
am: e6cb60da57

Change-Id: I0fedcef906e6e59e004115d421df1a152348a02c
2019-06-13 00:16:57 -07:00
Paul Duffin
ee9d72d0c8 Merge "Add test for no_framework_libs:true" am: 5b775ae8b4
am: c064604439

Change-Id: I55673fa177754b1d44e5d3d4802e2c64e11a7098
2019-06-13 00:16:42 -07:00
Paul Duffin
393590d8a8 Merge "Never allow java_library_host with no_standard_libs: true" 2019-06-13 06:57:19 +00:00
Paul Duffin
45656aacab Merge "Allow java_test.go tests to use any Android.bp file" 2019-06-13 06:56:56 +00:00
Paul Duffin
5b775ae8b4 Merge "Add test for no_framework_libs:true" 2019-06-13 06:56:25 +00:00
Colin Cross
ce051256f8 Merge changes I89ad92f3,Ife1604c0 am: e51e2feafd
am: 4fb5563c20

Change-Id: Ib4c518190bc28f0d67469f9dcdc6d2b72e64072c
2019-06-12 21:06:54 -07:00
Colin Cross
e51e2feafd Merge changes I89ad92f3,Ife1604c0
* changes:
  Don't add dependencies on uses-library modules in unbundled builds
  Add implicit outputs to ErrorRule rules
2019-06-13 03:36:08 +00:00
Colin Cross
31de2eaf51 Merge changes Ia17b2bcb,Ic71892c3,Id2b23b9e,I435ee7aa,I85112506, ... am: 72ea641dff
am: 98a6f300fa

Change-Id: I84683c2204afb5792ec11e2c608dca288e9431ec
2019-06-12 13:52:07 -07:00
Colin Cross
3245b2cb83 Don't add dependencies on uses-library modules in unbundled builds
Unbundled builds may not have definitions of shared libraries, and
they are not dexpreopted so the dependencies are not used anyways.

Test: manual
Change-Id: I89ad92f3b073422734f824ac3a8a3b9baf995ccb
2019-06-12 20:20:21 +00:00
Colin Cross
72ea641dff Merge changes Ia17b2bcb,Ic71892c3,Id2b23b9e,I435ee7aa,I85112506, ...
* changes:
  Consolidate *MutatorContext and ModuleContext into BaseModuleContext
  Add test for missing defaults modules with AllowMissingDependencies
  Capture missing dependency error rules
  Share buildDir for android/soong/android tests
  Reimplement AddMissingDependencies
  Add GenerateAndroidBuildActions to DefaultsModuleBase
2019-06-12 20:19:55 +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
Alexander Smundak
90aa101152 Merge "Tune JVM, print full diagnostics on crash." 2019-06-12 15:33:06 +00:00
Paul Duffin
b815ada8c0 Never allow java_library_host with no_standard_libs: true
This combination makes no sense.

Bug: 134566750
Test: m droid
Change-Id: Ib37bbac165395c003d23225e0469ba60fa6a56ea
2019-06-12 14:08:13 +01:00
Paul Duffin
baccf7e122 Allow java_test.go tests to use any Android.bp file
Previously, the tests had to use the Android.bp file in the root
directory of the mock file system. That prevented adding tests that are
dependent on the location of the Android.bp file, e.g. ones that use
no_standard_libs. This change will process any Android.bp in the mock
filesystem.

Bug: 134566750
Test: m
Change-Id: I6fb057a473a18e87bd1a89507e78ceb3fd171eb5
2019-06-12 14:08:13 +01:00
Paul Duffin
fad7980075 Add test for no_framework_libs:true
Bug: 134566750
Test: m droid
Change-Id: Ie3c5c0730d4505c7932952eb20b5ccafd806a73a
2019-06-12 14:08:13 +01:00
Paul Duffin
eb872e1a90 Remove unnecessary use of sdk_version: "core_current" am: b826a2f269
am: 9ec3254d13

Change-Id: I616493b78c283976a5eee06a304e8aaa5050d0fc
2019-06-12 03:11:59 -07:00
Paul Duffin
b826a2f269 Remove unnecessary use of sdk_version: "core_current"
Modules that specify no_standard_libs: true should not specify the
sdk_version property as well because the former supercedes the latter.

Bug: 134566750
Test: m
Change-Id: I1d8663dc3a25baf23a1b136c7f35cf130cd7543b
2019-06-12 10:50:24 +01: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
Pete Gillin
dac578df15 Merge "Don't specify -encoding twice in Jdiff javadoc invocations." am: a53ae43180
am: 071d0d6799

Change-Id: Idb949aba99ca1aaae7bd10bb713b43d2d0669777
2019-06-11 04:36:42 -07:00
Pete Gillin
a53ae43180 Merge "Don't specify -encoding twice in Jdiff javadoc invocations." 2019-06-11 11:21:37 +00:00
Dan Willemsen
7488174f2c Merge "Refactor .aar resource compilation" am: 588857b418
am: 2758050dc4

Change-Id: I98dfbdbef71972a040fd53f9e77eb321fb6f5e0e
2019-06-10 21:16:55 -07:00
Treehugger Robot
588857b418 Merge "Refactor .aar resource compilation" 2019-06-11 04:03:51 +00:00
Colin Cross
59037628f4 Add GenerateAndroidBuildActions to DefaultsModuleBase
Add an empty GenerateAndroidBuildActiosn to DefaultsModuleBase
so that every defaults module doesn't need to provide one.  This
will also allow adding an implementation in the next patch.

Test: m checkbuild
Change-Id: I13554bdb3a287c2f18e1efab74d4f08a1ba8620c
2019-06-10 13:51:17 -07:00
Colin Cross
9d5d72f7a6 Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a am: a6bf56d4be
am: 236ac108f5

Change-Id: Ia0777130add15aceb17739f5dcb613ca4e1bf172
2019-06-10 10:00:33 -07:00
Colin Cross
a6bf56d4be Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a
* changes:
  Consolidate *MutatorContext and ModuleContext into BaseModuleContext
  Consolidate baseContext, BaseContext, and BaseModuleContext
  Rename ModuleBase receivers
  Remove repetition in android package names
2019-06-10 16:38:11 +00:00
Pete Gillin
2b1ea2edb3 Don't specify -encoding twice in Jdiff javadoc invocations.
The option '-encoding UTF-8' is included in the opts defined at L1754,
which are passed to transformJdiff (defined at L1594), and from there
to a javadoc rule (defined at L29), where they are included in a
command line string which already has '-encoding UTF-8' in it. The
result is that this appears twice in the command line. This is
apparently ignored by the version of javadoc currently used. Later
upstream versions of javadoc, however, fail with the error 'javadoc:
error - The -encoding option may be specified no more than once.'

Test: make system-api-stubs-docs
Test: make system-api-stubs-docs, using an OpenJDK 11 toolchain via OVERRIDE_ANDROID_JAVA_HOME
Bug: 131683177
Change-Id: Ib9382ada3c8259edfacb2be3ab14d4c09d8753a7
2019-06-10 14:37:41 +01:00
Pete Gillin
24312aff67 Merge "Disable the system-modules plugin for jlink invocations." am: 14bb14e0c3
am: 8db09b5fff

Change-Id: Ib2c2474df19faf813f21fcda1309eb59356aaf2d
2019-06-07 03:47:41 -07:00
Pete Gillin
14bb14e0c3 Merge "Disable the system-modules plugin for jlink invocations." 2019-06-07 10:35:56 +00:00
Colin Cross
0ea8ba82fc Consolidate baseContext, BaseContext, and BaseModuleContext
blueprint.BaseModuleContext is the set of methods available to all
module-specific calls (GenerateBuildActions or mutators).  The
android package split the same functionality across baseContext (nee
androidBaseContext), BaseModuleContext, and BaseContext.
Consolidate all of them into android.BaseModuleContext.

Test: m checkbuild
Change-Id: I2d7f5c56fd4424032cb93edff6dc730ff33e4f1e
2019-06-06 20:01:31 -07:00
Pete Gillin
4eb6be32f6 Disable the system-modules plugin for jlink invocations.
This jlink plugin is intended to optimise startup times for Java
runtimes by embedding a pre-processed and pre-validated module graph
in the system image.

This provides no benefit on Android, since the Android runtime does
not make use of the module graph it produces. (It doesn't seem useful
on Android anyway, since the system image only contains one module,
namely java.base.)

Furthermore, the plugin causes the jlink invocation to fail when using
the jlink tool from OpenJDK 11. The issue here is the plugin uses
classes in the jdk.internal.module package to describe the module
graph; that package is not part of libcore and therefore not listed in
the module-info.java for java.base on Android; but the plugin has the
side-effect of adding the package to java.base; this causes jlink to
subsequently fail with an error "Module java.base's descriptor
indicates the set of packages is : <lots of packages>, but module
contains packages: <same packages plus jdk.internal.module>". (The
implementation of the plugin changed significantly in OpenJDK 10,
which is presumably why this issue does not occur using OpenJDK 9's
jlink.)

Therefore, it is safe and beneficial to disable the plugin.

Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make core-all-system-modules, using an OpenJDK 11 toolchain via OVERRIDE_ANDROID_JAVA_HOME and changing the jmod create invocation to use --module-version 11
Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make droid, flash to device & sanity check
Bug: 131683177
Change-Id: I52333f32c88aa85cd3652ad91d50d9927ff61daf
2019-06-06 18:59:46 +01:00
Neil Fuller
d2748ca146 Merge "Use correct system_modules with core.current.stubs" am: 6d376a0de8
am: c9d38ec5e0

Change-Id: Id00fd788879e6fc5f5146925161d10d2a1989ab9
2019-06-06 09:18:02 -07:00
Treehugger Robot
6d376a0de8 Merge "Use correct system_modules with core.current.stubs" 2019-06-06 16:05:16 +00:00
Jaewoong Jung
c0ed71ccf8 Merge "Touch up manifest if there's no source code." am: 96eac767df
am: c831a0a895

Change-Id: I19cba0c3017eff6f309dae04aacdb7e0aee1613d
2019-06-06 07:18:38 -07:00
Jaewoong Jung
96eac767df Merge "Touch up manifest if there's no source code." 2019-06-06 13:52:37 +00:00
Neil Fuller
ba88c41274 Use correct system_modules with core.current.stubs
The system_modules defn used with core.current.stubs
was core-system-modules which doesn't match. Instead,
this change uses core-current-stubs-system-modules.

Test: build
Change-Id: Ifb9e77b02bbb04c1cb39c6b9f97932c20d44d8ba
2019-06-06 14:15:00 +01:00
Jaewoong Jung
6a98d5d59b Merge "android_app stl property bug fix" am: 4f67c42d76
am: 58d0f0cf69

Change-Id: Ic14f463f27b8413e0d4960658c41407763d79ba6
2019-06-05 13:47:32 -07:00
Jaewoong Jung
4f67c42d76 Merge "android_app stl property bug fix" 2019-06-05 20:16:13 +00:00
Colin Cross
f6a2a5b960 Merge "Add .jar tag to java modules" am: ac1d267368
am: edff7ed8da

Change-Id: I19059e05178a72ef07e205e97e528fe9f74c41b2
2019-06-05 12:58:50 -07:00
Colin Cross
d6e75e4ef9 Merge "Support tagged module references" am: b4c35f3378
am: a360b2b335

Change-Id: I61cff6302236ed5c67b86682563eaeae9d0e3363
2019-06-05 10:34:40 -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
Jaewoong Jung
710756a6ff android_app stl property bug fix
When it is set to c++_shared, the added dependency should be
libc++_shared, not libc++.

Fixes: 130891985
Test: app_test.go, atest 'CtsNdkBinderTestCases' w/ conversion CL
Change-Id: I0e50e0d5bf511aa6e52d16cd715a185721011255
2019-06-04 12:36:00 -07:00
Colin Cross
375ca3c680 Add .jar tag to java modules
Allow java modules to be referenced as ":module{.jar}" to get
the classes .jar.

Bug: 122333007
Test: m checkbuild
Change-Id: I2d07f774ae8ed5a39206059c4102727c6802d26e
2019-06-04 10:22:55 -07:00
Colin Cross
41955e8895 Support tagged module references
There are cases where a module needs to refer to an intermediate
output of another module instead of its final output.  For example,
a module may want to use the .jar containing .class files from
another module whose final output is a .jar containing classes.dex
files.  Support a new ":module{.tag}" format in any property that
is annotated with `android:"path"`, which will query the target
module for its ".tag" output(s).

Test: path_properties_test.go, paths_test.go
Test: no unexpected changes in build.ninja
Change-Id: Icd3c9b0d83ff125771767c04046fcffb9fc3f65a
2019-06-04 10:22:51 -07:00
Treehugger Robot
22d3d6ba5c Merge "Revert "Revert "Print full diagnostics file when Java process crashes.""" 2019-06-04 17:16:10 +00:00
Jaewoong Jung
c27ab6678b Touch up manifest if there's no source code.
The new package manager behavior requires packages without source code
to have an application element with hasCode attribute set to false in
their manifest. With this change, Soong can now automatically insert one
for codeless apps.

Test: app_test.go, manifest_fixer_test.py
Fixes: 124375490
Change-Id: Ied89a8d07c63805ab910859a4f7c45fc1c60bb73
2019-06-03 10:51:42 -07: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