Commit Graph

16864 Commits

Author SHA1 Message Date
Nick Desaulniers ebc13b056c Merge "Expand ClangExtraExternalCflags to non-Google vendor projects"
am: 69c013694d

Change-Id: I0357eceee54272fac3ab546d8eef0a52edbd0228
2019-11-12 10:13:44 -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
Colin Cross 687801f83b Merge "Move partner androidmk and bpfix files to match their package path"
am: 650e8552a6

Change-Id: I99a7e77d5e9eb5d35a44c3b7655a9f9e4e8b6464
2019-11-11 22:16:09 -08:00
Treehugger Robot 650e8552a6 Merge "Move partner androidmk and bpfix files to match their package path" 2019-11-12 06:01:14 +00:00
Mitch Phillips b60e5fbdfe Merge "Sort fuzz target dependencies to avoid rebuilds."
am: 3eceaa3240

Change-Id: I727d245950912f91c4e0a2cd6beed8a71669f011
2019-11-11 18:50:21 -08:00
Treehugger Robot 3eceaa3240 Merge "Sort fuzz target dependencies to avoid rebuilds." 2019-11-12 02:42:10 +00:00
Colin Cross 4fe2e4f940 Silence trailing "1 warning" message from javac when warning is silenced
am: e94272d0b3

Change-Id: Id4946b2c763c229a31527a646839e08452268d36
2019-11-11 18:04:55 -08:00
Colin Cross 9016b91290 Set default pool when RBE or goma is enabled
Pass --default_pool=local_pool to kati when RBE or goma is enabled
to put most rules into the local_pool.  Specific rules that support
RBE or goma will set .KATI_NINJA_POOL := none to remove themselves
from the local_pool.  Passing --default_pool will also disable the
hack in kati that sets the pool based on the presence of the string
"/gomacc" in the command line.

Fixes: 143938974
Test: inspect pools in build-${TARGET-PRODUCT}.ninja for m USE_RBE=true
Test: inspect pools in build-${TARGET-PRODUCT}.ninja for m USE_GOMA=true
Change-Id: I839b2488383fcd63fffd613e25b0b9abcb72b567
2019-11-11 16:08:42 -08: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 3a24eefedb Merge "soong: move -Wimplicit-fallthrough from cflags to cxxflags"
am: 2d5ce8538b

Change-Id: I345c609bcbaf1cb869d60df5e505533e8111d9fe
2019-11-11 09:24:19 -08:00
Pete Gillin 6414dde54e Merge changes I0d679648,I31542e7f
am: 31d57588c9

Change-Id: I3cfdaf2cfb6b5eef840f66c2c9fce5d82c2cd10b
2019-11-11 09:23:35 -08:00
Ulyana Trafimovich 8ca57b35ea Merge "Revert^4 "Package dexpreopt artifacts for libcore jars in the ART apex.""
am: b21ed4281e

Change-Id: Idca5a2d9e14485efb99451ce689a470ce99ea2a8
2019-11-11 09:07:15 -08:00
Jeongik Cha 1859bcadbe Merge "Rearrange import order"
am: 5666126133

Change-Id: I1535f14d7dda5fa05d3d417b58ea55ffc262c21a
2019-11-11 09:06:44 -08:00
Jeongik Cha 8b822f70c3 Merge "Enforce hidden apis usage in product(soong)"
am: 80df439072

Change-Id: I88469277c70aeae5e66ceabe41e000dd113ef3e7
2019-11-11 09:05:13 -08:00
Jiyong Park 4538f60bfe Merge "APEX now correctly tracks jni_lib dependencies"
am: c70d3c3cf6

Change-Id: I1e1c7a8d9e230aa7e65ef94448fbebba8b7fc19f
2019-11-11 09:05:01 -08:00
Paul Duffin dc931028c5 Merge "Remove unnecessary constraint on previous_api"
am: e4ef280532

Change-Id: I6951a5df42c4153c813a105f7fed5416a79edd61
2019-11-11 09:03:35 -08:00
Colin Cross dcee4049d6 Merge "Remove -Wno-thread-safety-negative"
am: 075cc44a86

Change-Id: I626d7fa1a24599414446baba7e2ee9618a11fc28
2019-11-11 09:03:06 -08:00
Mitch Phillips f484975c2d Merge "Soong frontend for shared library fuzzing."
am: 722b02f84c

Change-Id: I86c282af40aa0c71b9c537e8e92616280ab64581
2019-11-11 09:02:27 -08:00
Jooyung Han 2d6a99599f Merge "apex_manifest in protobuf binary format"
am: d0e39622c7

Change-Id: Ieaf7d0535d58ac103f87c130c66dbc1d8557ccb0
2019-11-11 09:01:04 -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 6d01bf3b82 Merge "Revert submission of topic 'libdl_android-in-apex'"
am: 3980ced987

Change-Id: I25399e58f549275835db2ccd5e4245d3eb3bc230
2019-11-08 04:06:03 -08: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 17da9db309 Merge changes from topic "reorder-cflags"
am: 1f38237c12

Change-Id: Icfbfa6f1ce2840d5d86b407ce50c653ef8195c03
2019-11-07 21:25:43 -08: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
Jooyung Han 1813458be8 Merge changes from topic "libraries-txt-to-soong"
am: 3e38230af7

Change-Id: I57b7f1ebce6c0c3abfb6ea1f60e51d1d867d89e5
2019-11-07 20:13:57 -08: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