Commit Graph

3749 Commits

Author SHA1 Message Date
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
Mitch Phillips
641575ad41 Fuzz corpus entries should not go in a subdirectory.
Corpus files called 'FOO' incorrectly go into a subdirectory in the
exported zipfile, e.g.:
my_fuzzer/corpus/FOO/FOO

This patch removes that extra, unnecessary intermediate directory,
e.g.:
my_fuzzer/corpus/FOO

Bug: 142432347
Test: m fuzz && unzip -l out/soong/fuzz-host-x86_64.zip
Change-Id: Id23d4dd2d8322a8ad0234f8acb6878ea4dc3c6e4
2019-10-09 17:34:42 -07:00
Slava Shklyaev
3cf57d72ce Add android.hardware.neuralnetworks@1.3
Bug: 139120468
Test: m
Change-Id: Iee24fd8e70805eab3e352186e543fe02246a6a72
Merged-In: Iee24fd8e70805eab3e352186e543fe02246a6a72
(cherry picked from commit f4b5a5ba08)
2019-10-08 16:58:43 +01:00
Jiyong Park
486f0cd420 Merge "Remove no_apex in favor or apex_available" am: e89b8fb919 am: 6064472edb am: 0967f3db26
am: 4ee6e75ab3

Change-Id: Id39dc85de7f1f7e825b8efd3cdfba733c1ffc3b2
2019-10-07 23:00:31 -07:00
Treehugger Robot
e89b8fb919 Merge "Remove no_apex in favor or apex_available" 2019-10-08 05:33:29 +00:00
Colin Cross
3bdda8b2cb Merge "Remove old-style support for translated second architectures" am: c6136c9d65 am: 2e7e4df578 am: 3a10b29e2c
am: 98414f45d5

Change-Id: I87c857d22ba27f69f3c00a16d14206446f1fbc5c
2019-10-07 14:27:40 -07:00
Treehugger Robot
c6136c9d65 Merge "Remove old-style support for translated second architectures" 2019-10-07 20:48:07 +00:00
Colin Cross
3a10202b4d Merge "Use localPool consistently for UseGoma() == true" am: 96ce6ab143 am: eb767a021e am: 0905467ec7
am: d730e66c7b

Change-Id: I673c6c80cd7f680d5472463ba4068b3b00031b3f
2019-10-04 12:25:39 -07:00
Treehugger Robot
96ce6ab143 Merge "Use localPool consistently for UseGoma() == true" 2019-10-04 18:36:07 +00:00
Lev Proleev
572c773037 Merge "Add android.hardware.neuralnetworks@1.3" 2019-10-04 15:34:10 +00:00
Colin Cross
4aff9b736c Merge "Use -nostdlib++ instead of -nodefaultlibs" am: 92e03dfb3e am: 43f21552b3 am: 0eaa247499
am: 6c06ca194f

Change-Id: I7c844f6ce047f8cc4848387360554ee981731671
2019-10-03 20:53:58 -07:00
Colin Cross
92e03dfb3e Merge "Use -nostdlib++ instead of -nodefaultlibs" 2019-10-04 03:26:11 +00:00
Colin Cross
f7a17daefe Use -nostdlib++ instead of -nodefaultlibs
Host builds using libc++ used -nodefaultlibs to turn off the default
C++ runtime, and then added back all the other necessary libraries.
Clang supports -nostdlib++ since https://reviews.llvm.org/D47115
that removes the C++ runtime without affecting the other default
libraries.  Use -nostdlib++, and remove the lists of default
libraries.

Test: m checkbuild
Change-Id: I722bd6596a1f3f5819f2767c29c0fa1e8b3ec0e8
2019-10-03 16:09:01 -07:00
Colin Cross
636e40b507 Merge changes from topic "install" am: 4acb77e76a am: 789fc863bb am: 42bd16e072
am: 0c8f7bd16c

Change-Id: I9b473e2a13cf1507d46e6fb6b4fe6114d6bacf22
2019-10-03 15:26:13 -07:00
Colin Cross
873f11ce75 Separate InstallPath from OutputPath am: 70dda7e3da am: 21daf4e438 am: 0b2cc5da8e
am: f003ddfd8e

Change-Id: I7e4f6f7394f057924d55e72735c67c9f45b4ddd7
2019-10-03 15:26:08 -07:00
Colin Cross
70dda7e3da Separate InstallPath from OutputPath
Create a new type InstallPath that is similar to OutputPath to
differentiate intermediates output paths from installed output
paths.

RelPathString is a poorly defined, undocumented function that is
primarily used to get an install path relative to out/soong to
generate an equivalent install path for Make relative to $(OUT_DIR).
Move it to InstallPath for now, and fix the one remaining user on
OutputPath.

Add a method to create an NDK install path so that ndk_sysroot.go
doesn't have to do it manually with PathForOutput.

Bug: 141877526
Test: m checkbuild
Change-Id: I83c5a0bd1fd6c3dba8d3b6d20d039f64f353ddd5
2019-10-03 10:07:53 -07:00
Colin Cross
ff6c33d885 Replace RelPathString() with ToMakePath()
Add a ToMakePath() method that returns a new path that points out
out/ instead of out/soong/, and replace the
"$(OUT_DIR)/" + path.RelPathString()
pattern with
path.ToMakePath().String()

Bug: 141877526
Test: m checkbuild
Change-Id: I391b9f2ed78c83a58d905d48355ce9b01d610d16
2019-10-03 10:07:53 -07:00
Colin Cross
6f740ac77a Merge "Hide static from cc_library_shared and vice versa" am: 62be1e3e33 am: cd2af25aaf am: cc0466c892
am: edb4ec605a

Change-Id: I6ef87af92abe31fd4dfa29202b3626b84c0adf74
2019-10-02 16:10:45 -07:00
Treehugger Robot
62be1e3e33 Merge "Hide static from cc_library_shared and vice versa" 2019-10-02 21:39:37 +00:00
Pete Bentley
5bd851aceb Merge "Use SHA-256 for hashing BoringSSL crypto module." am: b244e84de6 am: 7f6cabebf0 am: 2dbb177ad1
am: 73f1c79571

Change-Id: If857b02dbe3fceb8ee96d06f37f5083f3dc2047a
2019-10-02 09:40:12 -07:00
Treehugger Robot
b244e84de6 Merge "Use SHA-256 for hashing BoringSSL crypto module." 2019-10-02 15:59:36 +00:00
Yi Kong
bc36047239 Merge "Remove -Wno-c++98-compat-extra-semi warning flag" am: 444c809bbc am: 3d472c61aa am: 2f0bc4f791
am: 6b9b949711

Change-Id: I72131845b825655da31b453adb65194ed02902dd
2019-10-01 23:03:48 -07:00
Yi Kong
444c809bbc Merge "Remove -Wno-c++98-compat-extra-semi warning flag" 2019-10-02 05:16:46 +00:00
Jiyong Park
7916bfc3cc Remove no_apex in favor or apex_available
This change reverts following three changes to remove the no_apex
property. no_apex: true is equivalent to apex_available:
["//apex_available:platform"].

Revert "fix: "no_apex" can be put in defaults"
This reverts commit cc372c5b1d.

Revert "Add no_apex check for static library"
This reverts commit 2db7f46d0c.

Revert "Add no_apex property"
This reverts commit 4f7dd9b4db.

Bug: 139870423
Bug: 128708192
Test: m

Change-Id: Ia4b094e371e9f8adff94ae6dc3ebb8e081381d4e
2019-10-02 14:12:16 +09:00
Yi Kong
d0ce0fbfde Remove -Wno-c++98-compat-extra-semi warning flag
hidl/aidl actually does concern about this warning. After fixing their
codebase, this flag is no longer needed.

Test: presubmit
Change-Id: Id88abea88137be0f873c21db76644fe78b9045c8
2019-10-01 22:42:59 +00:00
Colin Cross
2e2dbc250a Use localPool consistently for UseGoma() == true
Remove the distinction between pctx.StaticRule and
pctx.AndroidStaticRule so that all of the local rules correctly
get assigned to the localPool.  Also put Module and Singleton
rules into the localPool.

Test: compare out/soong/build.ninja
Change-Id: Id2bb38eff3c7209340fe55bc9006f00bd3661d81
2019-10-01 14:11:20 -07:00
Jesse Pai
c58a674199 Merge changes from topic "soong_c_flags" am: f856c005cb am: dabeabf683 am: 2e4c50465e
am: 14e69e5393

Change-Id: I577f8c5ebf11c1a3c68a2050709b9ca21fcdf09c
2019-10-01 13:51:53 -07:00
Treehugger Robot
f856c005cb Merge changes from topic "soong_c_flags"
* changes:
  Creation of C Flags Build Variables
  Move sharding functions for reuse
2019-10-01 19:25:50 +00:00
Pete Bentley
5c4be82ce0 Use SHA-256 for hashing BoringSSL crypto module.
Reason: Performs significantley better than SHA-512
on ARM64 devices

Bug: 141710485
Test: flashall
Change-Id: I40f0873d3e705a75b9a7a3ba1445a9176afff77b
2019-10-01 17:03:17 +01:00