Commit graph

9521 commits

Author SHA1 Message Date
Elliott Hughes
d5fdd3a134 Switch hostname(1) to toybox.
Test: treehugger
Change-Id: I52908a14da86ed8f162150bb48f72e141e6f060c
2019-01-24 15:18:06 -08:00
Jaewoong Jung
590b1ae37c Minor refactoring of generateAndroidBuildActions.
The function became a gigantic machine, so I decided to split it up to
smaller, logically self-contained pieces to provide better readability.

Test: app.go + TreeHugger
Change-Id: I50e5767ed779078b2d8c60c39c3951b0b5a191d7
2019-01-24 14:56:29 +00:00
Jaewoong Jung
2ad817c65d Enable certificate overrides with product vars.
Currently it is only for android_app, though it can be easily ported to
apex.

The make-side change will be made later, along with a real application.

Bug: 122957760
Test: app_test.go
Change-Id: I41f0be84f8b9f93e9518a16160e10eaa649388cd
2019-01-24 14:55:58 +00:00
David Brazdil
9d085dea9e Merge "Disable all-assigned check in hiddenapi on master-art" 2019-01-24 09:38:13 +00:00
Nicolas Geoffray
f343872a8d Align jar file after calling merge-zips when dex is uncompressed.
Noticed this while changing a some dex build rules.

Test: m
Change-Id: I9838e81e0e98be49d34554041a5a942b64259aaa
2019-01-24 06:38:14 +00:00
Colin Cross
3a3e94c09a Fix kotlin annotation processing after java_plugin
I37c1e80eba71ae2d6a06199fb102194a51994989 broke kotlin annotation
processing with a typo in the processors flag to kapt and by
passing -processor to javac with an empty processorpath.

Bug: 77284273
Bug: 122251693
Test: kotlin_test.go
Test: m checkbuild
Change-Id: I17c45d5b3f9df089231af5d2930646ad0e6bf9be
2019-01-23 16:14:21 -08:00
Dan Albert
9f100ca0e3 Merge "Revert "Fix: sanitizerRuntimeMutator is not run for host"" 2019-01-23 23:37:37 +00:00
Dan Albert
84757ea7ea Revert "Fix: sanitizerRuntimeMutator is not run for host"
This reverts commit 1c29b0e6ec.

Reason for revert: Broke aosp_x86_64

Change-Id: I581200f1c271c3e1a39d5cdad84c782977b13054
2019-01-23 23:33:25 +00:00
David Brazdil
91b4e3e78b Disable all-assigned check in hiddenapi on master-art
Master-art configurations do not have frameworks/base and therefore do
not have hidden API flags. Pass --no-force-assign-all to `hiddenapi`
when frameworks/base does not exist to disable the corresponding
assertion. This enables us to enforce the assertion on non-master-art
builds and also get rid of logspam about missing flags on ART buildbots.

Test: art/tools/buildbot-build.sh on master-art
Bug: 123143676
Change-Id: I074d9554fb11dab3eef904016375730520107ec2
2019-01-23 22:55:41 +00:00
Dan Willemsen
27fd541cf3 Merge "Fix: sanitizerRuntimeMutator is not run for host" 2019-01-23 20:57:06 +00:00
Colin Cross
be9cdb8d64 Replace annotation_processors with plugins
Follow bazel's modules for annotation processors by introducing
a java_plugin module type that can contain extra metadata about
the annotation processor, the processor class and a flag to
specify if the annotation processor is compatible with the
turbine optimization.  Deprecate the annotation_processors
property, which took a list of java_library_host modules, in
favor of the plugins property, which takes a list of java_plugin
modules.  The annotation_processors property will be removed
once all uses have been replaced with plugins.

Bug: 77284273
Test: plugin_test.go
Test: m caliper
Change-Id: I37c1e80eba71ae2d6a06199fb102194a51994989
2019-01-23 20:17:51 +00:00
Steven Moreland
c4efd9cb55 jarjar_rules: accept file-group
This allows a jarjar rule to be shared among multiple targets in
different directories.

Bug: 86259915
Test: use filegroup jarjar_rules
Change-Id: I3fa476c4e87e2460ab9fabfb34229f471c80e6b0
2019-01-23 18:05:18 +00:00
Jiyong Park
1c29b0e6ec Fix: sanitizerRuntimeMutator is not run for host
Bug: 123254047
Test: m ASAN_OPTIONS=detect_leaks=0 SANITIZE_HOST=address
FORCE_BUILD_LLVM_COMPONENTS=true out/host/linux-x86/bin/adb
nm -an out/host/linux-x86/bin/adb  | grep -c asan
shows non-zero value

Change-Id: I030e08bd0db38585b1fdaecd00220406f1e8b371
2019-01-23 23:37:45 +09:00
Logan Chien
c7f797ea54 Fix shared_libs for cc/prebuilt.go
This commit fixes `shared_libs` for `cc_prebuilt_binary`,
`cc_prebuilt_library_static`, and `cc_prebuilt_library_shared`.  Before
this commit, all shared libraries in `shared_libs` are dropped from the
generated `LOCAL_SHARED_LIBRARIES`.  This commit fixes the problem by
delegating `linkerDeps()` to `libraryDecorator.linkerDeps()`.

This commit also fixes the dependencies to NDK shared libraries.  Before
this change, those dependencies are mapped to a `ndkStubDepTag` and then
ignored by the computation of `AndroidMkSharedLibs`.  This commit adds
it back.

Bug: 123053270
Bug: 119084334
Test: libclang_rt.scudo-*.so can be checked with 2 more hacks.
Change-Id: I59e37e1a3fe0c329e8cb7032e5671f117f7832a0
2019-01-23 07:21:56 +00:00
Logan Chien
f1b3352b97 Merge "Add prebuilt ABI checker support to soong" 2019-01-23 07:21:17 +00:00
Nicolas Geoffray
65fd8ba2fe Always do zipalign with uncompressDex.
Also preserve the alignment with hiddenapi.

Test: conscrypt apex has its conscrypt.jar zipaligned.
Change-Id: I43cc0eadb9548c3d8055e12c077fb7bbe1935fe6
2019-01-23 06:36:48 +00:00
Colin Cross
e153382e17 Merge changes from topic "kapt"
* changes:
  Pass annotation processors to kotlinc
  Move kotlin to it's own file
2019-01-23 02:18:12 +00:00
Logan Chien
4fcea3d9a3 Add prebuilt ABI checker support to soong
This commit adds prebuilt ABI checker support to soong so that
`cc_prebuilt_library_shared` and `cc_prebuilt_binary` are checked.

To opt out the check, add `check_elf_files: false` to your module.

Bug: 119086738
Test: lunch aosp_sailfish-userdebug && CHECK_ELF_FILES=true make check-elf-files
Change-Id: Idb4290c8f48aad545894a7ae718a537cbf832233
2019-01-23 10:15:02 +08:00
Colin Cross
afbb1734f6 Pass annotation processors to kotlinc
Enable the kotlin-annotation-processing plugin and pass annotation
processors to it.

Bug: 122251693
Test: m checkbuild
Test: TestKapt in kotlin_test.go
Change-Id: I841df454beaaa7edd263eea714ca0d958a03c9de
2019-01-22 21:47:19 +00:00
Jaewoong Jung
de4c02f855 Minor code/comment cleanup for app.go.
1. We no longer need AndroidApp.extraLinkFlags.
(https://r.android.com/c/platform/build/soong/+/691332)
(https://r.android.com/c/platform/build/soong/+/792280)
2. Early break in the for loop to find --product flags.
3. Minor var name / comment updates for readability.

Test: app.go / TreeHugger
Change-Id: Iecea3e7cd319267c680422343ded5f7f8e69d0cd
2019-01-22 11:24:50 -08:00
Colin Cross
21fc9bbe19 Move kotlin to it's own file
kapt is going to make kotlin a little more complicated, move the
rules and tests to their own files.

Bug: 122251693
Test: m checkbuild
Change-Id: Ieed78b97995ced210b710bd50c357514cc8e3bc6
2019-01-22 16:32:11 +00:00
Nicolas Geoffray
f8c06c159e Merge "Don't install java libraries that are already in an apex." 2019-01-22 07:48:05 +00:00
Logan Chien
5c7c78a2e0 Merge "Add sdk version workaround for libclang_rt" 2019-01-22 01:04:35 +00:00
Treehugger Robot
a0e1c1daaa Merge "Build java_sdk_library modules when UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true" 2019-01-21 23:41:06 +00:00
Colin Cross
2c77ceba34 Build java_sdk_library modules when UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true
java_sdk_library modules are usually disabled in favor of prebuilts
when TARGET_BUILD_APPS is set.  Keep them enabled when
UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true, which is used by some unbundled
builds built from a full source tree like mainline modules.

Bug: 123183568
Test: m TARGET_PRODUCT=mainline_modules_arm UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true TARGET_BUILD_APPS=com.android.media
Change-Id: Ifa940769e467ca4b7ad3b95106e184c00680d2ae
2019-01-21 12:18:39 -08:00
Jerome Gaillard
13a539c009 Merge "Add Skia deps to the list of available Windows libraries" 2019-01-21 20:08:01 +00:00
David Brazdil
0f670a22df Replace hiddenapi-{public,private}-list.txt with a CSV file
`hiddenapi` is being refactored to work with a single CSV file as
opposued to a multitude of text files (one per flag). This patch
changes the singleton rule for listing public/private APIs from
stubs to expect a CSV as an output.

Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: I622521d59979a6b01ecc8065a278412fedf7b9bc
2019-01-21 14:30:49 +00:00
Nicolas Geoffray
4bdea39ad2 Don't install java libraries that are already in an apex.
This need to have -hostdex rules not look at the installFile.
In the near future, all -hostdex files come from jars that are in an apex.

bug: 119868597
Test: m
Change-Id: I4423626c5ced5d098ddd97c122fbfced54f817fc
2019-01-21 14:02:17 +00:00
Jerome Gaillard
7f7f34f81a Add Skia deps to the list of available Windows libraries
Building Skia for Windows requires linking some Windows libraries that
were not in the list of available ones. This adds the necessary
libraries.

Test: N/A
Change-Id: I803b7b05f47163316c6f03866145dc50656a6bef
2019-01-21 11:34:46 +00:00
Logan Chien
834b9a6216 Add sdk version workaround for libclang_rt
libclang_rt.*.so depends on libc++, which is not a part of NDK.  Thus,
this workaround must be added in order not to break the build when the
prebuilt dependencies are checked.

Bug: 121358700
Test: make checkbuild
Change-Id: Icaeb7adf96fb72829053e198b659ebcb19a035fc
2019-01-21 10:29:47 +08:00
Treehugger Robot
1eb88bb494 Merge "Fix: APEX gets .jar.jar suffix when TARGET_FLATTEN_APEX is true" 2019-01-20 15:47:49 +00:00
Jiyong Park
087b541afd Fix: APEX gets .jar.jar suffix when TARGET_FLATTEN_APEX is true
soong_java_prebuilt.mk sets LOCAL_MODULE_SUFFIX := .jar. Therefore, we
need to remove .jar suffix from LOCAL_MODULE_STEM, otherwise, we
will have .jar.jar suffix.

Bug: 123092860
Test: TARGET_FLATTEN_APEX=true apex.test
Check /system/apex/apex.test/javalib/core-oj.jar is there.

Change-Id: Ie19b20523753ec32ab16266f63d26c4df685cc34
2019-01-20 22:42:33 +09:00
Tor Norbye
76c875a796 Update signature files to the new format
The new format is described in tools/metalava/FORMAT.md.

Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Merged-In: I8314f4e7099fa92e4f8ed7d283ccf836cc9a84a0
Change-Id: I828ec5ea2f879ebf8dd4ead651e9c9d2345f52e0
2019-01-19 21:36:07 -08:00
Elliott Hughes
d2c476cd2d Revert "Switch to toybox hostname(1)."
This reverts commit b115b81095.

Reason for revert: http://b/123123255

Change-Id: I0f2bfebf1189fdc71e093538a8b228dd0e0b6946
2019-01-19 18:55:54 +00:00
Elliott Hughes
44f0d4e1fc Switch to toybox which(1).
Test: treehugger
Change-Id: Ic14692b90c2b1246c1c8f72d00d6e0a5223aaf70
2019-01-19 17:43:06 +00:00
Elliott Hughes
db96fc8744 Switch to toybox pgrep(1), pkill(1), and ps(1).
Test: treehugger
Change-Id: Ic357b317e0233a626c89c38df152c3361ee8ea82
2019-01-19 17:41:53 +00:00
Colin Cross
8f41783417 Merge "Maintain uncompressed dex through hiddenapi encode" 2019-01-19 16:18:32 +00:00
Treehugger Robot
8cb1fbf205 Merge "Switch to toybox hostname(1)." 2019-01-19 06:43:05 +00:00
Colin Cross
cd964b3ea1 Maintain uncompressed dex through hiddenapi encode
hiddenapi encode unzips and rezips the dex jar.  Pass uncompressDex
into it so that it doesn't make classes.dex compressed in the dex
jar when it was previously uncompressed.

Bug: 123100239
Test: m checkbuild
Test: zipinfo $OUT/system/framework/conscrypt.jar shows uncompressed classes.dex
Change-Id: If36cde330eb0bcb1e1db3c582452c5faebc8ff29
2019-01-19 06:10:00 +00:00
Logan Chien
6cf8ff918a Merge "Add apex stub lib to LOCAL_SHARED_LIBRARIES" 2019-01-19 03:48:30 +00:00
Logan Chien
6af24f9677 Merge "Always respect system_shared_libs from Android.bp" 2019-01-19 02:34:34 +00:00
Dan Willemsen
f655b1db10 Merge "Add BUILD_CTS_* to androidmk" 2019-01-19 01:56:26 +00:00
Logan Chien
09106e182e Add apex stub lib to LOCAL_SHARED_LIBRARIES
This commit removes a break statement so that apex stub libraries are
added to LOCAL_SHARED_LIBRARIES for prebuilt ABI checker.

This CL doesn't change I09b78e38df285033ef6e9c85f7ea4b0274e85070 [1].
The libraries provided by apex modules are not installed to
`/system/lib[64]` because their stub libraries have
`LOCAL_UNINSTALLABLE_MODULE := true`.

[1] https://android-review.googlesource.com/844555

Bug: 120266448
Bug: 119084334
Test: Add `stubs: { symbol_file: "libnetd_resolv.map.txt", versions: ["1"]}`
      to libnetd_resolv, create a program that depends on
      `libnetd_resolve`, build the program, and do not find
      `/system/lib/libnetd_resolv.so`.
Change-Id: Iffa2c1a0eac9c4940ec1fa05fbacb9806272c31e
2019-01-19 07:45:31 +08:00
Elliott Hughes
b115b81095 Switch to toybox hostname(1).
Test: treehugger
Change-Id: Ibf89209befc8564b308c4b26bf08cef721938099
2019-01-18 15:11:22 -08:00
Clay Murphy
f41ed72c97 Merge "Docs: Add link to related Soong docs on SAC" 2019-01-18 21:51:45 +00:00
Treehugger Robot
63989e5bcf Merge "Switch to toybox wc(1)." 2019-01-18 21:04:57 +00:00
David Brazdil
0b6f492e30 Merge "Restore UNSAFE_DISABLE_HIDDENAPI_FLAGS functionality." 2019-01-18 17:32:41 +00:00
Elliott Hughes
46e68636f8 Switch to toybox wc(1).
Test: treehugger
Change-Id: I14d22406c1a462d4075a8538e549a8d0f5b88e8d
2019-01-18 08:28:54 -08:00
David Brazdil
9fc36a68d0 Restore UNSAFE_DISABLE_HIDDENAPI_FLAGS functionality.
It got broken with the move to hiddenapi to Soong.

Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true m -j32
Change-Id: Id369bfae8e118907b1f12faa7e4207494904edda
2019-01-18 11:12:33 +00:00
Dan Willemsen
57554aecb2 Add Sasha to OWNERS
Test: none
Change-Id: I78adc499449017298d4e4ff3ca7d6b14e2813d90
2019-01-17 21:49:22 -08:00