Commit graph

16167 commits

Author SHA1 Message Date
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
Martin Stjernholm
3980ced987 Merge "Revert submission of topic 'libdl_android-in-apex'" 2019-11-08 11:51:39 +00:00
Paul Duffin
13a9dd604b Remove unnecessary constraint on previous_api
The constraint requires the previous_api property to be specified
unless validating nullness. However, there is no reason within the
Soong code why that should be.

The only use of previous_api is as the argument to the metalava
--migrate-nullness option which is only added when previous_api is
specified. So, there is no reason in the Soong code for the
constraint.

Metalava also does not require the --migrate-nullness option to be
specified unless validating nullness. So, there is no reason in
metalava for the constraint.

It is therefore safe to remove the constraint.

Bug: 142113521
Test: m checkbuild
Change-Id: I189071e215e928fdf43a39a03d540732743b7a32
2019-11-08 08:23:14 +00:00
Jiyong Park
8be103b04c APEX now correctly tracks jni_lib dependencies
Bug: 144135069
Test: m (apex_test.go amended)
Change-Id: If9dde4e2e62c2642267dbcac68bab76a032682c0
2019-11-08 15:53:48 +09:00
Colin Cross
1f38237c12 Merge changes from topic "reorder-cflags"
* changes:
  Reorder local and global flags
  Split local and global cflags
2019-11-08 05:07:34 +00:00
Jooyung Han
01a3ee287a apex_manifest in protobuf binary format
For Q compatibility, .json files are also bundled.

Three different apex_manifest files are built from input.
- apex_manifest.json: Q-readable .json file
- apex_manifest_full.json: input + dependency
- apex_manifest.pb: apex: converted from apex_manifest_full.json

apexer will handle these files.

Bug: 143654022
Test: m
Change-Id: I9697094057f0c0543282b1b46b7535cf21431176
2019-11-08 13:40:45 +09:00
Treehugger Robot
3e38230af7 Merge changes from topic "libraries-txt-to-soong"
* changes:
  VNDK APEX contains related *.libraries.txt files
  Make vndk*.libraries.txt as soong modules
2019-11-08 04:04:14 +00:00
Jaewoong Jung
722b63c4c2 Merge "Install signed split apks." 2019-11-08 01:12:06 +00:00
Treehugger Robot
d0a4878b49 Merge "SDK snapshot is dist'ed" 2019-11-08 00:45:50 +00:00
Colin Cross
6d88dbad0e Reorder local and global flags
Native compiler flags are currently applied in approximately:
global cflags
local cflags
local include dirs
global include dirs
global conlyflags
local conlyflags
global cppflags
local cppflags

This means that a flag that is enabled in the global cppflags
cannot be disabled in the local cflags, and an Android.bp author
must know to disable it in the local cppflags.

The previous CL split the global and local flags into separate
variables.  Rearrange the order that the variables are applied
to be:
global cflags
global conlyflags
global cppflags
local cflags
local include dirs
local conlyflags
local cppflags
global include dirs

Bug: 143713277
Test: m native

Change-Id: I171524ab40096a636a8e549e1e4bc3347ef9f97a
2019-11-07 15:27:58 -08:00
Colin Cross
4af21ed26f Split local and global cflags
Native compiler flags are currently applied in approximately:
global cflags
local cflags
local include dirs
global include dirs
global conlyflags
local conlyflags
global cppflags
local cppflags

This means that a flag that is enabled in the global cppflags
cannot be disabled in the local cflags, and an Android.bp author
must know to disable it in the local cppflags.  A better order
would be:
global cflags
global conlyflags
global cppflags
local cflags
local conlyflags
local cppflags
local include dirs
global include dirs

We are mixing both the global and local cflags into a single
variable, and similar for conlyflags and cppflags, which
prevents reordering them.  This CL prepares to reorder them
by splitting the global and local cflags into separate variables.

Bug: 143713277
Test: m native
Change-Id: Ic55a8c3516c331dc5f2af9d00e59ceca9d3e6c15
2019-11-07 15:27:58 -08:00
Jaewoong Jung
5a49881eea Install signed split apks.
This fixes a bug where unsigned split apks were installed instead of
their signed counterparts.

Fixes: 140795853
Test: app_test.go
Test: m Split && apksigner verify --print-certs
Change-Id: I12cdbcaff9932b6388f920d7e03301d687c3bfdb
2019-11-07 14:16:38 -08:00
Colin Cross
eae43b858f Merge "Silence dep-ann warnings" 2019-11-07 21:46:46 +00:00
Yuexi Ma
31f36fbbd1 Revert submission of topic 'libdl_android-in-apex'
Reason for revert: broke numerous major apps in app compat testing
Bug: 144100240

Change-Id: I4b43b92963815dfd95a221fb3f560505e9799950
2019-11-07 19:19:54 +00:00
Ulyana Trafimovich
d4f1febbc3 Merge "Revert^3 "Package dexpreopt artifacts for libcore jars in the ART apex."" 2019-11-07 16:24:31 +00:00
Ulyana Trafimovich
bf0e47648a Revert^3 "Package dexpreopt artifacts for libcore jars in the ART apex."
Reason for revert: breaks the coverage build.
Exempt-From-Owner-Approval: revert

Change-Id: I4c3db7b085b101738813a7f3da6f0078bbaa587b
2019-11-07 16:23:47 +00:00
Colin Cross
759a577961 Merge "Fix turbine classpath arguments" 2019-11-07 15:03:28 +00:00
Ulyana Trafimovich
98774cfe5d Merge "Revert^2 "Package dexpreopt artifacts for libcore jars in the ART apex."" 2019-11-07 14:20:43 +00:00
Pete Gillin
72813feb12 Merge "Switch to an OpenJDK 11 toolchain by default." 2019-11-07 11:13:39 +00:00
Martin Stjernholm
4945e7853e Merge "Recognize libdl_android as a Bionic library." 2019-11-07 11:01:36 +00:00
Ulyana Trafimovich
66b3e99649 Revert^2 "Package dexpreopt artifacts for libcore jars in the ART apex."
This reverts commit 24babe3a66.

Build failures are fixed after reworking the patch:

  - 'missing dependencies' on aosp-master-art branch is fixed by
    disabling profile generation in case default profile is not
    found (it is part of framework absent in aosp-master-art)

  - invalid dex2oat invocation should no longer happen after
    disabling dexpreopt on targets that do not use default ART config
    (fixed in CL If2d4fe2cdcb6a81c7c6d730d18c2b681a74fb0b7)

Dexpreopt artifacts for the libcore part of the boot class path are
now packaged in the ART apex. The system image still contains
dexpreopt artifacts for the full set of boot class path libraries
(both libcore and framework); the libcore part will be removed and
boot image extension will be used in a follow-up CL.

Since this is specific to the ART apex and makes no sense for other
apexes, the implementation adds a boolean flag "is ART apex" rather
than a new apex module property.

Build rules for the new set of dexpreopt artifacts are created using
a new variant of the global boot image config. Previously we had two
variants: "default" (for the system image) and "apex" (for the
JIT-zygote experiment). This patch adds a third "art" variant.

Bug: 143594594
Bug: 143593500

Test: m
Test: m com.android.art deapexer \
    && find $ANDROID_BUILD_TOP -type f -name 'com.android.art.*.apex \
        | xargs deapexer | grep boot \
    Expect to find javalib/$ARCH/boot*.{art,oat,vdex} files.
Test: m art/build/apex/runtests.sh

Change-Id: Ib37acaec8401bd23c8d547dadf773565406ef448
2019-11-07 10:34:45 +00:00
Treehugger Robot
0fb92346ac Merge "Update paths for libnative{bridge,loader}" 2019-11-07 10:15:31 +00:00
Jooyung Han
39edb6c6c1 VNDK APEX contains related *.libraries.txt files
These files were highly coupled with vndk version, so having them inside
the corresponding VNDK APEX is reasonable.

These files are used by linkerconfig and libnativeloader. In the future,
they reference these files from and VNDK APEX.

Bug: 141450808
Test: m com.android.vndk.current
Change-Id: I055a979d2636ddd8844a0afff81f6ba441f7965e
2019-11-07 16:47:38 +09:00
Jooyung Han
2216fb1f51 Make vndk*.libraries.txt as soong modules
Migrating from Make to Soong.

These files are generated by singleton and had to be defined as PREBUILT
modules in Make (system/core/rootdir/Android.mk)

Now, they are converted as soong modules.

To make things easier, a special kind of module 'vndk_libraries_txt' is
added which works like prebuilt_etc but its src file is generated by
soong.

Bug: 141450808
Test: m llndk.libraries.txt
Change-Id: Ia77e6af73f760fcd77020218c5bc37892b2cda1f
2019-11-07 15:12:03 +09:00
Jiyong Park
232e785b98 SDK snapshot is dist'ed
`m module_sdk dist` produces snapshots of all SDKs in the source tree.
A snapshot is a zip file consists of Android.bp, exported headers,
exported AIDL files, stubs for native libs and jars. The zip file is
expected to be downloaded from the build server and extracted to a
directory (which probably will be
/prebuilts/module_sdks/<module_name>/current).

Bug: 138182343
Test: m (sdk_test.go updated)

Change-Id: Idbe4bc24795fe08f26fc1cf7497028f9d162053a
2019-11-07 12:24:48 +09:00
Treehugger Robot
b9a80a0716 Merge "sdk modules are by default compile_multilib: "both"" 2019-11-07 02:16:29 +00:00
Colin Cross
c2557d1d56 Fix turbine classpath arguments
We were passing "--classpath foo.jar --classpath bar.jar" to turbine,
it now wants (and may always have expected?)
"--classpath foo.jar bar.jar".

Test: m checkbuild
Change-Id: Ib7e0ca64a34e236110f7b785d6a0fb51ed75567e
2019-11-07 02:05:06 +00:00
Treehugger Robot
c48ea97c9c Merge "Add python3 embedded launcher support" 2019-11-07 00:54:38 +00:00
Treehugger Robot
8a70579037 Merge "bpfix: remove empty HIDL libs" 2019-11-07 00:42:28 +00:00
Colin Cross
c228a7046f Silence dep-ann warnings
Silence the dep-ann warnings until there is an effort to do
something about them.

Test: m framework-minus-apex doesn't print dep-ann warnings.
Change-Id: Ic172e840dded4564fecfb91e96cba0c54358e20a
2019-11-07 00:19:54 +00:00
Fabien Sanglard
267e406830 Merge "Fix Soong CMakeLists.txt generator" 2019-11-06 23:41:28 +00:00
Jaewoong Jung
c6f22282ff Merge "Call shouldEmbedJnis only when needed." 2019-11-06 21:50:05 +00:00
Steven Moreland
c0647eb9ee bpfix: remove empty HIDL libs
libhidltransport/libhwbinder are empty and disallowed in Android.bp
(motivation is ~4kb per empty library per process overhead).

Bug: 135686713
Test: bpfix
Change-Id: I964215ad35068465217af74c5ef1322b43476428
2019-11-06 11:35:55 -08:00
Ramy Medhat
75c82fb518 Merge "Run non-RBE supported actions in the local pool when USE_RBE is set." 2019-11-06 18:36:18 +00:00
Orion Hodson
6341f01ed6 Update paths for libnative{bridge,loader}
Directories moved from system/core/ to art/.

Bug: 137364733
Test: m
Change-Id: I5ecf464dedeba0777ea3f465d133235bac9c7481
2019-11-06 13:39:46 +00:00
Adrian Roos
109f64766e Merge "API Lint: Archive lint errors" 2019-11-06 12:35:55 +00:00
Jeongik Cha
2cc570dc63 Enforce hidden apis usage in product(soong)
Only if PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is set,
every app and java library in product cannot use hidden APIs anymore.

checkSdkVersion() checks if sdk_version of app and library is narrow enough,
checkLinkType() checks every library that app links agianst

Bug: 132780927
Test: m
Test: set PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE, and check whether build
error occurs.
Change-Id: Ic630503b875040f730feda4fef826ed6d71da111
2019-11-06 19:42:42 +09:00
Jiyong Park
100f3fd118 sdk modules are by default compile_multilib: "both"
Bug: 143948100
Test: m (sdk_test.go amended)
Change-Id: I7df1b96af49a6569012e44eeb3c0722fac63fa51
2019-11-06 16:34:15 +09:00
Jaewoong Jung
9a9d0361bf Call shouldEmbedJnis only when needed.
Test: app_test.go
Change-Id: I4351b0ba5e1e7c89f16b4c891fcfbabb5c90c8c8
2019-11-05 20:13:26 -08:00
Fabien Sanglard
33ca8080e5 Fix Soong CMakeLists.txt generator
Problem: Soong does not guarantee that the list of parameters will
be in individual strings. This means the CMakeLists generator can
receive as input:

  params = {"-isystem", "path/to/system"}

or it could receive:

  params = {"-isystem path/to/system"}

Solution: Normalize the list of parameters into a flattened list
of parameters where each parameters is in an individual string.

Fixes: 143378093
Test: None
Change-Id: I9bd1a2006a1cf0ba383f467748b6fd4eadef6866
2019-11-05 16:26:37 -08:00
Martin Stjernholm
f4ed8df84d Recognize libdl_android as a Bionic library.
Necessary to create the symlinks from /system/lib{,64} to the Runtime APEX.

Test: build & boot
Bug: 135753770
Change-Id: I231b4ec48869843de233ebb7c2e4fc5a49e7288a
2019-11-06 00:22:37 +00:00
Ramy Medhat
dd0418a4d4 Run non-RBE supported actions in the local pool when USE_RBE is set.
Bug: 143938974
Test: ran CTS build at -j500 successfully.
Change-Id: I55074bd67308cd716972e24fb56a20bc393d5d9d
2019-11-05 22:57:35 +00:00
Ivan Lozano
b2df9f88eb Soong Rust source clean up.
Break up some of the longer lines in the Rust source and refactor the
TransformSrcto* functions to take fewer arguments.

Bug: N/A
Test: m -j crosvm.experimental
Change-Id: Ia0deb8bfe3e1bfd07ef35633e9a7e6f5e799b3a3
2019-11-05 12:16:46 -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
Treehugger Robot
af60d490ff Merge "Make the changes to emitXrefRule matching those in aosp/1145829" 2019-11-05 03:50:28 +00:00
Treehugger Robot
fe0c50e0d0 Merge "Fix and generate vndk snapshot entirely in Soong" 2019-11-05 03:48:51 +00:00
Dan Willemsen
8d4d7bee6d Add python3 embedded launcher support
Test: m par_test{,3}; build/soong/python/tests/runtest.sh
Change-Id: I9c0fac9e2947616fdeedbfc55026dc3065966e71
2019-11-04 19:48:19 -08:00
Treehugger Robot
f66a280354 Merge "-l option soong_zip can accept a file having space separated list" 2019-11-05 02:14:48 +00:00
Treehugger Robot
5a4b36499d Merge "Enforce correct rust library file names." 2019-11-05 01:54:21 +00:00
Sasha Smundak
09950a4f4f Make the changes to emitXrefRule matching those in aosp/1145829
Test: build kzip
Bug: 121267023
Change-Id: Id3a70d113dd7c24071cbb7cbfbf138527991cb77
2019-11-04 16:35:32 -08:00