Commit Graph

3527 Commits

Author SHA1 Message Date
Isaac Chen
6b17816a0b Merge "Extend ALLOW_MISSING_DEPENDENCIES coverage" am: 7617fc2fab am: 0166208e24 am: f7a8071ae9
am: 5bb415cec6

Change-Id: I17cf925bc04a6ac3206e6c5f47a0f53af10ad7b1
2019-10-17 14:02:06 -07:00
Colin Cross
65e9ef1b30 Merge "Add method to determine variations from a Target" am: ad4a597c79 am: ee8633937f am: 1522e768f2
am: 34c20d0904

Change-Id: Ib97b2f01871467baa83f18d99790794d376bdc37
2019-10-17 13:48:00 -07:00
Isaac Chen
f7a8071ae9 Merge "Extend ALLOW_MISSING_DEPENDENCIES coverage" am: 7617fc2fab
am: 0166208e24

Change-Id: Ie3fe99d5439e266ec6ecf5c6f47820e3c04916b6
2019-10-17 13:37:35 -07:00
Colin Cross
1522e768f2 Merge "Add method to determine variations from a Target" am: ad4a597c79
am: ee8633937f

Change-Id: Ia6af532856cd5605fae2372c98b23c2e4aa9504f
2019-10-17 13:26:44 -07:00
Treehugger Robot
7617fc2fab Merge "Extend ALLOW_MISSING_DEPENDENCIES coverage" 2019-10-17 19:46:53 +00:00
Colin Cross
ad4a597c79 Merge "Add method to determine variations from a Target" 2019-10-17 18:52:20 +00:00
Jooyung Han
d5520cf595 Merge "Revert "Supports VNDK APEX with different versions"" am: a8f91ec00d am: 5d57bc60c8 am: b26f85099c
am: 2bb8758050

Change-Id: If825e225b237a3f99bf4938e37ec9fbd46a7c50e
2019-10-17 05:37:07 -07:00
Jooyung Han
f0355763af Merge "Revert "Add __ANDROID_APEX_<NAME>__ for apex variants"" am: 50dce7372b am: 14f54d642d am: 479a43aabc
am: 5bad6d9a95

Change-Id: I1eaa41a74636a2de811dce0af385abf8cc374808
2019-10-17 05:37:02 -07:00
Jooyung Han
b26f85099c Merge "Revert "Supports VNDK APEX with different versions"" am: a8f91ec00d
am: 5d57bc60c8

Change-Id: Icaeaf834d5ee47c32d2c0b5ecfd6a75ce7c7f1ce
2019-10-17 05:19:08 -07:00
Jooyung Han
479a43aabc Merge "Revert "Add __ANDROID_APEX_<NAME>__ for apex variants"" am: 50dce7372b
am: 14f54d642d

Change-Id: I6a8fbacd52cb54bb484eeb60895bdfa509899c29
2019-10-17 05:19:04 -07:00
Treehugger Robot
a8f91ec00d Merge "Revert "Supports VNDK APEX with different versions"" 2019-10-17 11:50:47 +00:00
Treehugger Robot
50dce7372b Merge "Revert "Add __ANDROID_APEX_<NAME>__ for apex variants"" 2019-10-17 11:50:47 +00:00
Isaac Chen
2c0a180be0 Extend ALLOW_MISSING_DEPENDENCIES coverage
Make build system respect ALLOW_MISSING_DEPENDENCIES, when building
architecture B products, and ignore targets with dependencies that
are not available for architecture B.

Bug: 142701187
Test: # Add a dummy Android.bp with a module only for arm64
      $ m -j TARGET_PRODUCT=aosp_x86 TARGET_BUILD_VARIANT=userdebug

Change-Id: I64de33674732df8c286671c806a07bcd19862b80
2019-10-17 11:02:21 +08:00
Jiyong Park
a7bc8ad0b9 Prohibit dependencies outside of uses_sdks
When an APEX is built with uses_sdks, any depedndency from the APEX to
the outside of the APEX should be from the SDKs that the APEX is built
against.

Bug: 138182343
Test: m

Change-Id: I1c2ffe8d28ccf648d928ea59652c2d0070bf10eb
2019-10-17 11:19:53 +09:00
Jooyung Han
12f629b26d Revert "Add __ANDROID_APEX_<NAME>__ for apex variants"
This reverts commit d29e551efd.

Reason for revert: some targets are broken

Bug: 142773030
Change-Id: I50ac6842ab8aa572c11262ee0ec965ddbe903b0e
2019-10-16 23:51:09 +00:00
Jooyung Han
48dd4b5ea4 Revert "Supports VNDK APEX with different versions"
This reverts commit 394951da73.

Reason for revert: some targets are broken

Bug: 142773030
Change-Id: I4ce2e4a4c683c71958bc4f73e45a5ddd4a4ae32a
2019-10-16 23:50:39 +00:00
Colin Cross
0f7d2ef3ac Add method to determine variations from a Target
The arch variants are hardcoded in every module type.  Refactor
them out into a Target.Variations() method in preparation for
splitting the arch mutator into two, which will require using
different variations.

Test: m checkbuild
Change-Id: I28ef7cd5168095ac888fe77f04e27f9ad81978c0
2019-10-16 14:52:30 -07:00
Mitch Phillips
1415cf04bc Merge "Fuzz corpus entries should not go in a subdirectory." am: 959a3ffbda am: ed4ed3b6b9 am: b1af2af1e7
am: 8354c9284c

Change-Id: I7d20d3809dcd59a08ad39fa50feb896265952b0b
2019-10-16 14:45:08 -07:00
Mitch Phillips
b1af2af1e7 Merge "Fuzz corpus entries should not go in a subdirectory." am: 959a3ffbda
am: ed4ed3b6b9

Change-Id: I082d286a54a5e68677206fd28e2a1c6429b11fd2
2019-10-16 14:32:57 -07:00
Treehugger Robot
959a3ffbda Merge "Fuzz corpus entries should not go in a subdirectory." 2019-10-16 21:09:59 +00:00
Mitch Phillips
6f1fe14189 Merge "Do not link libc++.so statically on device." am: 98eccba8b4 am: b4f9d86666 am: 2349e33b32
am: 99fe26b36a

Change-Id: I750ad4c2568dbc048c979670364e1a0a454f434f
2019-10-16 14:02:34 -07:00
Mitch Phillips
4a912b7a70 Merge "Workaround unexported sancov symbols. Fix multiple sanitizer RT deps." am: 83246459d1 am: 708b9e6c38 am: 7fbb4838ac
am: 2ed5eed480

Change-Id: I1cfd1c2e67f0e6a44c95ffe5f400341081420372
2019-10-16 14:02:14 -07:00
Mitch Phillips
2349e33b32 Merge "Do not link libc++.so statically on device." am: 98eccba8b4
am: b4f9d86666

Change-Id: I91577bdad7e9f6ad73002d3e3bad2a5f784a8a7c
2019-10-16 13:50:22 -07:00
Mitch Phillips
7fbb4838ac Merge "Workaround unexported sancov symbols. Fix multiple sanitizer RT deps." am: 83246459d1
am: 708b9e6c38

Change-Id: I08c7279a4e836c19fe9610d16fc44efdd0a14b73
2019-10-16 13:50:03 -07:00
Treehugger Robot
98eccba8b4 Merge "Do not link libc++.so statically on device." 2019-10-16 20:28:54 +00:00
Treehugger Robot
83246459d1 Merge "Workaround unexported sancov symbols. Fix multiple sanitizer RT deps." 2019-10-16 20:28:38 +00:00
Elliott Hughes
05b710acd3 Merge "Revert "-D__ANDROID_NDK__ for SDK builds."" am: 60ee98582c am: 3fb7864cf1 am: 32ebd00639
am: 17c8bd6f56

Change-Id: I7dfae49ab59a7e6345e6626ce5301168ec91c26a
2019-10-16 09:33:42 -07:00
Elliott Hughes
32ebd00639 Merge "Revert "-D__ANDROID_NDK__ for SDK builds."" am: 60ee98582c
am: 3fb7864cf1

Change-Id: I58bfea1b04c5a3b06091e84118b10634e7c87356
2019-10-16 09:21:22 -07:00
Elliott Hughes
60ee98582c Merge "Revert "-D__ANDROID_NDK__ for SDK builds."" 2019-10-16 16:01:14 +00:00
Slava Shklyaev
7779766411 Add android.hardware.neuralnetworks@1.3
Bug: 139120468
Test: m
Change-Id: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
Merged-In: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
(cherry picked from commit f4b5a5ba08)
2019-10-16 14:01:25 +01:00
Pirama Arumuga Nainar
f56f57ec9f Merge "Pass -static-libgcc to Windows link commands" am: a60e81853f am: 077a726afb am: 22751cb748
am: 4c08bad3ff

Change-Id: Ibfcd9ac3f4e2b3a628e9097887589c602efabda4
2019-10-15 21:57:42 -07:00
Jiyong Park
672f8db027 Merge "add [static|shared].apex_available to cc_library" am: a4cdb8dd40 am: 090366ef0c am: a98ccc56a4
am: 805bb2eb23

Change-Id: I375508e8998c435681233a2f8eb7c06c93f59db5
2019-10-15 21:48:38 -07:00
Pirama Arumuga Nainar
22751cb748 Merge "Pass -static-libgcc to Windows link commands" am: a60e81853f
am: 077a726afb

Change-Id: I78f8e5cb49859634987cf3b116869839721dd600
2019-10-15 21:40:39 -07:00
Jiyong Park
a98ccc56a4 Merge "add [static|shared].apex_available to cc_library" am: a4cdb8dd40
am: 090366ef0c

Change-Id: I2644a1cb22eaec6486e2c6ab3f3ffa63fce6c9ef
2019-10-15 21:30:04 -07:00
Pirama Arumuga Nainar
a60e81853f Merge "Pass -static-libgcc to Windows link commands" 2019-10-16 03:06:30 +00:00
Treehugger Robot
a4cdb8dd40 Merge "add [static|shared].apex_available to cc_library" 2019-10-16 02:09:44 +00:00
Pirama Arumuga Nainar
105cab2b5a Pass -static-libgcc to Windows link commands
This was unnecessary in the past, when -nodefaultlibs was used while
linking, but that changed with
aosp/I722bd6596a1f3f5819f2767c29c0fa1e8b3ec0e8.

Test: simpleperf_ndk64.exe no longer depends on libgcc_s_seh-1.dll.
Change-Id: I435d7302906eb3758e758b5aefca8763bfba6290
2019-10-15 13:58:30 -07:00
Jooyung Han
b5e41f8efe Merge changes from topic "add-vndk-apex" am: 5ac191f51f am: 5291b25795 am: 03743fafef
am: d8e583287a

Change-Id: I50e9e199fa9923ded505ff52a8eb72c541c1b393
2019-10-15 11:17:12 -07:00
Jooyung Han
cb591d0c8a Supports VNDK APEX with different versions am: 394951da73 am: 2e4c99a684 am: b12a71e6b0
am: a883c5c77f

Change-Id: I84937c20eb95f6349627bbde87f33aa814baf4c1
2019-10-15 11:17:03 -07:00
Lev Proleev
5c5e5e31ae Merge "Add android.hardware.neuralnetworks@1.3" into qt-r1-dev-plus-aosp 2019-10-15 18:08:36 +00:00
Jiyong Park
a90ca00786 add [static|shared].apex_available to cc_library
apex_available property can be appended differently per the linkage
type. This will be used to restrict certain libs (e.g.
libc_malloc_debug) to an APEX while allowing them to be statically
linkable from platform for testing purpose.

Test: m (apex_test amended)
Change-Id: I6dec23129c5ac93a3ef06fea28f26f240c0ba410
2019-10-15 15:28:07 +09:00
Mitch Phillips
302f964aa0 Do not link libc++.so statically on device.
If fuzzer coverage sanitized shared libraries are not deployed - we shouldn't
break users during dynamic link time. I need to think more about how we
should solve this problem in earnest, but for now let's just disable
static linkage of libc++ on device.

Bug: 142671952
Test: Cherrypick ag/9550833 and ag/9544155, make and run the fuzz target
there.

Change-Id: I39dfd6ba314e7a610ef3f0b30f35383a5e3a1e4b
2019-10-14 18:35:17 -07:00
Jooyung Han
d29e551efd Add __ANDROID_APEX_<NAME>__ for apex variants
With __ANDROID_APEX_<NAME>__ definition, native modules may have
different behavior when it is built for a specific apex module.

Previously, the name is passed as value of definition __ANDROID_APEX__
like -D__ANDROID_APEX__=com.android.foo. But it is difficult to do
conditional compilation with it.

Now, since the name is incorporated into definition itself, it gets
easier to set #ifdef condition.

Bug: 142582178
Test: m (soong test added)
Change-Id: I3c90c789fa692a19addf2e5a7c8d4cc571cde112
2019-10-15 07:34:02 +09:00
Jooyung Han
394951da73 Supports VNDK APEX with different versions
Older VNDK libraries are provided as vndk_prebuilt_shared modules. Those
are added to corresponding VNDK APEX as dependencies.

With VNDK APEX installed, VNDK libs are unnecessary. By the way, since
there can be vendor modules which depend on VNDK libs, Make targets are
still emitted with UNINSTALLABLE=true.

Android.mk has additional modules for vndk libraries which are named
with apex name as suffices. For example, if libfoo is a vndk library,
then libfoo.vendor is its vendor variant and it would be in
/system/lib/vndk. But with vndk apex, it has additional
libfoo.com.android.vndk.current variant.

Bug: 141451661
Bug: 139772411
Test: m (soong tests)
Test: boot with aosp_arm64 system image on Q vendor device
Change-Id: I269c28a4d4c4e2f1518bd51df558438fe5316774
2019-10-15 07:33:49 +09:00
Slava Shklyaev
236d7a7ab9 Add android.hardware.neuralnetworks@1.3
Bug: 139120468
Test: m
Change-Id: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
Merged-In: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
(cherry picked from commit f4b5a5ba08)
2019-10-11 12:52:06 +01:00
Elliott Hughes
a11242da49 Revert "-D__ANDROID_NDK__ for SDK builds."
This reverts commit c324729692.

Reason for revert: defined in bionic instead (https://android-review.googlesource.com/c/platform/bionic/+/1135146).

Change-Id: Ia5d4d1b087cd43e14919a5791b44d4816ecbb434
2019-10-11 01:25:04 +00:00
Colin Cross
5b00c21d5f Revert "Merge "Revert "Add android.hardware.neuralnetworks@1.3"" am: eccca6c246 am: b393327ccb am: 99f0abb4d9"
This reverts commit 6b3286cc7e.

Reason for revert: revert of a cherry-pick broke master

Change-Id: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
2019-10-10 22:58:07 +00:00
Lev Proleev
6b3286cc7e Merge "Revert "Add android.hardware.neuralnetworks@1.3"" am: eccca6c246 am: b393327ccb am: 99f0abb4d9
am: 14e9629af7

Change-Id: Iaaa966036c9002340026a4a7b069480102d6e43e
2019-10-10 14:54:04 -07:00
Mitch Phillips
b8e593d600 Workaround unexported sancov symbols. Fix multiple sanitizer RT deps.
Fuzz targets currently have dependencies on multiple libclang_rt runtime
libraries when building with ASan/HWAsan on device. This is an error.

This happens as Soong adds the dependency on the ASan/HWASan shared
runtime library. These libraries should provide the required UBSan
components. The clang driver was previously being passed
-fsanitize=fuzzer-no-link at link time, and as it doesn't know about the
already-established dependency on ASan/HWASan, it mistakenly thinks that
there is not runtime providing the UBSan components.

This patch fixes that problem by not adding -fsanitize=fuzzer-no-link to
the link-time flags.

This revealed a underlying issue in the upstream runtime compilation.
Android uses emulated TLS, which changes the symbol names from
<my_symbol_name> to __emutls_v._<my_symbol_name>. In particular, this
fails to account for the '__sancov_lowest_stack' symbol, as it no longer
matches the linker script rule for '__sancov*', and the symbol is no
longer exported in the shared library variant of ASan/HWASan.

This patch works around the discovered issue, which is being tracked in
the linked bug. It disables stack depth instrumentation, and we no
longer depend on this symbol. This means we get a missing sanitizer
coverage feature when fuzzing, but shouldn't be too detrimental.

Bug: 142430592
Test: SANITIZE_TARGET=hwaddress m example_fuzzer && \
readelf -d example_fuzzer # ensure only ONE libclang_rt dep (in this
case, hwasan)

Change-Id: Iea6df55d592a801732511c9b690134367429d62a
2019-10-10 10:53:48 -07:00
Lev Proleev
d84ed52753 Revert "Add android.hardware.neuralnetworks@1.3"
This reverts commit 3cf57d72ce.

Reason for revert: the topic breaks git_qt-dev-plus-aosp

Change-Id: I4ee625982dac1b12755e9ebc6e0cdb2bfbd25613
2019-10-10 13:54:14 +00:00