Commit graph

5564 commits

Author SHA1 Message Date
Yabin Cui
01cad0cddc Merge "Revert "Switch to clang r428724 13.0.1."" 2021-08-08 21:02:29 +00:00
Yabin Cui
786c1d41ef Revert "Switch to clang r428724 13.0.1."
Revert submission 1743633-switch-to-clang-r428724

Reason for revert: fix build
Reverted Changes:
I824f3bc1c:Update bazel's clang version to clang-r428724
I6c4c26267:Adjust test for compiler update.
I94ab1f2dc:Switch to clang r428724 13.0.1.

Change-Id: I846e904b6e868d4e2be1bd8260ed59fc5464ef68
2021-08-08 20:59:59 +00:00
Yabin Cui
baeca672c1 Merge "Switch to clang r428724 13.0.1." 2021-08-08 18:20:22 +00:00
Yabin Cui
e87329c4c5 Switch to clang r428724 13.0.1.
Bug: http://b/190099451
Test: build and boot devices

Change-Id: I94ab1f2dc194ffcec5681708b558af26ced30aae
2021-08-06 18:28:08 +00:00
Stephen Hines
fe3bab726d Merge "Revert "Make DWARF v5 the default debug information format."" 2021-08-06 17:04:41 +00:00
Stephen Hines
bb1a17aecb Revert "Make DWARF v5 the default debug information format."
This reverts commit 5e13f86fc8.

libabigail isn't quite ready for DWARF v5 yet, so let's revert this
temporarily.

Bug: http://b/182004844
Bug: http://b/195152239
Bug: http://b/195698910
Test: Builds
Change-Id: I4b1dd8f9e64d19f37c90b8a2433cbb302c7d5105
2021-08-05 17:05:01 -07:00
Elvis Chien
9c99354465 Allow PRODUCT_CFI_INCLUDE_PATHS to work with blueprints also
but disable it for host modules like how it's done for Android.mk

Bug:
179233410

Test:
m -j32

Change-Id: I246cd9163e06997a2b50cd25688370690c8929af
2021-08-04 18:07:51 +08:00
Colin Cross
90a8b3abd5 Remove libjemalloc5 from default musl libraries
The musl allocator works now, remove libjemalloc5 from the default
libraries.

Bug: 190084016
Test: prebuilts/build-tools/build-prebuilts.sh --musl
Change-Id: I12ef8112af99f90e10e8a247ddc2eddfd4cd98a0
2021-08-02 13:17:13 -07:00
Liz Kammer
82ad8ccca2 Support exporting device arch toolchain info
Test: bp2build.sh
Bug: 187084665
Change-Id: I49e75f603accab519784dbaf25d85db0010587a3
2021-08-02 14:54:10 -04:00
Chris Wailes
b2703adce4 Conditionally apply rustdoc flags to third party crates
This CL changes the logic in rust/builder.go so that some rustdoc flags
are only applied to external crates.  This will allow us to since
warnings and deal with soft-failures in external crates while allowing
us to be more strict with our internal Rust code.

Bug: 195136952
Test: m rustdoc
Change-Id: Icdde304bbbb323cae9657e8f842f58ae79e811ce
2021-08-02 11:50:34 -07:00
Liz Kammer
067b889762 Correct isThirdParty check
Previously, isThirdParty check was over-selecting for third-party-ness,
the only non-third-party paths were those explicitly excluded from
typically third party directories, results in ~all code being considered
third party.

Updated test to ensure bionic is not considered third party, which fails
without this change.

Test: go soong tests
Change-Id: Id371aaad2ceef2b3163384fa84712397877cbe90
2021-08-02 11:50:34 -07:00
Yuntao Xu
1b05df5fd4 Merge "remove target from every intermediate depFile" 2021-08-02 16:28:27 +00:00
Dan Willemsen
db45fb250d Merge "Bump minimum MacOS version to 10.13" 2021-07-30 17:22:56 +00:00
Yuntao Xu
56cc658b93 remove target from every intermediate depFile
1. The current logic in the rsCppCmdLine only removes the target from the
first intermediated depFile, which is different from the logic in Make, see
https://source.corp.google.com/android/build/make/core/definitions.mk;l=1078
2. The expected logic, as that in Make, is to remove the target from every
intermediate depFile, if there are many, before the concatenation;
3. This bug would cause dependency cycle error, please check the bug number
below for more details;
4. The fix is to make sure the logic here is the same as that in Make.

Bug: 195036632
Test: m CtsRsCppTestCases with the converted Android.bp file (run more than
once to make sure no error occurs)
Test: manually checked the gen/rs/rs.stamp.d file to make sure there
is only one target on the top (the same as that built with the former
Android.mk file)
Test: TreeHugger

Change-Id: If79e3e5e7bc18a6fddcf56c0168daea93726afc6
2021-07-30 09:47:07 -07:00
Justin Yun
27b9572433 Rewrite snapshot dependencies for vndk-ext
VNDK-ext libraries have dependency on VNDK libraries. When building
against snapshots, the dependency must be rewritten with the
snapshots.

Bug: 194864314
Test: m nothing
Change-Id: I1244c6a6590e89b344ab39514bb5142d36b04268
2021-07-30 10:49:02 +00:00
Yi-Yo Chiang
d7b95f94a1 Merge changes from topic "variational-required"
* changes:
  cc/cc.go: Support per-image-variation "required"
  android/androidmk.go: Calls *RequiredModuleNames() to get required modules
2021-07-30 10:09:40 +00:00
Dan Willemsen
3dc4326ce7 Bump minimum MacOS version to 10.13
We've removed all of our buildbots running 10.10, and Android Studio
requires 10.14+, so our oldest users are now the 10.13 buildbots.

Bug: 191879468
Change-Id: Ie9fdb59f12bb672c5f2448cb558f54a2e10039fb
2021-07-29 12:18:29 -07:00
Yi Kong
c14f088a5f Merge "Fix build on older Macs with universal binary Clang" 2021-07-28 11:05:00 +00:00
Jiyong Park
6ede93608b Add more *-ndk libraries to VndkMustUseVendorVariantList
Some libraries were missing in aosp/1777786.

Bug: 161456198
Bug: 194743866
Test: m on full-eng

Merged-In: I7c7aa1025a876e45fc4779378825d91098164e84
Change-Id: I3cb4dfcf490ddb6b4bd3915232399cebf5e467d5
2021-07-27 02:56:43 +00:00
Jiyong Park
44a13ac401 *-ndk.so libraries are added to VndkMustUseVendorVariantList
We will replace the ndk_platform backend with the ndk backend. The
former hasn't been deleted yet because there already are references to
it. When the existing references are all replaced with the ndk backend,
we will remove the ndk_platform backend and the corresponding libraries
will be removed from this list.

Bug: 161456198
Test: m

Merged-In: I7c7aa1025a876e45fc4779378825d91098164e84
Change-Id: I7c7aa1025a876e45fc4779378825d91098164e84
(cherry picked from commit b58719c156)
2021-07-26 13:22:49 +09:00
Jiyong Park
a592b6f8e0 Reland: Add more target-specific properties
Following properties are added:

* vendor.header_libs
* platform.cflags
* platform.header_libs
* platform.exclude_shared_libs

These are used in the *-ndk libraries generated from the aidl_interface
modules, so that we can build the platform variants of the libraries
just like the *-ndk_platform libraries. Eventually, we will remove the
*-ndk_platform libraries.

Bug: 161456198
Test: m
Merged-In: I126e272cd29eb1e03662c54bfa8bd64e704adc74
Change-Id: I126e272cd29eb1e03662c54bfa8bd64e704adc74
(cherry picked from commit bb14481408)
2021-07-26 11:19:35 +09:00
Yi-Yo Chiang
c7e044f531 cc/cc.go: Support per-image-variation "required"
Support "core" and "recovery" variants for now. Might add more image
types if needed.

Bug: 191369319
Test: Presubmit
Test: Inspect out/soong/Android-*.mk
Change-Id: Iebab29ed5d6d8fe9c66b6d6e56e00246d10c36b3
2021-07-24 22:44:36 +08:00
Colin Cross
528d67e523 Reland "Split the x86 host toolchain into glibc and musl variants"
Split the x86 host toolchain into glibc and musl variants

Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.

This relands Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546 with changes
for I46672e3a096b6ea94ff4c10e1c31e8fd010a163c.

Bug: 190084016
Change-Id: Iaa9f7a50ff601155ecd73acc5701a2c226be66dc
Test: TestArchMutator
2021-07-23 22:25:36 +00:00
Colin Cross
c5647ca16e Merge "Revert "Split the x86 host toolchain into glibc and musl variants"" 2021-07-23 22:22:11 +00:00
Colin Cross
5d6904e1cf Revert "Split the x86 host toolchain into glibc and musl variants"
This reverts commit 4fb4ef2242.

Reason for revert: crossed with aosp/1775072

Change-Id: Ied922850b810d82627ba4f9ee42f672cfe286c91
2021-07-23 22:20:29 +00:00
Colin Cross
7628e933b6 Merge changes Idbeb4819,Ifc02f9e5
* changes:
  Add dynamic_list property
  Split the x86 host toolchain into glibc and musl variants
2021-07-23 22:08:19 +00:00
Treehugger Robot
2231f8a21c Merge "Remove default_shared_libs" 2021-07-23 21:18:51 +00:00
Kalesh Singh
295ae69b04 Merge "Update VndkMustUseVendorVariantList" 2021-07-23 17:16:28 +00:00
Colin Cross
5942238966 Add dynamic_list property
Add a dynamic_list property that is similar to version_script but uses
a -Wl,--dynamic-list flag instead of -Wl,--version-script.

Bug: 190084016
Test: TestLibraryDynamicList
Change-Id: Idbeb4819ce4d92e50c4e9b27ec8f150d566d380a
2021-07-23 10:15:13 -07:00
Colin Cross
4fb4ef2242 Split the x86 host toolchain into glibc and musl variants
Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.

Bug: 190084016
Test: TestArchMutator
Change-Id: Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546
2021-07-23 08:57:17 -07:00
Christopher Parsons
2f1102fe58 Merge "Remove bp2build deps mutator" 2021-07-23 14:55:40 +00:00
Colin Cross
b8d69871a8 Merge "Remove Fuchsia support from Soong" 2021-07-23 14:54:49 +00:00
Yi Kong
f8e53703f0 Fix build on older Macs with universal binary Clang
Our Clang is not built to handle old linkers by default, so if we do not
configure this explicitly it may attempt to use flags that are not
supported by the version of the Darwin linker installed on the build
machine.

Bug: 191276541
Test: build rs on 10.13
Change-Id: Ia40170b6aeba11fb6997021ec3f73e911e0b057c
2021-07-23 07:54:01 +00:00
Colin Cross
78fd15f7d6 Merge "Replace android.BuildOs with Config.BuildOS" 2021-07-23 00:07:01 +00:00
Chris Parsons
5a34ffb350 Remove bp2build deps mutator
Refactor bp2build to retrieve modules directly by name, instead of via
DirectDeps. This functions properly as bp2build has no need for variant
information of the blueprint graph.

Test: USE_BAZEL_ANALYSIS=1 m fmtlib
Change-Id: Ief4b67bc56f24929871af772f3a742f07085bf8c
2021-07-22 18:09:34 -04:00
Colin Cross
6b8f4253eb Remove default_shared_libs
system_shared_libs has been modified to have the same behavior as
the newly added default_shared_libs, remove default_shared_libs in
favor of system_shared_libs.

This reverts Ia2349d84c70e503916f90a5d2702e135248f73df and renames
the default_shared_libs property in cc_object (which never had
system_shared_libs) to system_shared_libs.

Bug: 193559105
Test: m checkbuild
Change-Id: I46672e3a096b6ea94ff4c10e1c31e8fd010a163c
2021-07-22 12:10:11 -07:00
Treehugger Robot
2e4c0eb90e Merge "Apply system_shared_libs to all variants" 2021-07-22 17:44:32 +00:00
Kalesh Singh
ada357aeb4 Update VndkMustUseVendorVariantList
Add android.system.suspend-V1-ndk_platform

Bug: 170260236
Test: m
Change-Id: I93b84112e0fcdd3593ca196308338945376acc1a
2021-07-22 06:34:13 +00:00
Colin Cross
cb0ac95bde Remove Fuchsia support from Soong
Bug: 194215932
Test: m checkbuild
Change-Id: Id7d3964d9417f8b0938af9b168bb4c00cebe9390
2021-07-21 20:37:46 -07:00
Kiyoung Kim
5d96f64d04 Merge changes I3574d2a1,Ifb69fb3d
* changes:
  Update prebuilt_etc available for snapshot
  Separate snapshot definition
2021-07-22 00:57:39 +00:00
Liz Kammer
561923e10d Add deps for system_shared_libs for all axes
This is the same hack we have currently, but applying it to the various
axes to unblock a Soong/bionic refactoring CL.

Test: bp2build.sh
Change-Id: Ie068461201bb3c18b9f385026e96cca2c7fe6b97
2021-07-21 10:15:56 -04:00
Hsin-Yi Chen
1f019f945d Merge "Specify working directory and OUT_DIR to ABI tools" 2021-07-21 07:19:13 +00:00
Colin Cross
0c66bc615b Replace android.BuildOs with Config.BuildOS
Replace the android.BuildOs constant with Config.BuildOS so that it
can vary based on the product config.

Bug: 190084016
Test: all Soong tests
Change-Id: Ia67f872d8b2ab788747a22e3a9659dc21c9775cd
2021-07-20 12:46:48 -07:00
Kiyoung Kim
ae11c233b5 Update prebuilt_etc available for snapshot
Make prebuilt_etc module available for the snapshot. This change
includes implementing snapshot interface for the prebuilt_etc module so
it can be added to the snapshot from the fake snapshot, or when the
module is specified in the list.

Bug: 192430376
Test: m nothing passed
Test: Checked if the module is included in the snapshot properly
Change-Id: I3574d2a1b8f8f4e5f083f3913e8768f5088d0c46
2021-07-20 11:24:03 +09:00
Colin Cross
ae86338676 Merge "Remove clang indirection, affects command line ordering" 2021-07-19 21:46:52 +00:00
Hsin-Yi Chen
79781a94f0 Specify working directory and OUT_DIR to ABI tools
This commit adds `--root-dir . --root-dir $OUT_DIR:out` to the commands
of ABI tools. If the user sets non-default $OUT_DIR, the tools write
"out" instead of the actual $OUT_DIR to the ABI dumps.

Test: export OUT_DIR=~/aosp_out ; \
      make libstagefright_bufferqueue_helper.vendor
Bug: 192157880
Change-Id: I4e2d1b252273106fb6a3ecfa1727d5c91ba03444
2021-07-19 03:46:31 +00:00
Kiyoung Kim
48f3778cb4 Separate snapshot definition
Current snapshot definition is located in the CC module, so it is
difficult to capture non-CC module (such as prebuilt_etc) to the
snapshot. Separate general snapshot definition from cc so other modules
can also define its own snapshot.

Bug: 192430376
Test: m nothing passed
Change-Id: Ifb69fb3d2ec555b629aa31ec03e7ce5831fd3063
2021-07-19 11:42:32 +09:00
hamzeh
41ad881e16 Refactoring fuzz packaging code
Rust and cc fuzz packaging have common. This change is to put this
common methods and fields into fuzz_common.

Test: make haiku and make haiku-rust ran locally and verify corpus,
dict and config are packaged along with the executable.

Change-Id: I04bf535cd2597ed8b2bd3d8e6ea8c28f38bdc18b
2021-07-16 17:43:33 -07:00
Colin Cross
51736b82fc Merge "Rename ninja variables with Clang in the name" 2021-07-16 00:28:13 +00:00
Colin Cross
908fbe200e Merge changes I29bf144b,Id2879453
* changes:
  Remove more clang indirection without affecting command lines
  Remove clang indirection without affecting build.ninja
2021-07-16 00:00:22 +00:00
Colin Cross
9cc59c1cbd Remove clang indirection, affects command line ordering
Move the last clang-specific list into the common global list.  This
affects the command line flag ordering due to the the -fdebug-prefix-map=
flag that is added by an init() function, which will force every native
rule to recompile.

Bug: 68947919
Test: m checkbuild
Change-Id: Ic2509e61e9555e9483b92a18d7e8d9913b7125cc
2021-07-14 20:55:25 -07:00
Colin Cross
0523ba2675 Rename ninja variables with Clang in the name
Rename the ninja variables that have an extraneous Clang in the name,
since there are no longer any non-Clang variables.

Bug: 68947919
Test: no change to command lines used to build mmma bionic
Change-Id: I081d5e1d423a66d55faece6cb1d265cd5e504d5f
2021-07-14 20:55:23 -07:00
Colin Cross
c8bed31f56 Remove more clang indirection without affecting command lines
Squash the contents of some clang-specific ninja variables into
the main ninja variables.

Bug: 68947919
Test: no change to command lines used to build mmma bionic
Change-Id: I29bf144b03307a7893376e68d82f12f5c40e8e95
2021-07-14 20:55:02 -07:00
Colin Cross
33bac24bb9 Remove clang indirection without affecting build.ninja
Remove cflags that are not handled by clang from the global defaults,
and remove calls to ClangFilterUnknownCflags.

Squash lists of clang-specific default flags into the main default
flags lists.

Rename Toolchain.Clang*flags to Toolchain.*flags.

Rename Go variables with Clang in the name that have no non-Clang
equivalent.

Remove unused ninja variables.

Bug: 68947919
Test: no change to build.ninja for aosp_cf_x86_64_phone-userdebug or aosp_crosshatch-userdebug
Change-Id: Id287945315d53e5eaef197adbbb4f1302f2e3680
2021-07-14 20:54:22 -07:00
Treehugger Robot
5445c84f4d Merge "Export paths for the snapshot modules" 2021-07-14 00:08:12 +00:00
Colin Cross
72bf8e1310 Apply system_shared_libs to all variants
Remove the odd semantics of system_shared_libs that ignore the property
for non-bionic variants by always honoring it.  For the common case
of system_shared_libs: [] this is generally correct, a non-bionic
variant of a module that doesn't compile against bionic libc probably
also doesn't want some other libc.  For modules that use something
like system_shard_libs: ["libc"] to link against libc but not libdl
and libm this may cause problems, as it will cause a host varaint to
try to link against the non-existent host "libc" module, but there
aren't very many of those and they can be fixed to use a target.bionic
clause.

Bug: 193559105
Test: m checkbuild
Change-Id: I94454a71144e3e68c7148b8d0bf2d974d2ad2bc6
2021-07-13 16:23:23 -07:00
Chris Parsons
69fa9f9e5e Seperate asflags and cflags
This fixes a bug which was a misunderstanding of soong properties:
Soong's cflags pertain only to C and C++ language, whereas bazel's copts
pertain to all three languages. This change ensures that asflags are
added as specifically asflags, and the 'copts' for the static library
macro pertains only to C and C++ languages.

This requires a somewhat hacky workaround for asflags, however: Since
assembly sources also need includepath-related flags, this duplicates
these flags between copts and asflags. To reduce verbosity of
bp2build-generated targets, this also ensures that asflags are omitted
in cases where there are no assembly sources.

Test: Mixed build droid CI
Change-Id: Ic0babed1f90d6dc82e5788638681ce5b995043f8
2021-07-13 14:06:14 -04:00
Treehugger Robot
da70df7277 Merge changes from topic "vendor_snapshot-192647618"
* changes:
  cc/cc.go: Harden GetSnapshot() against nil pointer panic
  cc/cc.go: Add Device() method to LinkableInterface
2021-07-13 08:54:11 +00:00
Justin Yun
d9e05750ba Export paths for the snapshot modules
Some makefiles require the paths to the snapshot to use the snapshot
resources. Export SOONG_{IMAGE}_{VERSION}_SNAPSHOT_DIR to make.

Bug: 187222756
Test: check ninja depedency with and without snasphots.
Change-Id: Ie817285d43db094335e4c81ebb6eca7007c5f37d
2021-07-13 11:36:24 +09:00
Treehugger Robot
b9386b703e Merge "Share EffectiveLicenseFiles for snapshot modules" 2021-07-12 22:06:59 +00:00
Liz Kammer
75db931843 Iterate over sanitizers
Test: go test soong tests
Change-Id: If89b7d0b04cad79b42a08504d4fcff36e914b7a4
2021-07-08 11:19:15 -04:00
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
Justin Yun
885a7dea68 Share EffectiveLicenseFiles for snapshot modules
License files must be captured with the snapshot modules. NoticeFiles
does not have the information provided by the `license` module.
Reading the `Effective_license_text`, snapshot includes the required
license files.

Bug: 190690041
Test: build
      check the NOTICE files built from snapshots
Change-Id: I96c4579b4bef484cbb39fc06c707742a02a2b90b
2021-07-08 00:02:48 +00: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
Yi-Yo Chiang
ec14a4ded8 cc/cc.go: Harden GetSnapshot() against nil pointer panic
* Retrieve SnapshotInfo only if the calling module is device-variant.
* Test for nil-ness before calling ctx.OtherModuleProvider().

Bug: 192647618
Test: Presubmit
Change-Id: Ida8582f756e1b15f8c14c816ed6e736b47995877
2021-07-03 19:20:02 +08:00
Yi-Yo Chiang
36d8e4e201 cc/cc.go: Add Device() method to LinkableInterface
The intention is to make the next change more cherry-pick-friendly.

Bug: 192647618
Test: Presubmit
Change-Id: Ic84d3991a855e09aa9f46e12b759ad8142701e1f
2021-07-02 21:24:58 +08: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