Commit graph

5450 commits

Author SHA1 Message Date
Liz Kammer
7b920b4057 Update memtag code behavior to match comment.
Test: go test soong tests
Change-Id: I630c06f01c90256b1990c37b9236e8967a5fa316
2021-07-08 11:19:15 -04:00
Liz Kammer
d56ddb5482 Reorganize memtag tests for clarity.
Test: go test soong tests
Change-Id: Id861a62bd0ff2b6a5a4354fbda939e9ebb13a2a5
2021-07-08 11:19:15 -04:00
Liz Kammer
75b9b40a56 Add comments to sanitizer properties.
Test: n/a
Change-Id: If71bb4683a4ae969670235c51b3f1b3af2073f91
2021-07-08 11:19:12 -04:00
Liz Kammer
187d5445e8 Remove IsDependencyRoot from interface
This is equivalent to Binary() -- reduce the interface and improve
clarity.

Test: go test soong tests
Change-Id: I770f5ce79fd4d888586d31ec5e67be88153626b6
2021-07-07 16:29:09 -04:00
Liz Kammer
b2fc4700de Delete local boolPtr function
This is defined in proptools, no need to duplicate.

Test: go test soong tests
Change-Id: I32d4417dc4ae73bff98f36360ed22aed572d8c18
2021-07-07 16:29:09 -04:00
Treehugger Robot
503e3a10b2 Merge "Include static lib information for the snapshot modules" 2021-07-01 22:24:33 +00:00
Treehugger Robot
31b9a0c9da Merge "Delete unused functions" 2021-07-01 22:20:04 +00:00
Colin Cross
34d52eed1e Merge "Export NewPrebuiltObject" 2021-07-01 20:53:24 +00:00
Colin Cross
8c3339f74c Merge "Support shared_libs, static_libs and default_shared_libs in cc_object" 2021-07-01 19:00:40 +00:00
Justin Yun
5e03586365 Include static lib information for the snapshot modules
snapshot modules require the list of static libs to find the NOTICE
files for the snapshot modules.
snapshot binaries must include static_executable property to check if
non static binaries have libc as a static lib.

Bug: 190690041
Test: Check NOTICE for libaudiopreprocessing.so built from snapshots.
Change-Id: I53f7549a158ab27ada87833a3f4d58620aa7c3cf
2021-07-01 11:42:28 +00:00
Colin Cross
e19e6196b9 Merge "Add default_shared_libs property" 2021-06-30 14:27:20 +00:00
Colin Cross
dd8b6911ac Merge "Reland "Consistently prepend arch-specific headers"" 2021-06-30 00:19:56 +00:00
Colin Cross
0ed579efd9 Reland "Consistently prepend arch-specific headers"
This reverts commit cacb972dcd.

Relanding along with one more fix in prebuilts/ndk

Change-Id: I65cbc3c5d72bb47bd00e123c63911c9baa1e5f03
Test: m checkbuild
2021-06-29 00:51:12 +00:00
Colin Cross
cacb972dcd Revert "Consistently prepend arch-specific headers"
This reverts commit e945a4d212.

Reason for revert: broke full-eng checkbuild

Change-Id: I0036fed96aa727b63c16982151fd661923e77e59
2021-06-28 23:58:59 +00:00
Dan Albert
08327ac7fc Add test for empty stub generation.
Seems this works, but adding the test anyway.

Test: pytest
Bug: None
Change-Id: I32903246a037f942e87b35479d07a8f30853f9e4
2021-06-28 15:50:55 -07:00
Colin Cross
7061f79228 Merge changes I7fdc1f53,I422315f0,Ia34b80d9
* changes:
  Move default crt objects into Toolchain
  Add DefaultSharedLibraries to Toolchain
  Create toolchainBionic for the various bionic-based toolchains to inherit from
2021-06-28 17:08:10 +00:00
Liz Kammer
3b606c8218 Delete unused functions
As they're unused, also removing them from the interface.

Test: go test soong tests
Change-Id: I76e7cbca12876395d8d7eaae4481c5e0d1350d76
2021-06-28 12:29:30 -04:00
Treehugger Robot
7c32e223e8 Merge "Move notememtag tests to sanitize_test.go" 2021-06-27 12:53:58 +00:00
Colin Cross
7cabd42a80 Export NewPrebuiltObject
Export NewPrebuiltObject so that clang can use it to provide
clang_rt.crt* cc_object modules.

Test: m checkbuild
Change-Id: I659f956815b140ba064b29284c210c24ae882015
2021-06-25 16:46:52 -07:00
Colin Cross
137d7dafd8 Support shared_libs, static_libs and default_shared_libs in cc_object
cc_object files don't link against static or shared libraries, but they
can use headers from them.  Make cc_object use the default_shared_libs
headers, and add support for explicit static and shared library
dependencies.

Bug: 153662223
Test: go test ./cc/...
Change-Id: I9ab160ede06db1b135d217d72770c22f500cfe1b
2021-06-25 16:29:51 -07:00
Jiyong Park
56a39ad6d9 Merge changes from topic "stub_from_rust"
* changes:
  Add platform_apis property to APEX module type
  Rust module in APEX uses stub libraries across APEX boundaries
2021-06-25 17:52:43 +00:00
Liz Kammer
bb8d84f01b Move notememtag tests to sanitize_test.go
Test: go test soong tests
Change-Id: I177fcfd787c3aa8185f94dfcc971d9a0c56f9438
2021-06-25 13:37:18 -04:00
Lukacs T. Berki
d18d8cab73 Dump extra JSON data for C++ modules and ApexInfo.
Test: Presubmits.
Change-Id: I96cf67c6f1338aed9d2ab5834a14b8a40a9e5b45
2021-06-25 11:15:40 +02:00
Pirama Arumuga Nainar
68ecdef42d Merge "Switch to clang-r416183b1" 2021-06-24 21:36:40 +00:00
Caroline Tice
04f8d2d407 Merge "Make DWARF v5 the default debug information format." 2021-06-24 21:24:22 +00:00
Pirama Arumuga Nainar
3e54508a3a Switch to clang-r416183b1
Bug: http://b/189328402

This contains a fix to AArch64 __clear_cache.

Test: TH + Manual verification by emulator team.
Change-Id: Iff1064df8361163a6828b01256d5a7950f618652
2021-06-23 22:39:37 -07:00
Jiyong Park
9477c26f6c Add platform_apis property to APEX module type
The property is used to allow non-updatable APEXes to use platform APIs
(e.g. symbols marked as "# platform-only").

Bug: 191637950
Test: m com.android.virt com.android.compos
Merged-In: Id2410b4e38a78ec2146a42298840954381a7c472
Change-Id: Id2410b4e38a78ec2146a42298840954381a7c472
(cherry picked from commit fb63625a7f)
2021-06-24 11:28:33 +09:00
Jiyong Park
7d55b61783 Rust module in APEX uses stub libraries across APEX boundaries
This change fixes a bug that rust module in APEX has access to private
symbols of a native library even when the native library is outside of
the APEX.

To fix this, the stub selection logic in the cc package is exctacted as
a function ChooseStubOrImpl and is used also in the rust package.

Bug: 190767845
Test: m
Merged-In: I5c4cbdd5d27f257ab329d9dadbcd87d41a87f46a
Change-Id: I5c4cbdd5d27f257ab329d9dadbcd87d41a87f46a
(cherry picked from commit 3b5f88e091)
2021-06-24 11:27:41 +09: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
Colin Cross
9ecb42dd31 Add default_shared_libs property
Building against a locally-built libc besides bionic requires setting
system_shared_libs to avoid circular dependencies, but modules all
over the tree assume that system_shared_libs only affects modules
building against bionic.  Add a new default_shared_libs property
that applies to all modules, which will generally be set in
arch-specific clauses to only affect the desired set of modules.

Bug: 190084016
Test: m checkbuild
Change-Id: Ia2349d84c70e503916f90a5d2702e135248f73df
2021-06-22 16:54:40 -07:00
Colin Cross
d1a2813063 Move default crt objects into Toolchain
Move the crt objects spread around cc/library.go and cc/binary.go
into the Toolchain.  This will simplify adding new toolchains that
have custom crt objects.

Test: m checkbuild
Test: go test ./cc/...
Change-Id: I7fdc1f53769799cb9c10e3e5816dabee0f918768
2021-06-22 16:54:40 -07:00
Colin Cross
c85446836d Add DefaultSharedLibraries to Toolchain
Move the default value for system_shared_libs out of linker.go and into
a new DefaultSharedLibraries method in Toolchain.  This will simplify
adding system_shared_libs to cc_object, and adding new toolchains with
different default system_shared_libs.

Test: m checkbuild
Test: go test ./cc/...
Change-Id: I422315f090be20719c08a4d33bd39b0b26a93d6c
2021-06-22 16:54:39 -07:00
Colin Cross
e3fee34a3d Create toolchainBionic for the various bionic-based toolchains to inherit from
Host bionic and each of the device bionic architectures will share some
new toolchain functionality in common, create a toolchainBionic and embed
it into the toolchains.  Use it to implement Bionic() once and change
the default implementation from true to false.

Test: go test ./cc/...
Test: m checkbuild
Change-Id: Ia34b80d9691edc4ab1cbdbd005d1ffc950d0881c
2021-06-22 16:54:39 -07: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