Commit graph

1514 commits

Author SHA1 Message Date
Evgenii Stepanov
72a8984921 Merge "Add "hwaddress" sanitizer."
am: 9b4f9afbaf

Change-Id: I163b6cbcf9c14ee6fd7a55b86f5db642abe52d0a
2018-08-20 17:11:00 -07:00
Treehugger Robot
9b4f9afbaf Merge "Add "hwaddress" sanitizer." 2018-08-20 23:22:35 +00:00
Evgenii Stepanov
d97a6e9483 Add "hwaddress" sanitizer.
This is a new sanitizer similar to ASan, but with a few differences
from the build system perspective:
* Only runs on AArch64.
* Supports static binaries.
* Bionic itself will be built with HWASan.
* Does not have any "if a library is sanitized than the binary must
  be, too" requirements unlike ASan. Even better, individual static
  libraries can be freely sanitized or not. We propagate "nosanitize"
  from binaries to static libraries anyway, because otherwise there
  is no good way to disable hwasan on a binary as a whole.

Same a CFI, we export a list of sanitized static libraries to make.
In fact, we export separate lists for vendor and regular libraries,
because it is possible for one to be sanitized without the other
(i.e. there can be mylib.hwasan.vendor w/o mylib.hwasan or vice
versa).

Bug: 112438058, 112709969
Test: manual, part of a bigger patch set

Change-Id: Ie4fdeb522ac03cf9684526882e84dfee3807b6a7
2018-08-16 13:18:47 -07:00
Colin Cross
f83e82933e Move autogenerated test config into Soong
am: 303e21f695

Change-Id: Ia2a12f6a398b8273e4c726b95e7e84a4825c7518
2018-08-14 19:34:04 -07:00
Colin Cross
303e21f695 Move autogenerated test config into Soong
Move autogenerating the test config for Soong modules into Soong
for java_test and android_test modules.

Bug: 70770641
Test: m checkbuild
Test: atest CtsUiRenderingTestCases
Change-Id: I02593add0407ef694b91c14cf27411a4f3cc4745
2018-08-14 15:44:08 -07:00
Logan Chien
70c797395f Merge "Support prebuilt shared libs end with versions" am: 0c3b508d2b
am: 31e8907827

Change-Id: Ic37a0c2e5c4c02dd42d13cb3bc413e40cfeb67f8
2018-08-12 19:01:34 -07:00
Logan Chien
0c3b508d2b Merge "Support prebuilt shared libs end with versions" 2018-08-13 01:52:23 +00:00
Hridya Valsaraju
80f85655a0 Add exclude_header_libs for recovery_available:true libs am: 280febfb14
am: 877a4c1fbc

Change-Id: Ie1b482962df94f4746c629d7fe93a8cd535cedb9
2018-08-10 12:30:40 -07:00
Hridya Valsaraju
280febfb14 Add exclude_header_libs for recovery_available:true libs
Bug: 78793464
Test: mmm
libhardware needs to be made available in recovery without
exporting bluetooth and audio headers.

Change-Id: Ib1d1bcda49abccfb9a4768580e1c1d92ead68773
2018-08-10 09:35:47 -07:00
Jiwen 'Steve' Cai
e5d9bde094 Add exclude_header_libs for vendor_available:true libs am: 8dbc653dff
am: 76180a8c7d

Change-Id: I455cbcb8e1ad894213fb4047d44d156b730d7fac
2018-08-09 23:06:04 -07:00
Jiwen 'Steve' Cai
8dbc653dff Add exclude_header_libs for vendor_available:true libs
Adding a mechanism to conditionally exclude some header library
dependencies when a lib is built for vendors.

Without this, some libraries cannot be earily marked as vendor_available
if they are depending on header libs can shouldn't be marked as
vendor_available.

By using exclude_header_libs with exclude_srcs (or __ANDROID_VNDK__
macro), we can eliminate the unnecessary dependency for vendors.

Bug: 112338314
Test: build
Change-Id: If12dceb6045099fe828fe33af2ac4428f88499a2
2018-08-09 21:19:32 -07:00
Dan Albert
0d205d4d85 Dedup version-script handling code. am: 61f32128aa
am: 3475e072b6

Change-Id: I95eb9b85c90ef5c19921f1895cbbd57763cc44c7
2018-08-09 11:51:26 -07:00
Logan Chien
031d2b32e3 Support prebuilt shared libs end with versions
This commit changes how `cc/androidmk.go` generates LOCAL_MODULE_STEM,
LOCAL_MODULE_SUFFIX, and LOCAL_BUILT_MODULE_STEM.  Now, `splitFileExt()`
takes a file name and a list of expected file extensions.
`splitFileExt()` searches the first occurrence of expected file
extensions in the file name.  If it can not find any, it will simply
return the last file extension.

Before this commit, `cc/androidmk.go` simply extracts the last file
extension (e.g. `.so`).  However, if the prebuilt shared libs end with
version numbers (e.g. `libc++.so.1`), it will use `$(LOCAL_MODULE).1` as
LOCAL_BUILT_MODULE_STEM and this will lead to missing target ninja
error.

Bug: 111579848
Test: Build a program that links libc++_host (from prebuilts/clang)
Change-Id: Id96726c69705d518ea725bb6abd8ff4527ca0cbc
2018-08-09 10:45:18 +08:00
Dan Albert
61f32128aa Dedup version-script handling code.
This is common to binaries and libraries, so move it from library.link
and binary.link to baseLinker.linkerFlags and baseLinker.linkerDeps.

Test: make checkbuild
Bug: None
Change-Id: I5fb24118e601673ae0713a6adc773a1565749be8
2018-08-08 14:36:34 -07:00
Julien Desprez
eee05612fe Merge "Support 'test_config' into soong modules" am: 7a127f97b6
am: 687965c36b

Change-Id: I4cdc3ed50e813c85951372383a707d0dc3e19793
2018-08-08 10:59:39 -07:00
Julien Desprez
e146e39fa6 Support 'test_config' into soong modules
Test: make general-tests
Bug: 110982517
Change-Id: Ib2eab2653fdfce6f699b85c9fbc64558b6d40363
2018-08-07 15:51:21 -07:00
Logan Chien
42cf4b8715 Merge "Remove LinuxClangCppflags" am: 7a1d4418d6
am: dc9321b257

Change-Id: I0988dcf773d249db6b636c936bc4b6b05e79f686
2018-07-31 11:00:34 -07:00
Logan Chien
dc9321b257 Merge "Remove LinuxClangCppflags"
am: 7a1d4418d6

Change-Id: I5507797e2ff5e7c08b9dfd1d04d15d29c290ac69
2018-07-31 10:56:27 -07:00
Logan Chien
7a1d4418d6 Merge "Remove LinuxClangCppflags" 2018-07-31 17:51:17 +00:00
Logan Chien
bef00a2c52 Remove LinuxClangCppflags
This commit removes LinuxClangCppflags.  Adding these `-isystem` flags
results in build failures when we build a module with `libc++_host`.
Furthermore, these headers are not being used anymore.

Bug: 111579848
Test: make checkbuild  # on aosp and internal
Change-Id: Ideca268431d9d60d383e3e5b7bb3f73ece416bd2
2018-07-31 01:45:00 +08:00
Chih-Hung Hsieh
bafbeac702 Do not pass -flto dependent flags to clang-tidy. am: ff7cff7268
am: 9e7e09b77a

Change-Id: Ia26281d74e74cb4aa6f111e2273a012e9a266350
2018-07-26 20:23:10 -07:00
Chih-Hung Hsieh
9e7e09b77a Do not pass -flto dependent flags to clang-tidy.
am: ff7cff7268

Change-Id: I0da058960c67b69ecf2df63e5f2b385b82eea80e
2018-07-26 20:19:07 -07:00
Chih-Hung Hsieh
ff7cff7268 Do not pass -flto dependent flags to clang-tidy.
Bug: 111885396
Test: run with WITH_TIDY=1
Change-Id: I92468491cdc5894d1197f6c1631e2073c6e7c4fa
2018-07-26 17:43:12 -07:00
Chih-Hung Hsieh
d31b3f87dd Merge "Do not pass -flto and -fsanitize flags to clang-tidy." am: 9f65ef8cd9
am: 167d8c77ba

Change-Id: Ibe7416e9ae2b5b1f73dda5862a3c3eebda33bc60
2018-07-26 17:04:54 -07:00
Chih-Hung Hsieh
167d8c77ba Merge "Do not pass -flto and -fsanitize flags to clang-tidy."
am: 9f65ef8cd9

Change-Id: I7edbaaa8cccabe2b2952fa88499bdfbecfecf60a
2018-07-26 16:59:42 -07:00
Chih-Hung Hsieh
5942fe4fd1 Do not pass -flto and -fsanitize flags to clang-tidy.
Some flags stop clang-tidy to search included header files.

Bug: 111885396
Test: run with WITH_TIDY=1
Change-Id: Ie1ac37298793c015286db0f5caa252b67f4db365
2018-07-26 15:00:28 -07:00
Ryan Prichard
07c5952b1d Revert part of "Stop versioning NDK stubs pre-M." am: 37ebbdee6c
am: 81947d241c

Change-Id: I49be6f68894928f09557305d8ddedf5616b9c1e7
2018-07-24 17:14:57 -07:00
Ryan Prichard
81947d241c Revert part of "Stop versioning NDK stubs pre-M."
am: 37ebbdee6c

Change-Id: Icd202a99e39622e9d788763bf819a0d7be5acfad
2018-07-24 17:05:41 -07:00
Dan Albert
6bc5b8320f Stop versioning NDK stubs pre-M.
Test: make ndk # readelf various stubs to check version info
Bug: https://github.com/android-ndk/ndk/issues/622
Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
Merged-In: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
(cherry picked from commit c229f38e93)
2018-07-24 22:52:57 +00:00
Ryan Prichard
37ebbdee6c Revert part of "Stop versioning NDK stubs pre-M."
This reverts commit e67144e302.

Keep the getApiLevelsMap function and keep using it in
shouldUseVersionScript. It seems useful. (Also, keeping it probably avoids
an AOSP->internal merge conflict...)

Bug: https://github.com/android-ndk/ndk/issues/750
Test: m out/soong/ndk.timestamp, examine dynsym in stubs
Change-Id: Icbb26fc46a9a1dc99f22af195468f08713c4f216
2018-07-24 12:46:35 -07:00
Dan Willemsen
6f952934cb Remove clang: false support am: 742a5453c2
am: 4713e25788

Change-Id: Ib39f9ad249a632ac4d8024a5c37a29f096c6ae1f
2018-07-23 19:26:00 -07:00
Dan Willemsen
4713e25788 Remove clang: false support
am: 742a5453c2

Change-Id: Idcb738ca7cb39882157f36ca44ef492fe2a8b0a0
2018-07-23 19:20:56 -07:00
Dan Willemsen
742a5453c2 Remove clang: false support
Most everything in Soong is using clang (and we're getting very close
for Make as well), so remove the ability to select GCC to build a
module.

We still need to keep the internal functionality around to find libgcc.a
and other toolchain_library modules with GCC.

Test: m blueprint_tools
Change-Id: I5ef3e3836b9ad3e160669ac32aee39698c9b72c3
2018-07-23 17:19:36 -07:00
Dan Willemsen
7c6bbd6c1f Fix go vet issues am: 59339a29e1
am: af42826aee

Change-Id: I6e8d7a9d3abb13b035e394f7c0657d49d64f8b5b
2018-07-22 23:28:00 -07:00
Dan Willemsen
af42826aee Fix go vet issues
am: 59339a29e1

Change-Id: I6c5de64ee36c1dde4e043b36f84d2cf140afac41
2018-07-22 23:23:59 -07:00
Dan Willemsen
59339a29e1 Fix go vet issues
Test: go vet ./...
Change-Id: Ifb936ccc5e2b5a2c3fcbbbcb54f680e2973ea1b3
2018-07-22 21:18:45 -07:00
Logan Chien
68fa0cfc5a Merge changes I420a5953,I8e2352f3,I7a6bb905 am: 23be383843
am: 8847412281

Change-Id: I8438e42982d62a68f4dea625e2b9c3f0bd444545
2018-07-18 21:26:21 -07:00
Logan Chien
8847412281 Merge changes I420a5953,I8e2352f3,I7a6bb905
am: 23be383843

Change-Id: Ie35e110f38405cb018a887274c6099456844c454
2018-07-18 21:22:24 -07:00
Treehugger Robot
23be383843 Merge changes I420a5953,I8e2352f3,I7a6bb905
* changes:
  Support text ABI dump file format
  Remove vndkVsNdk()
  Remove isSourceDump from PathForVndkRefAbiDump()
2018-07-19 04:15:30 +00:00
Treehugger Robot
cdf399c40a Merge "Stop versioning NDK stubs pre-M." 2018-07-18 01:13:49 +00:00
Dan Albert
e67144e302 Stop versioning NDK stubs pre-M.
Test: make ndk # readelf various stubs to check version info
Bug: https://github.com/android-ndk/ndk/issues/622
Merged-In: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
2018-07-17 23:26:00 +00:00
Dan Albert
c229f38e93 Stop versioning NDK stubs pre-M.
Test: make ndk # readelf various stubs to check version info
Bug: https://github.com/android-ndk/ndk/issues/622
Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
2018-07-13 13:25:33 -07:00
Jiyong Park
84e78c4973 Merge "Don't create non-primary arch variant for recovery-only module" am: 9ea9fc3dee
am: 7f413148ed

Change-Id: I7aa7634ee2ece3c39b1dcaebccfedf7d785857f1
2018-07-12 18:44:11 -07:00
Jiyong Park
7f413148ed Merge "Don't create non-primary arch variant for recovery-only module"
am: 9ea9fc3dee

Change-Id: Ibe1274c36c9233ee396d323544c6aa599f635ae5
2018-07-12 17:14:44 -07:00
Jiyong Park
37b252096a Don't create non-primary arch variant for recovery-only module
To save space, only the primary arch variant is installed to the
recovery partition. This has been done in the imageMutator by not
creating recovery variant for the non-primary arch.

However, this caused a problem for recover-only module, i.e., recovery:
true. Such module ends up creating no variant for the non-primary arch.
Since every other modules are at least in one image variant, any
dependency fro such module with no image variant can't be satisfied.

In order to solve the problem, archMutator is modified to create only
the primary arch for recovery-only modules.

Bug: 111321972
Test: m -j (TestRecovery added)
Change-Id: Ie32ae06fb094efcfd8531cdf6071139d292d93ab
2018-07-12 10:49:30 +09:00
Logan Chien
7eefdc4ed2 Support text ABI dump file format
This commit adds an option to read ABI reference dump in text file
format directly from `prebuilts/abi-dumps`.  If both the text file and
the gzip format exist, an error will be emitted.

Bug: 78650426
Test: create libexif.lsdump.gz and it works as usual
Test: create libexif.lsdump (decompressed) and it works
Test: touch both libexif.lsdump.gz and libexif.lsdump and it errors
Change-Id: I420a5953fb80855cb5c07e5a4d347fb6709f0340
2018-07-11 18:37:50 +08:00
Logan Chien
5237bed1c4 Remove vndkVsNdk()
This commmit removes `vndkVsNdk()`, which is essentially
`!inList(ctx.baseModuleName(), llndkLibraries)`.

Test: lunch aosp_arm64_ab-userdebug && make
Change-Id: I8e2352f302df30057997944678f176f4550d3f75
2018-07-11 17:30:39 +08:00
Logan Chien
83c415f955 Remove isSourceDump from PathForVndkRefAbiDump()
This commit removes `isSourceDump` from `PathForVndkRefAbiDump()`
because the binary dump paths are not being used at all.

Test: lunch aosp_arm64_ab-userdebug && make
Change-Id: I7a6bb9053a6b052590fb1152982949fee897df8d
2018-07-11 15:27:36 +08:00
Logan Chien
2fbf1cba9d Merge "Cleanup createVndkSourceAbiDump()" am: f33dca0ada
am: 322ab10d5a

Change-Id: I0e1abe56f73cb0285e14b26ac13217978ff36aeb
2018-07-10 20:23:14 -07:00
Logan Chien
322ab10d5a Merge "Cleanup createVndkSourceAbiDump()"
am: f33dca0ada

Change-Id: I4be5bfa5f3c9affc946942f9dd6915c1f36e0e65
2018-07-10 20:18:54 -07:00