Commit Graph

4188 Commits

Author SHA1 Message Date
Paul Duffin
6c26dc7392 Dedup cc library module type registration
Test: m checkbuild
Bug: 146540677
Change-Id: I6685338550f587212e70f3eba8d4342b66f566e2
2019-12-20 15:22:52 +00:00
Justin Yun
5f7f7e8a39 Create product variant for product partition
When PRODUCT_PRODUCT_VNDK_VERSION is set to 'current', product
modules are enforced to use only VNDK libs from the system partition
as BOARD_VNDK_VERSION does to vendor partition.

Modules with 'vendor_available: true' create product variant as well
as core and vendor variants. The product variant as an image variant
is used for the modules in /product or /system/product.

It must not affect the current build behavior without
PRODUCT_PRODUCT_VNDK_VERSION set.

Bug: 134099726
Bug: 138966004
Bug: 144534640
Test: build without PRODUCT_PRODUCT_VNDK_VERSION set
Change-Id: I4d3585c110d84493e45bf76d550dc240bb26137f
2019-12-20 17:56:08 +09:00
Automerger Merge Worker
f779f44bc2 Merge "Generate Compdb file in the output directory" am: 076651765a am: d31cf9eda1 am: 2ce52dc457
Change-Id: I8d933fae674f298b532c6bcfec9c4df95570bf8f
2019-12-20 04:32:24 +00:00
Treehugger Robot
076651765a Merge "Generate Compdb file in the output directory" 2019-12-20 04:01:00 +00:00
Automerger Merge Worker
bb1ce92ed7 Merge "Dedup cc build components registration" am: 4565aba98c am: 60e17ae445 am: 7b59c5f316
Change-Id: I13e16f00844873614440fd4270f7023271df1caa
2019-12-20 02:50:52 +00:00
Automerger Merge Worker
15461e8216 Merge "Improve cc tests by adding fuzzer mutators" am: de85fa9f5f am: c2acb75a92 am: d4ab3052ff
Change-Id: I4fb978543a4985587762892304c73f1c62de613a
2019-12-20 02:50:37 +00:00
Automerger Merge Worker
4e965ebbce Merge "Improve cc tests by adding sanitizer mutators" am: 7d211f1793 am: 152b5f8675 am: 5b91dc8d39
Change-Id: Ife351bc2628c32e7473ead96097b6ebd325604ec
2019-12-20 02:50:24 +00:00
Automerger Merge Worker
504b300fc6 Merge "Dedup prebuilt mutator registration" am: 82f4f99780 am: 849e8f7509 am: e05577b9a8
Change-Id: I094959ab23674cafcc40455f5ea1c062085c75f1
2019-12-20 02:50:06 +00:00
Automerger Merge Worker
598e0885e7 Merge "Dedup registration for cc default test config" am: 24de9ea201 am: 6da6395f16 am: 1971acf840
Change-Id: Iff72ebfc46ba03e5b9a26ba04e6810f720747bc7
2019-12-20 02:48:49 +00:00
Treehugger Robot
4565aba98c Merge "Dedup cc build components registration" 2019-12-20 01:27:00 +00:00
Treehugger Robot
de85fa9f5f Merge "Improve cc tests by adding fuzzer mutators" 2019-12-20 01:26:01 +00:00
Treehugger Robot
7d211f1793 Merge "Improve cc tests by adding sanitizer mutators" 2019-12-20 01:25:56 +00:00
Treehugger Robot
82f4f99780 Merge "Dedup prebuilt mutator registration" 2019-12-20 01:25:51 +00:00
Treehugger Robot
24de9ea201 Merge "Dedup registration for cc default test config" 2019-12-20 01:25:42 +00:00
Changyeon Jo
96279252d7 Generate Compdb file in the output directory
This change modifies the location of generated compdb file from
$ANDROID_BUILD_TOP to where compdbOtuputProjectsDirectory points to,
under $OUT_DIR.  This is especially required for the build environment
that maps $ANDROID_BUILD_TOP as read-only, such as Gitc.

Test: m SOONG_GEN_COMPDB=1 nothing
      examine generated compile_commands.json
Signed-off-by: Changyeon Jo <changyeon@google.com>

Change-Id: I86700f89b613a443a33982ecd5501b0f68a62be7
2019-12-20 00:10:02 +00:00
Automerger Merge Worker
0662e65654 Merge changes I7e9440a0,I7f1a4b64,If5d6fdac am: b237de1914 am: ab879385eb am: 396fd80826
Change-Id: I96741af41ba539d783787abc0b79f82caef2e5d4
2019-12-19 23:37:41 +00:00
Treehugger Robot
b237de1914 Merge changes I7e9440a0,I7f1a4b64,If5d6fdac
* changes:
  Dedup cc prebuilts module type registration
  Detect registration of duplicate module/singleton types
  Dedup prebuilt apis module type/mutator registration
2019-12-19 22:43:02 +00:00
Automerger Merge Worker
ddb6485b64 Merge "Adding capability to granular disable of fuzzer" am: 5c5cc67ee2 am: c2887f9e28 am: 9a00444e75
Change-Id: I7465458b6cd9c131971779eeb9007610a60c99b3
2019-12-19 20:41:11 +00:00
Hamzeh Zawawy
5c5cc67ee2 Merge "Adding capability to granular disable of fuzzer" 2019-12-19 19:54:07 +00:00
Paul Duffin
036e7001ae Dedup cc build components registration
Effectively adds the cc_defaults module type to the set that are
registered for tests that rely on cc default deps so needed to remove
a few references of that.

Test: m checkbuild
Bug: 146540677
Change-Id: I9df3d33a0cf3f6b22d270efed8366d0183eccaec
2019-12-19 19:19:40 +00:00
Paul Duffin
075c417837 Improve cc tests by adding fuzzer mutators
This fixes an issue that arises when deduping cc build component
registration code.

The fuzzer and fuzzer_deps post deps mutators were not previously
added when running cc tests. That meant the tests were not actually
testing the same behavior as at runtime.

Adding the mutators breaks the TestFuzzTarget test as the mutator
changes the variant of the fuzz_smoke_test that is created and so the
test fails to find it.

This fixes the test by correct the variant name.

Test: m checkbuild
Bug: 146540677
Change-Id: I9d2be0023affb7722f0399663fa18a2a5fb610d8
2019-12-19 19:19:40 +00:00
Paul Duffin
d686791c16 Improve cc tests by adding sanitizer mutators
This fixes an issue that arises when deduping cc build component
registration code.

The sanitize_runtime_deps and sanitize_runtime post deps mutators were
not previously added when running cc tests. That meant the tests were
not actually testing the same behavior as at runtime.

Adding the mutators breaks the TestFuzzTarget test as the mutator adds
libclang_rt.ubsan_standalone-aarch64-android as a dependency of libc++
and the former is not available.

This fixes the test by adding the missing dependency as a cc prebuilt
shared library.

Test: m checkbuild
Bug: 146540677
Change-Id: Ie13c7e6fcefef7d9cb1cc5364be3dc563ce40de5
2019-12-19 19:19:40 +00:00
Paul Duffin
0c4979bbdf Dedup prebuilt mutator registration
Test: m checkbuild
Bug: 146540677
Change-Id: I9f8a11adf61fe6f352ec1eabc7c5bac332348ba2
2019-12-19 19:19:40 +00:00
Paul Duffin
77980a8bb9 Dedup registration for cc default test config
The cc.GatherRequiredDepsForTest() method returns some default module
definitions that are required when using cc module types like
cc_library. Previously, the registration of the module types and
mutators needed to process those default definitions was duplicated
in the test config initialization.

This change removes that duplicated code and replaces it with calls
to cc.RegisterRequiredBuildComponentsForTest(ctx) which registers all
the required build components.

Test: m checkbuild
Bug: 146540677
Change-Id: I80b6913c5691ff164ce9d308b9e1da24940f2d42
2019-12-19 19:19:40 +00:00
Paul Duffin
59986b23cc Dedup cc prebuilts module type registration
Test: m checkbuild
Bug: 146540677
Change-Id: I7e9440a075ef9c683729ed83e0033ab529fe4ac0
2019-12-19 19:19:40 +00:00
Automerger Merge Worker
b47c56b232 Merge "Create public stub for platform's sysprop_library" am: 0cbb31e9e7 am: c044c0f713 am: a9ee40b723
Change-Id: Ic4c49427f484d0d23f01bd8dc3078b9d14cf1263
2019-12-19 03:51:44 +00:00
Treehugger Robot
0cbb31e9e7 Merge "Create public stub for platform's sysprop_library" 2019-12-19 03:23:01 +00:00
Inseob Kim
ac1e986c55 Create public stub for platform's sysprop_library
Java modules using SystemAPI can now link against platform owned
sysprop_library with public stub. This allows modules to use platform's
public sysprops (which should be regarded as an API) without any hidden
API usages, if using dynamic linking and boot class path.

This doesn't affect any vendor or odm owned sysprop_library.

Bug: 141246285
Bug: 145167888
Test: m
Change-Id: I99824fb24a75cc8282211c2ad6c6296ae9fca393
2019-12-19 09:35:23 +09:00
Automerger Merge Worker
0f6a89ae9b Merge "Reland "Also package recursive jni_libs deps of android_apps as well as direct deps." with bug fix." am: ddd27246ee am: d7d6b17706 am: 57ae4e4328
Change-Id: I662411bbddca40103098e17db6226acc8aa8596e
2019-12-18 23:54:12 +00:00
Automerger Merge Worker
e7a323d22a Merge "Don't create native bridge variants of vendor modules" am: 0bfb9e8d9b am: 27ba444ad3 am: 60184e2703
Change-Id: I0b11c91ce9ec9ff7b76294f9852a8e82e2c8219f
2019-12-18 23:53:42 +00:00
Peter Collingbourne
ddd27246ee Merge "Reland "Also package recursive jni_libs deps of android_apps as well as direct deps." with bug fix." 2019-12-18 23:29:58 +00:00
Colin Cross
0bfb9e8d9b Merge "Don't create native bridge variants of vendor modules" 2019-12-18 23:16:04 +00:00
Kenny Root
bfe4b1862d vndkMustUseVendorVariantList += vintf-rebootescrow
TARGET_VNDK_USE_CORE_VARIANT devices explicitly track libs which are
differentiated between system/vendor. b/145157349 is filed to try to
catch these errors during normal builds (or in presubmit).

aidl libs need to be differentiated because they explicitly set
different system/vendor stabilities.

Fixes: 146513281
Test: fixes build
Change-Id: I0a56d67bfd035a4438d05d5c983c47de8234dc3b
2019-12-18 14:49:44 -08:00
hamzeh
3478a0d8a0 Adding capability to granular disable of fuzzer
This change is to add granularity for disabling
of the fuzzer from running on host, device or both.

Bug: 145824604
Test: make haiku successfully completes after change
Change-Id: I686b439e36c622108f7b5b3e3f4738b8295320a7
2019-12-18 13:58:59 -08:00
Automerger Merge Worker
36b002fe57 Move filesystem into Config am: 98be1bb00f am: a6f8134501 am: e33aec3174
Change-Id: I67f36b86dccf922c6d3648890edce51117c91a9e
2019-12-18 20:18:27 +00:00
Colin Cross
83bead469b Don't create native bridge variants of vendor modules
The logic in cc.Module.ImageMutatorBegin() to skip creating vendor
variants for native bridge modules stopped working when the image
mutator was moved before the arch mutator because the native
bridge variant hadn't been created yet.  Move the logic to the arch
mutator to avoid creating native bridge variants for vendor variants.

Fixes: 146486214
Test: lunch aosp_cf_x86_pasan-userdebug && m SANITIZE_TARGET=address
Change-Id: I46cff4905f929c9989d005f0ceb01388d47323c1
2019-12-18 10:45:46 -08:00
Colin Cross
98be1bb00f Move filesystem into Config
The filesystem object was available through ModuleContext.Fs(), but
gives too much access to the filesystem without enforicing correct
dependencies.  In order to support sandboxing the soong_build
process move the filesystem into the Config.  The next change will
make it private.

Bug: 146437378
Test: all Soong tests
Change-Id: I5d3ae9108f120fd335b21efd612aefa078378813
2019-12-18 08:19:10 -08:00
Treehugger Robot
572aeed6a4 Merge "Move imageMutator before archMutator" 2019-12-18 02:34:36 +00:00
Peter Collingbourne
ad84f975d2 Reland "Also package recursive jni_libs deps of android_apps as well as direct deps." with bug fix.
This time, exclude NDK libraries instead of LLNDK libraries from the
package. This is necessary because there are libraries such as libvndksupport
which are LLNDK but are not accessible to apps.

Original commit message:
> Previously, android_app targets for which a.shouldEmbedJnis(ctx) = true
> (e.g. CtsSelinuxTargetSdk25TestCases) would need to specify all of their
> recursive library dependencies, including for example libc++ when depending
> on the platform libc++. This means unnecessary churn when we add a new
> dependency to libc++ (e.g. libunwind [1]). To avoid the churn and allow
> jni_libs clauses to be simplified, make the build system search for the
> recursive dependencies and automatically include them.
>
> This change allows us to remove code that was previously adding NDK libc++
> as a special case, as it is now covered by the generic code.
>
> Also fix some improper quoting that was exposed as a result of this change
> causing more files to be packaged than before.
>
> [1] https://android-review.googlesource.com/q/topic:%22libunwind-so%22

Bug: 144430859
Test: atest CtsAppOpsTestCases
Test: atest FrameworksNetSmokeTests
Change-Id: I8311ede0b44d7e50b9f272912ead8ef07e82b074
2019-12-17 16:55:20 -08:00
Automerger Merge Worker
d4fc98eba3 Merge "Revert "Also package recursive jni_libs deps of android_apps as well as direct deps."" am: 9fd9b92d51 am: 91ef43f39e am: b9f21634ea
Change-Id: I8a7191c050535882bbcbb9bad0141b31ef3abfb6
2019-12-18 00:43:36 +00:00
Lorenzo Colitti
2973c1106f Revert "Also package recursive jni_libs deps of android_apps as well as direct deps."
This reverts commit 6f907ad3dd.

Reason for revert: Broke FrameworksNetSmokeTests

Bug: 146456945
Change-Id: Ibef7bb80c532e70cfcfb974f51a99ed25437a343
2019-12-18 00:15:07 +00:00
Colin Cross
fb0c16e95a Move imageMutator before archMutator
Run the imageMutator between osMutator and archMutator so that
different arch variants can be set for the different partitions.

Bug: 142286466
Test: m checkbuild
Change-Id: I65d05714b75aa462bf9816da60fdc2deda4de593
Merged-In: I65d05714b75aa462bf9816da60fdc2deda4de593
(cherry picked from commit 9c8f687584)
2019-12-17 14:45:11 -08:00
Automerger Merge Worker
7356dee847 Merge "Also package recursive jni_libs deps of android_apps as well as direct deps." am: ff8cb1e69e am: d6800751c7 am: d10be18767
Change-Id: I5728e95988e46f10fd8a5c7d108b6679fa33f53a
2019-12-17 21:24:55 +00:00
Colin Cross
9c8f687584 Move imageMutator before archMutator
Run the imageMutator between osMutator and archMutator so that
different arch variants can be set for the different partitions.

Bug: 142286466
Test: m checkbuild
Change-Id: I65d05714b75aa462bf9816da60fdc2deda4de593
2019-12-17 11:16:37 -08:00
Peter Collingbourne
6f907ad3dd Also package recursive jni_libs deps of android_apps as well as direct deps.
Previously, android_app targets for which a.shouldEmbedJnis(ctx) = true
(e.g. CtsSelinuxTargetSdk25TestCases) would need to specify all of their
recursive library dependencies, including for example libc++ when depending
on the platform libc++. This means unnecessary churn when we add a new
dependency to libc++ (e.g. libunwind [1]). To avoid the churn and allow
jni_libs clauses to be simplified, make the build system search for the
recursive dependencies and automatically include them.

This change allows us to remove code that was previously adding NDK libc++
as a special case, as it is now covered by the generic code.

Also fix some improper quoting that was exposed as a result of this change
causing more files to be packaged than before.

[1] https://android-review.googlesource.com/q/topic:%22libunwind-so%22

Bug: 144430859
Change-Id: I3d6fbcce75bc108a982eb7483992a4b202056339
2019-12-16 15:20:09 -08:00
Automerger Merge Worker
9fc4b42dc8 Merge "Add $ORIGIN to fuzzer-coverage sanitized .so's." am: a1682631eb am: 630f2d4caf am: 50a9cadcf4
Change-Id: I65e2db8c383a398d9cd14da0f29ca14762c89bcd
2019-12-16 21:37:28 +00:00
Automerger Merge Worker
95747ac10b Merge changes from topic "separate_code" am: 894cdee30a am: 7346c709e2 am: a923639223
Change-Id: I65b77b31c770382abf7002a90e111a3ffe25e35a
2019-12-16 21:36:54 +00:00
Automerger Merge Worker
67eebe6442 Revert "Revert "soong: upgrade Android platform to clang-r370808"" am: eb20744361 am: c2e2dce120 am: 1ae7cbd085
Change-Id: I9582942220289d30dc21afddaeb477dd67732b80
2019-12-16 21:36:52 +00:00
Nick Desaulniers
c2e2dce120 Revert "Revert "soong: upgrade Android platform to clang-r370808""
am: eb20744361

Change-Id: Ia0c47b43fcb53da68caf6496fb2a421c74581a02
2019-12-16 13:20:15 -08:00
Mitch Phillips
a1682631eb Merge "Add $ORIGIN to fuzzer-coverage sanitized .so's." 2019-12-16 21:17:03 +00:00