Commit graph

5418 commits

Author SHA1 Message Date
Caroline Tice
04f8d2d407 Merge "Make DWARF v5 the default debug information format." 2021-06-24 21:24:22 +00:00
Treehugger Robot
31b66c76c8 Merge "Disable ubsan diagnostics under HWASan." 2021-06-23 21:30:46 +00:00
Evgenii Stepanov
b15a564869 Disable ubsan diagnostics under HWASan.
This is a workaround for a compiler bug that makes this combination
extremely slow to build.

Bug: 191808836
Test: m net_test_btm_iso with SANITIZE_TARGET=hwaddress
Change-Id: Ide7436bbc564413cb2f29355ada5286976607205
2021-06-23 12:57:46 -07:00
Jooyung Han
7d6e79bc63 VNDK APEX: skips VNDK-Ext
In legacy VNDK mode (DeviceVndkVesion=""), the check was missing. We
don't want VNDK-Ext in VNDK APEX in any case.

Bug: 191770320
Test: m nothing
Change-Id: I08f36a4c1696bf82d25d629841e172d2716a366d
2021-06-24 01:56:03 +09:00
Pirama Arumuga Nainar
8195cdf8e3 [cc/pgo] Mark pgo.sampling property as an arch-variant
Bug: http://b/189438896

This allows disabling sampling PGO for some arches.

Test: Build this topic.
Change-Id: Ib6ddca6685c2e53092afd440ad95ec42d3a9538b
Merged-In: Ib6ddca6685c2e53092afd440ad95ec42d3a9538b
(cherry picked from commit 19a5aae35e)
2021-06-18 11:11:46 -07:00
Inseob Kim
800d114003 Add install_in_root to cc_binary
To support init_first_stage, install_in_root property is added to
cc_binary. The output is installed to {partition}, rather than
{partition}/{mount_point}/bin.

Bug: 187196593
Test: build init_first_stage
Change-Id: Ibc351645308676ed188f748972eb6312c9cbd64f
2021-06-18 05:25:44 +00:00
Lukacs T. Berki
2063a0d7b8 Make the IsSdkVariant field and method the same.
Before, the IsSdkVariant() method also checked AlwaysSdk(). Instead,
sdkMutator now sets the IsSdkVariant field to True even for the single
variation it creates when AlwaysSdk is true.

Test: Presubmits.
Change-Id: Ied8b42a3441a30484ef8c5dff5aade5fe92574bb
2021-06-17 09:32:36 +02:00
Colin Cross
9fb2d1fb62 Merge changes from topic "ndk_libandroid_support_late_static_libs"
* changes:
  Use LateStaticLibs for ndk_libandroid_support
  Move LateStaticLibs after SharedLibs in the dependency include order
  Test include directory ordering
2021-06-16 21:54:37 +00:00
Pirama Arumuga Nainar
8d24812be7 Merge "Revert "Switch to clang-r416183d"" 2021-06-16 20:00:18 +00:00
Pirama Arumuga Nainar
e6f19467c1 Revert "Switch to clang-r416183d"
Revert submission 1737013-switch-to-clang-r416183d

Bug: http://b/191276541
Bug: http://b/189328402

Reason for revert: Breaks renderscript_mac build
Reverted Changes:
I25142ddaa:[scripts/symbol] Switch to clang-r416183d
If11e59638:Switch to clang-r416183d

Change-Id: I9e95b4823f111d4482f9fbb5da48acc62f74cc8c
2021-06-16 18:26:49 +00:00
Treehugger Robot
2f1b9cb86a Merge "Switch to clang-r416183d" 2021-06-16 17:46:24 +00:00
Colin Cross
956e32c1be Merge "Use a linker script for host bionic embedded linker sections" 2021-06-16 16:51:10 +00:00
Colin Cross
baf4f0c30a Merge changes Ie384089d,Ie2e954cd
* changes:
  Support genrules as CrtBegin and CrtEnd
  Support multiple CrtBegin and CrtEnd files
2021-06-16 16:50:59 +00:00
Colin Cross
f77d3804fc Merge changes from topic "host_bionic_no_inject"
* changes:
  Give extracted linker sections pretty names
  Stop injecting symbols into host bionic binaries
2021-06-16 16:50:05 +00:00
Jingwen Chen
d51502d238 Merge "Make SharedLibraryInfo comment clearer." 2021-06-16 12:01:21 +00:00
Jingwen Chen
c4dc9b4f08 bp2build: group shared/static attrs into a struct.
This makes bp2build generate these attrs into a Starlark dictionary,
passed into the cc_library macro directly. This makes the BUILD target
representation more similar to the Android.bp one, and also makes
it more legible.

Test: TH
Change-Id: I42b427cc4b22c6376d3d24e40b9af1692bb0c692
2021-06-16 05:40:37 +00:00
Jingwen Chen
702963e74d Make SharedLibraryInfo comment clearer.
Nit from aosp/1727935

Test: TH
Change-Id: I4cf6d63fb3b1f0bd1762d5e4ea261aa8f5a4b580
2021-06-15 23:44:13 +00:00
Treehugger Robot
3420b834d8 Merge changes I0aee679a,I7fb380a3
* changes:
  Add systemapi as an APEX synonym for stub maps.
  Refactor tag handling code in stub generator.
2021-06-15 22:59:10 +00:00
Treehugger Robot
45d7289e7c Merge "Don't enforce ordering for ABI validation." 2021-06-15 21:41:57 +00:00
Pirama Arumuga Nainar
f9d141ee9a Merge "Mark more fields in BaseLinkerProperties as arch variant" 2021-06-15 21:14:14 +00:00
Dan Albert
4922703e86 Don't enforce ordering for ABI validation.
We care that these run, but they don't need to complete before we use
the sysroot.

Test: mm in CTS, saw ABI dump run
Bug: None
Change-Id: Iff1961d1ff03430d808caa83b3ca1fc1eceecfcd
2021-06-15 13:26:55 -07:00
Pirama Arumuga Nainar
250c5217a2 Mark more fields in BaseLinkerProperties as arch variant
Bug: http://b/189438896

This allows setting a different version script for vendor and
platform variants.

Test: The following blueprint snippet builds:
      target: { android_arm64: {
        target: vendor: {
            version_script: "..." } } }
Change-Id: I47e7afeaee3c9124f4231bf0eece7b6844b5313d
2021-06-15 11:03:48 -07:00
Lukács T. Berki
84a1601804 Merge "Update some comments about the image mutator." 2021-06-15 15:50:11 +00:00
Lukacs T. Berki
2f5c340b49 Update some comments about the image mutator.
Test: It's just comment changes.
Change-Id: Idac69f5369caad028f3daa6aa5c1088d697c07e2
2021-06-15 15:49:51 +02:00
Chris Parsons
94a0bba5a9 Support cc_library_shared for mixed builds
Authors: cparsons, eakammer, jingwen

This CL also contains .toc file integration between Bazel and Make.

Fixes: b/190524879

Test: build/bazel/ci/mixed_droid.sh

Co-authored-by: Christopher Parsons <cparsons@google.com>
Co-authored-by: Liz Kammer <eakammer@google.com>
Co-authored-by: Jingwen Chen <jingwen@google.com>

Change-Id: If484042a58cb9f0db6d30a460f415f5684b4cbf6
2021-06-15 12:40:28 +00:00
Colin Cross
c113e3cbe7 Use LateStaticLibs for ndk_libandroid_support
This will obsolete the workaround in prebuilts/ndk/Android.bp to
export the ndk_libandroid_support headers from ndk_libc++_shared,
which would no longer have worked after the next patch.

Test: m checkbuild
Test: TestIncludeDirectoryOrdering
Change-Id: I9b4e5799d939433da547661b862e9db5a4aacb09
2021-06-14 18:12:58 -07:00
Colin Cross
fe9acfecb3 Move LateStaticLibs after SharedLibs in the dependency include order
LateStaticLibs has always been after StaticLibs, move it after
SharedLibs too so that exported headers from LateStaticLibs
dependencies come after exported headers from SharedLibs dependencies.
This will be used to ensure the ndk_libandroid_support headers come
after the ndk_libc++_shared headers.

Test: m checkbuild
Change-Id: I5ef180c99cefcd823c6970c06d0e772a10fa0456
2021-06-14 18:12:58 -07:00
Colin Cross
ae62818dd8 Test include directory ordering
Add a test to verify include directory ordering on the command line.

Test: TestIncludeDirectryOrdering
Change-Id: Iaf03c57201e9ec7a8daf417cb91470a5215e4053
2021-06-14 18:12:52 -07:00
Pirama Arumuga Nainar
09661c5a93 Switch to clang-r416183d
Bug: http://b/189328402

This contains a fix to AArch64 __clear_cache.

Test: TH + Manual verification by emulator team.
Change-Id: If11e59638f47a5c9532d84d19c7a76e6e8718af8
2021-06-14 09:56:03 -07:00
Colin Cross
9cfe6119fe Use a linker script for host bionic embedded linker sections
Use an implicit linker script instead of flags in a file to specify
the locations of the host bionic embedded linker and to prevent it
from being stripped.

Test: build and run host bionic binary
Change-Id: I64e12118d33c67bab5e657cbc3ea8cde8f0fd7e6
2021-06-11 18:02:22 -07:00
Colin Cross
cef792e467 Support genrules as CrtBegin and CrtEnd
Host bionic will use a genrule output as a linker script in CrtBegin,
support genrules as Crt* dependencies.

Test: go test ./build/soong/cc/...
Change-Id: Ie384089d26459797d0b4b5fef84846507fc508ad
2021-06-11 18:01:26 -07:00
Colin Cross
c465efd5d4 Support multiple CrtBegin and CrtEnd files
Host bionic will use multiple files for CrtBegin, make CrtBegin and
CrtEnd Paths instead of OptionalPath.

Test: go test ./build/soong/cc/...
Change-Id: Ie2e954cd87808a903617696da443009f6173e312
2021-06-11 18:00:04 -07:00
Colin Cross
f04eb99acc Stop injecting symbols into host bionic binaries
The host bionic bootstrapping no longer needs an injected symbol.
Replace host_bionic_inject with host_bionic_verify that validates
the resulting binary, and add it as a validation dependency of the
binary.

Test: build and run host bionic binary
Change-Id: I3e303d2a164b6eef851bdc8075e6ee456c05b0a8
2021-06-11 15:22:41 -07:00
Liz Kammer
2d7bbe3883 Append _alwayslink to prebuilt whole static deps
This allows us to support prebuilt archives that are part of whole
static deps.

Test: build/bazel/ci/bp2build.sh
Bug: 190716727

Change-Id: I913dbd8f85a1974fbd53c0cbaa49211db18ea45f
2021-06-11 08:10:50 -04:00
Dan Albert
56f52de8bd Add systemapi as an APEX synonym for stub maps.
The apex tag is currently used for platform-to-APEX, APEX-to-APEX, and
APEX-to-platform, and it's difficult to tell when reviewing the map
files. Add a synonym so authors can be explicit about platform-to-APEX
since those have different stability rules.

Test: pytest
Test: mypy
Test: pylint
Test: treehugger
Bug: None
Change-Id: I0aee679a05b1b2d3749307434c19486bf4c7fe52
2021-06-10 16:38:19 -07:00
Dan Albert
ead21552ee Refactor tag handling code in stub generator.
Test: pytest
Test: pylint
Test: mypy
Test: treehugger
Bug: None
Change-Id: I7fb380a3d879b4abcdadfe4aafff0ca4098d2e07
2021-06-10 16:38:19 -07:00
Jingwen Chen
3d383bbeb9 bp2build: support strip properties.
This CL adds support to bp2build for generating all strip-related
properties into a strip dictionary as a parameter in the cc_library
macro.

With the dictionary, it's easy to organize related attributes and
directly expand into a stripped_shared_library's attributes.

Test: //build/bazel/tests/bionic:compare_libc_stripping
Test: TH
Fixes: b/187928597
Change-Id: Ifea68d48fe295e71a43b12876cb168c475a62187
2021-06-10 05:22:50 +00:00
Treehugger Robot
75851d2fb6 Merge "Only store what's used in SharedLibraryInfo" 2021-06-09 05:49:15 +00:00
Treehugger Robot
f218e3d0c2 Merge "Handle no_libcrt in bp2build." 2021-06-09 00:48:06 +00:00
Jooyung Han
7f6e057f23 Merge "Interpret CRT object's min_sdk_version with ApiLevel" 2021-06-09 00:07:29 +00:00
Liz Kammer
d366c909ca Handle no_libcrt in bp2build.
Test: ci/bp2build.sh
Bug: 187928307
Change-Id: Ib80c4318169652b322e5d878c8784679e42f87dd
2021-06-08 17:18:22 -04:00
Liz Kammer
ef6dfea679 Only store what's used in SharedLibraryInfo
There was a reference to the static library provider, but only the
transitive static deps were used, so only store that part. Other members
were stored but unused anywhere.

Test: go test soong tests
Test: m nothing
Change-Id: I12a6b94806c052c3f0df3cab0a10f17042af1c38
2021-06-08 16:44:23 -04:00
Yo Chiang
c33cceb408 Merge "cc/sabi.go: Propagate ShouldCreateSourceAbiDump to reuseObjTag deps" 2021-06-08 06:02:07 +00:00
Jooyung Han
94a76ee868 Interpret CRT object's min_sdk_version with ApiLevel
min_sdk_version values should be interpreted before use.

Bug: n/a
Test: m (in REL)
Change-Id: Ia45f5c7aeb4efcd8daef1deaf54f333dcdd1379d
2021-06-08 09:49:48 +09:00
Dan Albert
ad66593085 Disable ABI dumps on Darwin.
I'm not sure why these targets are getting built as part of the sdk
build anyway, but we don't need them.

Test: treehugger
Bug: http://b/156513478
Bug: http://b/190394921
Change-Id: I1ea0e75f459ad7cad648f96b67a4f2424d36fda7
2021-06-07 13:22:30 -07:00
Liz Kammer
2f26595072 Merge changes I4a5ea40c,I40ab16e3
* changes:
  Handle excludes_{shared,static}_libs
  Extract function to handle configurable excludes
2021-06-07 16:42:38 +00:00
Yi-Yo Chiang
21d1c6d637 cc/sabi.go: Propagate ShouldCreateSourceAbiDump to reuseObjTag deps
`reuseObjTag` is a dependency from the shared variant of a `cc_library`
to the static variant. When such dependency exist, the shared variant
would reuse the object files of the static variant.
Thus if the shared variant requires ABI dump, then the static variant
would need to generate ABI dump as well.

Bug: 190339664
Test: m findlsdump
Change-Id: I015328d74acbeb89ff7622397e59b68864af34a4
2021-06-07 20:29:11 +08:00
Lukacs T. Berki
1af9316e0a Remove sort_bss_symbols_by_size.
Its only use was removed in aosp/1717013.

Bug: 187928080
Test: Presubmits.
Change-Id: If6acbfe8ba21ec4dc34166768ba1bde3bb78123c
2021-06-07 09:23:15 +02:00
Dan Albert
07538bb56b Merge "Use libabigail to track NDK ABIs." 2021-06-04 21:06:00 +00:00
Pirama Arumuga Nainar
e36a3d9d0d Merge "[cc] Cleanup unused function" 2021-06-04 20:31:00 +00:00