Commit Graph

27521 Commits

Author SHA1 Message Date
Jiyong Park f9f680595b Install prebuilt_etc modules to out/soong
prebuilt_etc* modules emit build rules to install their output to
out/soong. This is required for the cvd_host_package module to gather
installed files (not built files) of prebuilt_etc* modules.

Bug: 168086242
Test: m

Change-Id: I065640c7e6f188b0c19e70f081e82bdc30d7e752
2020-10-13 14:57:24 +09:00
Treehugger Robot 95069b99bf Merge "Expose android.filesToInstall" am: c8821b9451
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440497

Change-Id: I5730091d52853e8d1cc871d5ce01b3ba0926dd96
2020-10-13 05:02:29 +00:00
Treehugger Robot c8821b9451 Merge "Expose android.filesToInstall" 2020-10-13 04:52:36 +00:00
Treehugger Robot a0e02f4b48 Merge "Add additional documentation in metrics proto regen.sh script." am: 0807abacf3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455145

Change-Id: Ib124890fb89d09ec09b518189c1ea704b6963bd0
2020-10-13 04:40:50 +00:00
Treehugger Robot 0807abacf3 Merge "Add additional documentation in metrics proto regen.sh script." 2020-10-13 04:20:29 +00:00
Colin Cross f36b061333 Merge changes Ieeca3c39,Iddeea2d0,I8d66a5d3 am: 9ebc22cf2d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456349

Change-Id: Idcc959e68e44da66423684579bcba170e92f24de
2020-10-13 03:48:49 +00:00
Evgenii Stepanov 2080bfe79a Support asan/hwasan versions of prebuilts.
In apex_set and cc_prebuilt_library_*, provide a way to specify an
alternative source to use when build with sanitizers.

Test: prebuilt_test, apex_test
Change-Id: I1ab8091bf696d94da3547cf5248853df489bdee6
2020-10-13 03:37:32 +00:00
Colin Cross 9ebc22cf2d Merge changes Ieeca3c39,Iddeea2d0,I8d66a5d3
* changes:
  Add jni_libs to host java binaries
  Make java_binary common variant a dependency
  Replace jniDependencyTag with a value
2020-10-13 03:33:10 +00:00
TreeHugger Robot 93a82013c8 Merge "Merge ab/6749736 in stage." into stage-aosp-master 2020-10-13 03:31:46 +00:00
Colin Cross 3572cf74f9 Move LLNDK and NDK versionSelectorMutator special cases into versionedInterface
Implement stubsVersions on *llndkStubDecorator and *stubDecorator to
handle the special cases in versionSelectorMutator.

Test: m checkbuild
Change-Id: Idc985c52f91450df42c0275b2b2acef3f2ed8868
2020-10-12 16:55:49 -07:00
Colin Cross bbc941b0d0 use version mutator for CRT
Move the CRT objects into the version mutator and retire the
ndk_api mutator.

Test: no change to build.ninja or Android-${TARGET_PRODUCT}.mk
Change-Id: Ibbbde323e3e0e8e4702dda4f3828a49786280118
2020-10-12 16:55:49 -07:00
Colin Cross 5ec407b594 Use version mutator for NDK
The ndk_api mutator is similar to the version mutator.  Move the
ndk_library ndk_api variations into the version mutator instead,
which will help later when consolidating the stubs handling
between NDK, LLDNK and Apex libraries.

Test: No change to build.ninja or Android-${TARGET_PRODUCT}.mk
Change-Id: I51417cf669265762c15f7289e1dc186d017ef4a9
2020-10-12 16:55:49 -07:00
Colin Cross 8e21aa54eb Reuse more of apex stubs implementation for llndk stubs
Use the linker script and exported flags support from apex stubs
for llndk stubs.

Test: no change to build.ninja or Android-${TARGET_PRODUCT}.mk
Change-Id: I9886498dcac7419958d290de99cf5f39f5fdedee
2020-10-12 16:55:49 -07:00
Colin Cross c88c272298 Use libraryInterface instead of concrete type asserts for stubs
Start consolidating stubs, llndk stubs, and ndk stubs by replacing
all of the concrete type asserts in the stubs methods with
libraryInterface.

Test: no change to build.ninja, Android-${TARGET_PRODUCT}.mk
Change-Id: I195d99c91e5f7afda5bcb489d20b524b3300c1b1
2020-10-12 16:55:49 -07:00
Colin Cross 0de8a1e17b Start using Providers instead of direct module access
Export information about static libraries, shared libraries and
exported flags through Providers instead of accessing the module
directly.  Much more is left to be converted, but this significantly
simplifies the dependencies on libraries with stubs by making it easy
for a module to masquerade as another by simply exporting the
providers from the other module.  Instead of depending on all the
versions of a library and then picking which one to use later, it
can depend only on the implementation variant and then select the
right SharedLibraryInfo from the variant.

Test: m checkbuild
Test: only expected changes to build.ninja
Change-Id: I1fd9eb4d251cf96ed8398d586efc3e0817663c76
2020-10-12 16:55:47 -07:00
Treehugger Robot 43dea5e3d8 Merge "Add jetifier support to android_library_import" am: ff8838cb86
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1451138

Change-Id: I53e4c331a03abef70ca5fada31ac007841f5eabb
2020-10-12 23:48:58 +00:00
Treehugger Robot ff8838cb86 Merge "Add jetifier support to android_library_import" 2020-10-12 23:38:06 +00:00
Liz Kammer 9f1b34982e Merge "Enable defaults in soong_config_module_type props" am: 9244491f17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455956

Change-Id: Ie08c0913937d7fb32b1630339f7b831f57725406
2020-10-12 23:30:26 +00:00
Liz Kammer 9244491f17 Merge "Enable defaults in soong_config_module_type props" 2020-10-12 23:18:28 +00:00
Patrice Arruda 1e2cad95c8 Add additional documentation in metrics proto regen.sh script.
Added additional instruction in the regen.sh script to build the
blueprint_tools and aprotoc in case the regen.sh script fails.

Bug: b/169395325
Test: ./regen.sh
Change-Id: Icb38c907fb47febc17eef1067d06d0588dd0b7ba
2020-10-12 22:58:27 +00:00
Patrice Arruda 4fb8adcc4c Collect the hostname of the machine as a metric.
The hostname is collected during a build to determine where the user
is build from (from office workstation, cloudtop, etc...). This is a
useful metrics for RBE related builds.

Bug: b/169395325
Test: m nothing, ran printproto to verify that soong_metrics has the
      hostname.
Change-Id: I3e5d64f948ae43c5dda60de1d4a52b187e36dff8
2020-10-12 22:44:27 +00:00
Jaewoong Jung 1ca5f01a37 Merge "Apply PRODUCT_ENFORCE_RRO_TARGETS to dependencies." am: c1c415d0f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1451145

Change-Id: Ic2c01d84632658537aa413dd7916da48d4c1934b
2020-10-12 21:55:17 +00:00
Jaewoong Jung c1c415d0f7 Merge "Apply PRODUCT_ENFORCE_RRO_TARGETS to dependencies." 2020-10-12 21:45:33 +00:00
Treehugger Robot 15edee4142 Merge "Remove out/host/common/obj/PACKAGING during installclean" am: 79bb3d4784
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456350

Change-Id: Ib034c9f5ff97da40cc64582080811490783c3b92
2020-10-12 21:29:34 +00:00
Treehugger Robot 79bb3d4784 Merge "Remove out/host/common/obj/PACKAGING during installclean" 2020-10-12 20:48:09 +00:00
Colin Cross c5b002874a Merge changes I056c49e6,I994402cb am: 56b6de5847
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456352

Change-Id: I01795da7f1858739237979e6f8fc9014708d0a24
2020-10-12 20:18:37 +00:00
Colin Cross 56b6de5847 Merge changes I056c49e6,I994402cb
* changes:
  Fix OutputPath.InSameDir example
  Fix go vet error
2020-10-12 20:01:27 +00:00
Steven Moreland d134201537 Zero C++ heap by default.
Let the flakes, and the crashes, and the deadlocks, and the leaks, and
the undefined behavior which steals away so many nights find their
numbers decimated in the homogeneous conditions we now rest our data.

To give some intuition why this is not so underperformant, zeroing
memory is one way of priming caches.

This change is actually a no-op, because build/make/core/soong_config.mk
always overrides this setting, but it reflects the spirit and future
direction of this change.

Bug: 131355925
Test: basic simple perf comparisons
Change-Id: I8254c36373de52091839561973c9741e8f85aa09
2020-10-12 18:41:03 +00:00
Saeid Farivar Asanjan f043696fb9 Add jetifier support to android_library_import
Bug: 170242653
Test: manual
Change-Id: I9b49ea9ed18041c5509d4d53a3ce8fdf58c8c537
2020-10-12 17:51:38 +00:00
Jaewoong Jung 460960c457 Merge "Add config.AndroidFirstDeviceTarget." am: 19bc60abee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456597

Change-Id: I65eef2bd265e70f2fd1f14176eb9ae03cd7598e9
2020-10-12 17:46:49 +00:00
Jaewoong Jung c779cd403f Apply PRODUCT_ENFORCE_RRO_TARGETS to dependencies.
With this change, users don't need to figure out which libraries
actually hold the resources to be overlaid when targetting apps with a
core lib dependency (e.g. Settings, SystemUI).

Fixes: 169898727
Test: app_test.go
Change-Id: I3c3b9dc0a377b1828db1199858a73d080a173205
2020-10-12 10:34:36 -07:00
Jaewoong Jung 19bc60abee Merge "Add config.AndroidFirstDeviceTarget." 2020-10-12 17:30:18 +00:00
Steven Moreland f45dbe2947 Merge "build/soong/scripts/update-apex-allowed-deps.sh" am: 73a9e603d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1449397

Change-Id: I46bac2f39e071d89cd4be0483d025d40a3bbcba5
2020-10-12 17:22:07 +00:00
Steven Moreland 73a9e603d5 Merge "build/soong/scripts/update-apex-allowed-deps.sh" 2020-10-12 16:59:24 +00:00
Anton Hansson 1658d4f74f Merge "Make hiddenapi flag generation use new artifact" am: 53781d55bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1450117

Change-Id: Ie45764ea78e537795c39e2cebd173fadcc294ca2
2020-10-12 16:15:19 +00:00
Anton Hansson 53781d55bc Merge "Make hiddenapi flag generation use new artifact" 2020-10-12 16:08:11 +00:00
Treehugger Robot 345274c970 Merge "Add warning about out-directory usage with RBE builds" am: f43eee4b9b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1453658

Change-Id: Ie3d91d3762ff8f8746fd211005dbe9c1ed2040ee
2020-10-12 15:42:49 +00:00
Treehugger Robot f43eee4b9b Merge "Add warning about out-directory usage with RBE builds" 2020-10-12 15:25:22 +00:00
Jaewoong Jung 642916f20a Add config.AndroidFirstDeviceTarget.
Targets[Android][0] is not always the first, preferred target. Add a new
field to config to provide the correct target and begin to use it.

Test: m nothing
Test: build/soong/scripts/build-ndk-prebuilts.sh
Fixes: 156980228
Change-Id: Ib56f52424ebf47f3eee6ac62b9fd9eca2919d63a
2020-10-12 14:15:19 +00:00
Anton Hansson b9da62cb51 Merge "Add a Impl_only_libs prop for sdk_library" am: 858a8cabf9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455336

Change-Id: Ia7b8f5aa672698a2bea8327980318cf363fd7acb
2020-10-12 09:19:28 +00:00
Anton Hansson 858a8cabf9 Merge "Add a Impl_only_libs prop for sdk_library" 2020-10-12 09:00:13 +00:00
Treehugger Robot ceb7cbf190 Merge "android/: Rename Plat->SystemExt*SepolicyDirs" am: 6aa958902a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1274762

Change-Id: I526c9060020befbd16e9856b8da2e66ca816ca79
2020-10-12 04:20:11 +00:00
Treehugger Robot 6aa958902a Merge "android/: Rename Plat->SystemExt*SepolicyDirs" 2020-10-12 03:49:24 +00:00
Colin Cross 2ad22c3644 Revert "Make lots of tests run in parallel" am: 405af07859
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456655

Change-Id: Idc3a771362e3db49d7599f2263a52d2d990cb4e3
2020-10-10 06:56:40 +00:00
Colin Cross 41b4676f44 Fix OutputPath.InSameDir example
The OutputPath.InSameDir example was called FileInSameDir.

Test: go vet ./android
Change-Id: I056c49e6b39f6124b0fa32ebc3498a2fe42c8ddc
2020-10-10 03:04:09 +00:00
Colin Cross ff0278b32a Fix go vet error
stderr is a bytes.Buffer, but the String() method has a pointer
receiver, so stderr does not satisify the Stringer interface
and can't be used for a %s argument.  Make stderr a *bytes.Buffer
instead.

Test: go vet ./android
Change-Id: I994402cb954946279375c9d447ad3854380381cc
2020-10-10 03:03:54 +00:00
Colin Cross 3e6f67a68b Remove out/host/common/obj/PACKAGING during installclean
Tradefed packages are created in out/host/common/obj/PACKAGING
and should be removed during installclean so that they get an
accurate embedded build number.

Fixes: 170308394
Test: treehugger
Change-Id: Ib7a57377b5c9512584bc93f10da316eadf786979
2020-10-10 03:03:38 +00:00
Colin Cross 89226d9ef9 Add jni_libs to host java binaries
Add a property to support dependencies on JNI libraries for host
java binaries.

Fixes: 170389375
Test: TestBinary
Change-Id: Ieeca3c3997615f0b17ae1f058b94e6c9ba929cab
2020-10-09 19:27:34 -07:00
Colin Cross c179ea6812 Make java_binary common variant a dependency
ctx.PrimaryModule() is wrong in the case of a java_binary that
supports both host and device, use an explicit dependency instead.
Once the dependency exists there is no need to manually request
the jar be installed, it will automatically be installed by the
host installation rules for dependencies.

Test: TestBinary
Change-Id: Iddeea2d08bc574c79d42139020558cd70d718ca1
2020-10-09 19:27:34 -07:00
Colin Cross de78d138a1 Replace jniDependencyTag with a value
Support GetDirectDepsWithTag on JNI deps by replacing the
jniDependencyTag type with a jniLibTag value.

Test: app_test.go
Change-Id: I8d66a5d3f433562e131a1fbafce75891d1b094dd
2020-10-09 19:24:05 -07:00