Commit graph

16101 commits

Author SHA1 Message Date
Jiyong Park
b0a012cfec Override apexes with LOCAL_OVERRIDES_MODULES
APEXes are ETC type, which should be overridden via
LOCAL_OVERRIDES_MODULES. This change fixes a bug that
LOCAL_OVERRIDES_PACKAGES was used for APEXes.

Bug: 140792287
Test: m
Test: add com.google.android.tzdata to PRODUCT_PACKAGES and build.
/system/apex/com.google.android.tzdata.apex exists, but
/system/apex/com.android.tzdata.apex doesn't.

Change-Id: Id65743b36e0b706d6ffd8cae0597cc0a42a83fb7
2019-11-14 17:17:03 +09:00
Sam Saccone
f9e10f9443 Merge "Revert submission" 2019-11-13 15:24:50 +00:00
Sam Saccone
e3c22f7a3f Revert submission
Reason for revert: b/144387414
Fixes: b/144387414
Change-Id: I21e15a4d149a5a8fefd0f84010600cb41b59db95
2019-11-13 15:24:11 +00:00
Colin Cross
f3898e3bef Merge "Forbid -Weverything" 2019-11-13 15:01:48 +00:00
Jiyong Park
92d6bc189c Rename # vndk tag to # llndk
The APIs that are tagged with # vndk are actually for LLNDK libraries.
Although LLNDK is part of VNDK, calling those APIs 'vndk' has given
users a wrong perception that the APIs don't need to be kept stable
because that's the norm for most of the VNDK libraries that are not
LLNDK.

In order to eliminate the misunderstanding, rename the tag to 'llndk' so
that people introducing new such API will realize what they are signing
themselves up for.

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

Bug: 143765505
Test: m
Test: python3 test_gen_stub_libs.py
Merged-In: I2853df3b6e245056c21d4ab3d62466954cf26d72
(cherry picked from commit 3d7b69a657)
Change-Id: I2853df3b6e245056c21d4ab3d62466954cf26d72
2019-11-13 05:50:27 +00:00
Treehugger Robot
9ea28aef68 Merge "Remove unused "product_services_specific" prop" 2019-11-13 02:37:35 +00:00
Treehugger Robot
d006779e3e Merge "JNI lib is always embedded for APKs in APEX" 2019-11-13 02:25:25 +00:00
Colin Cross
39ef52f1df Forbid -Weverything
Use of -Weverything blocks build system changes and toolchain updates
on new warnings.  Forbid it in the build system.  Developers can
experiment with -Weverything on their module by adding it to their
Android.bp file and building with
m ANDROID_TEMPORARILY_ALLOW_WEVERYTHING=true

Fixes: 143713277
Test: manual
Change-Id: If154db328c52f687161e7a41e486d56a129850ac
2019-11-12 15:55:03 -08:00
Treehugger Robot
38dec1bcb5 Merge "'m fuzz' shared lib package should be per-fuzzer." 2019-11-12 22:13:36 +00:00
Mitch Phillips
13ed3f5e34 'm fuzz' shared lib package should be per-fuzzer.
Change the ClusterFuzz package built by 'make fuzz' to now package
shared libraries per-fuzz target.

Changes documented in go/proposed-clusterfuzz-package

This has the impact of:
 - This package is much easier to post-process in the Haiku export
 cronjob.
 - Shared libraries are now per-fuzz-target. This means that we will
 have some level of duplication (libdl, libc, libc++, libclang_rt.*,
 etc.) as these libraries will be in multiple fuzz target's dirs.

This *only* affects the fuzz-$target-$arch.zip file, not the fuzz targets in
$ANDROID_HOST_OUT/fuzz or $ANDROID_PRODUCT_OUT/data/fuzz. These two
install directories still use the global shared libraries in order to
preserve space on devices.

Bug: 144360679
Test: m fuzz
Change-Id: I5f19a13070e01d2d39598f9f215a983b398a9f37
2019-11-12 11:12:10 -08:00
Nick Desaulniers
69c013694d Merge "Expand ClangExtraExternalCflags to non-Google vendor projects" 2019-11-12 17:45:15 +00:00
Jooyung Han
43240b1191 Remove unused "product_services_specific" prop
product_services_specific is not used any longer.

Bug: 135957588
Test: m
Change-Id: I6c09d3c09773034085a1419cbffe86954066df4e
2019-11-12 17:07:52 +09:00
Treehugger Robot
650e8552a6 Merge "Move partner androidmk and bpfix files to match their package path" 2019-11-12 06:01:14 +00:00
Treehugger Robot
3eceaa3240 Merge "Sort fuzz target dependencies to avoid rebuilds." 2019-11-12 02:42:10 +00:00
Colin Cross
ce23942f3c Move partner androidmk and bpfix files to match their package path
Using a gomod-aware editor with build/soong requires that files
in build/soong can be mapped to the android/soong package path.
Move the partner androidmk and bpfix files such that their path
matches the package path when the android/soong package prefix is
replaced with the build/soong path prefix.

Test: go test ./...
Test: m bpfix androidmk partner_bpfix partner_androidmk
Change-Id: Ic7f7aad9e5eb9178eef0383f0b37e4fb93ce8314
2019-11-11 15:44:09 -08:00
Colin Cross
e94272d0b3 Silence trailing "1 warning" message from javac when warning is silenced
soong_javac_wrapper is silencing a useless warning:
warning: [options] bootstrap class path not set in conjunction with -source 1.9
but recent versions of javac have started also printing:
1 warning

Read the warning count, subtract the number of silenced warnings, and
reprint it if the non-silenced warning count is nonzero.

Fixes: 144118634
Test: javac_wrapper_test.go
Change-Id: Ie1d0a978188ab7b1c41027f718a1274608628123
2019-11-11 21:48:33 +00:00
Yi Kong
950e0baf2a Expand ClangExtraExternalCflags to non-Google vendor projects
Some of the warnings are too common to fix/opt-out for non-Google
projects.

Also in the change, minor clean up of duplicated code.

Test: presubmit
Bug: 139945549
Change-Id: Ic176ef1f17133405851a79592b6bef5ccb403bd9
2019-11-11 13:24:39 -08:00
Nick Desaulniers
2d5ce8538b Merge "soong: move -Wimplicit-fallthrough from cflags to cxxflags" 2019-11-11 16:54:25 +00:00
Mitch Phillips
0553ba356e Sort fuzz target dependencies to avoid rebuilds.
Some fuzz target dependencies are generated at Soong-time in a
nondeterministic fashion. When these are interpreted by Make, they may
cause rebuilds due to being in a different order.

Ensure that the dependencies are always sorted, which should avoid
triggering unnecessary rebuilds.

Bug: 144250431
Test: make <module> && make <module>, ensure no rebuild.
Change-Id: I44edc1a3bb3f57be3e3f093f765241b41928fa4d
2019-11-11 07:46:58 -08:00
Pete Gillin
31d57588c9 Merge changes I0d679648,I31542e7f
* changes:
  Remove the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN option.
  Add a new option OVERRIDE_JLINK_VERSION_NUMBER.
2019-11-11 11:59:36 +00: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
Ulyana Trafimovich
b21ed4281e Merge "Revert^4 "Package dexpreopt artifacts for libcore jars in the ART apex."" 2019-11-11 10:30:12 +00:00
Treehugger Robot
5666126133 Merge "Rearrange import order" 2019-11-11 04:57:09 +00:00
Jiyong Park
d237ad6d71 JNI lib is always embedded for APKs in APEX
If a JNI lib is depended on by an APK that is included in an APEX, the
lib is embedded inside the APK.

This change also fixes a bug that APKs are not mutated for APEXes.

Bug: 144135069
Test: m (apex_test.go amended)
Change-Id: Icf490d2701a7ede8bcad7e671fc72be9c8d7c01e
2019-11-11 12:40:09 +09:00
Treehugger Robot
80df439072 Merge "Enforce hidden apis usage in product(soong)" 2019-11-11 02:05:16 +00:00
Jeongik Cha
28df257fea Rearrange import order
Bug: 132780927
Test: m
Change-Id: I4b2c40bb0fb3dd5ff31f65811a6fef28e946f028
2019-11-11 10:46:36 +09:00
Treehugger Robot
c70d3c3cf6 Merge "APEX now correctly tracks jni_lib dependencies" 2019-11-09 13:53:08 +00:00
Treehugger Robot
e4ef280532 Merge "Remove unnecessary constraint on previous_api" 2019-11-09 11:12:51 +00:00
Colin Cross
075cc44a86 Merge "Remove -Wno-thread-safety-negative" 2019-11-09 02:34:29 +00:00
Treehugger Robot
722b02f84c Merge "Soong frontend for shared library fuzzing." 2019-11-08 21:35:08 +00:00
Colin Cross
23d988d54a Remove -Wno-thread-safety-negative
-Wthread-safety-negative was disabled because it requires locks to
support an operator!(), and std::mutex in libc++ does not.  Disabling
it everywhere was preventing it being used for modules that want to
opt in to using it and provide their own lock that supports
operator!().  Modules that use -Weverything should either stop using
 -Weverything (preferred), or add -Wno-thread-safety-negative.

Bug: 143713277
Test: m native
Change-Id: I0b84679a806a21b16cabe7f739fde61c3efe2cbe
2019-11-08 18:27:40 +00:00
Nick Desaulniers
4e31fb87af soong: move -Wimplicit-fallthrough from cflags to cxxflags
The compiler upgrade to r370808 can now check C code for implicit
fallthrough. This is triggering a massive number of warnings throughout
external/ and the rest of the platform.

Revisit enabling this for C another day.

Bug: 139945549
Test: m
Change-Id: I8dfaedab78c6230b46e8a45a9e65106dec363380
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-11-08 09:52:56 -08:00
Jooyung Han
d0e39622c7 Merge "apex_manifest in protobuf binary format" 2019-11-08 17:33:38 +00:00
Mitch Phillips
e1ee1a1297 Soong frontend for shared library fuzzing.
Additional context (for Googlers): go/android-fuzzing-shared

This patch adds the Soong frontend for shared library fuzzing. We
traverse dependencies at soong install time to find all transient shared
libraries that $module depends on. We then ask the Make backend to
depend on the shared library.

We also create the source:destination mappings between where the shared
libraries are built to where they should be installed to for fuzzing.
This is then depended on by the Make backend.

Bug: N/A
Test: m fuzz, note the contents of $ANDROID_PRODUCT_OUT/data/fuzz/lib,
and out/soong/fuzz-target-*.zip now has shared libraries.

Change-Id: Id7afbd34bc9c055110af96cd3c668b730d404aee
2019-11-08 08:48:13 -08:00
Ulyana Trafimovich
de534414b3 Revert^4 "Package dexpreopt artifacts for libcore jars in the ART apex."
This reverts commit bf0e47648a.

Reason for revert: coverage build with EMMA_INSTRUMENT_FRAMEWORK=true
is fixed by inspecting the environment variable and not generating
boot image in case it is set.

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.

Test: m
Test: m art/build/apex/runtests.sh

Bug: 144091989
Change-Id: I113c0d39222d6d697cb62cd09d5010607872fc2b
2019-11-08 12:48:53 +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
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