Commit graph

8303 commits

Author SHA1 Message Date
Vinh Tran
5e7011bc14 Merge "Use aidl_library in cc libraries" 2023-05-16 14:44:54 +00:00
Aditya Kumar
34296538c0 Merge "Disable LTO and CFI for riscv64" 2023-05-16 14:28:57 +00:00
Aditya Kumar
1281b99495 Disable LTO and CFI for riscv64
This reverts commit 24870216e9.

Reason for revert: b/282584808

Change-Id: I3808121b4437fdd01db5d305d8f0377e6ad7bd9e
2023-05-16 03:55:41 +00:00
Spandan Das
29c8ad3821 Merge "bp2build converter for cc libraries containing yacc" 2023-05-16 02:48:53 +00:00
Vinh Tran
367d89da78 Use aidl_library in cc libraries
Introduce aidl.libs prop on cc libraries to pass in aidl_library. The goal is to eventually disallow aidl.include_dirs (a pattern for passing aidl headers dir for aidl compilation) and enforce aidl headers to be explicitly specified in Android.bp.

Bug: 278704136
Test: go test
Change-Id: Ia78bc11dfa12f47d2d1bb90dc65372ddb17f7e14
2023-05-15 17:09:22 -04:00
Colin Cross
9801f9d7f7 Merge "Fix addrsig warnings" 2023-05-15 19:07:58 +00:00
Trevor Radcliffe
5f0c2ac535 Change bp2build to reflect arm_isa refactor
We now rely on a `with_features` clause to effectively disable
thumb when `arm_isa_arm` is enabled. Thus, we no longer need to
add `-arm_isa_thumb` in bp2build.

Bug: 261733820
Test: Unit tests
Change-Id: I9da85834855b297a75097ce3a11e101f55bd53f4
2023-05-15 18:00:59 +00:00
Aditya Kumar
7699d15864 Merge "Revert "Disable LTO and CFI for riscv64"" 2023-05-12 23:25:19 +00:00
Aditya Kumar
24870216e9 Revert "Disable LTO and CFI for riscv64"
This reverts commit ecf4e664e0.

Reason for revert: Not needed as emultated tls is now globally disabled https://android-review.git.corp.google.com/c/platform/build/soong/+/2431153

Change-Id: Idc3de2771afbbe2d5976f3c7974b3ffd15441b13
2023-05-12 18:46:42 +00:00
Yi Kong
e9850f8153 Revert "Turn off stack protector check for noreturn calls"
clang-r487747c contains upstream fix for the excessive stack protactor
checks (fc4494dffa54) and checks are no longer inserted for C only code
or C++ code built without exeception. The Android platform does not
enable C++ exception by default, thus turning on the check should not
have significant performance impact.

This reverts commit ecc18df6ff.

Test: presubmit
Bug: 277565884
Bug: 279955553

Change-Id: I2fc5826048ba5d00cabcc8401ac40a6f54812a44
2023-05-12 12:24:22 +01:00
Treehugger Robot
f8fbff1671 Merge "Drop redundant libraries from baseline apexAvailable map" 2023-05-12 06:04:23 +00:00
Yi Kong
db381aa7d9 Merge "Update clang version to clang-r487747c" 2023-05-11 14:50:01 +00:00
Spandan Das
df4c2134ea bp2build converter for cc libraries containing yacc
For cc_libraries containing .y/.yy srcs, we will generate an additional
cc_yacc_static_library target. This target will produce an .a file that
will be statically linked to the parent target.

Test: go test ./bp2build
Bug: 281546029
Change-Id: I094ba56f0a95869e5bc1e1d38b83c777192b7ddd
2023-05-11 01:11:56 +00:00
Spandan Das
494fca1328 Merge changes from topic "stub-impl-per-api-domain"
* changes:
  Special case platform variant of bootstrap libs
  Select stub/impl per apex variant
  For test apexes, base_apex_name is the api domain
  Broaden the granularity of config_setting from apex_name to api_domain
  Print default val if all vals in axis match default val
2023-05-11 00:13:44 +00:00
Pirama Arumuga Nainar
4026558dc7 [cc] Remove deprecated clang flag for auto-var-init
Bug: http://b/259559364
Bug: http://b/267819531

The extra flag is no longer needed by the scan-deps used by RBE.

Test: `USE_RBE m`
Change-Id: Ia35b78f7b28f9008479256d9fead253910627254
2023-05-11 00:01:25 +00:00
Cole Faust
069812158f Merge "Bp2build support for soong config variables + os" 2023-05-10 21:28:02 +00:00
Treehugger Robot
a321926546 Merge changes from topic "remove_suffixes"
* changes:
  Propagate shared library destination path through FilesToZip
  Add -e argument to soong_zip to allow setting an explicit filename
  Support removing suffix for device specific prebuilt during build
2023-05-10 20:30:11 +00:00
Yi Kong
1c22301735 Update clang version to clang-r487747c
Test: presubmit
Bug: 279955553
Change-Id: Ibe3b5e81f7850560b340c89a1f83d5ebdf4fc25f
2023-05-10 17:24:44 +09:00
Colin Cross
80462dc040 Propagate shared library destination path through FilesToZip
Shared libraries in fuzz zip files may have a different filename than
their source file, for example when the source file is a prebuilt in
the source tree.  Propagate the computed library name through
FilesToZip to soong_zip to use the correct name in the zip file.

Bug: 254867347
Test: builds
Change-Id: Ib0def8decdbec7842b8e1a9056fac373d743bac0
2023-05-09 23:19:31 +00:00
Hamzeh Zawawy
38917496e5 Support removing suffix for device specific prebuilt during build
Some device specific prebuilts have a suffix that varies depending on the lunch target.
The resulting install dependency binary has the suffix.
The fuzzer build expects the presubmit binary without the suffix.
This change is to drop the suffix.

Test: make haiku
Change-Id: I8eadd84bf5797659b17bc428dca47b7c3f382aff
2023-05-09 23:11:42 +00:00
Treehugger Robot
37be8a5a8f Merge "APEX can use any Prebuilt libraries" 2023-05-09 07:39:41 +00:00
Cole Faust
150f9a5a63 Bp2build support for soong config variables + os
For converting the art plugins to pure soong, it would be useful to
have a property that's qualified on both a soong config variable and
the OS. Soong had very little-known support for this by saying your
soong config variable changes the "target.android.cflags" property,
and we didn't supporting bp2building that. Add the bp2build support.

This cl also refactors product variable and soong variable bp2building
so that they're separate from each other, which I think makes the code
easier to understand.

Test: go test
Change-Id: Ic74dc75da8103fa2523da95c3560c9ce3c5e5672
2023-05-08 17:50:06 -07:00
Spandan Das
6aaab9d2aa Special case platform variant of bootstrap libs
Platform variants of libraries that set `bootstrap: true` in their
Android.bp file gets impl in Soong. This CL ports this behavior to
bp2build.

Note that even after this CL, there will be still be some other cases
where stub/impl logic does not match Soong perfectly (most notably the
platform_apis property which is propagated top-down from the parent
apex).

Test: bp2build.sh
Change-Id: I3da284ab42631d6de1c0d52e56ccbfd4e4a09f1d
2023-05-08 21:11:49 +00:00
Spandan Das
6d4d9da47f Select stub/impl per apex variant
Create a select statement for every api_domain a library could be
included in. The stub/impl
selection heuristics per apex domain are
1. If dep has stubs and the api domain appears in dep's apex_available, use
   impl
2. If dep has stubs and the api domain does not appear in dep's
   apex_available, use stubs

(Category 3: If dep does not have stubs and the apex does not appear in
dep's apex_available, then a separate apex_available validation in Bazel
will emit an error).

Platform variants have been special-cased for now to use equality of
apex_available for stub/impl selection

Test: go test ./bp2build
Bug: 272378496

Change-Id: Ibd29efd763c8863c7e6d2a9af0da30bbde07175d
2023-05-08 21:11:46 +00:00
Spandan Das
a43ae1366e For test apexes, base_apex_name is the api domain
apex_test do not "override" the source apexes that they test. However,
similar to override_apexes, test apexes have the same path
(/apex/<apex_name>) on device. Instead of creating another property,
reuse the existing base_apex_name property. The use case for this will
be for creating selection statements for stub/impl selection.

Test: go test ./bp2build
Change-Id: I4b7548e0e0fc920e407e1c5e5c00e87efc6e70c9
2023-05-08 19:04:32 +00:00
Justin Yun
3cc7846b58 APEX can use any Prebuilt libraries
Vendor snapshot libraries generated from prebuilt libraries set
"apex_inherit" to their min_sdk_version property to allow them to be
used by vendor APEXes.

Bug: 277403349
Test: m vendor-snapshot
Change-Id: Idd9e5f8e94b3fa2adf47a04507bf0c50c59edfb7
2023-05-08 22:33:35 +09:00
Jooyung Han
e3f0281b88 Mark LLNDK prebuilts as LLNDK
so that Vendor APEXes don't embed the LLNDK prebuilts (which are just
stubs of LLNDK libraries).

Bug: 280697209
Test: m nothing (soong test)
Change-Id: I9e6c123e73fa0ab56d8494a01652ee32a9b6a6cd
2023-05-08 17:05:20 +09:00
Spandan Das
4de7b49cd7 Drop redundant libraries from baseline apexAvailable map
These libraries now set the correct apex_available in their Android.bp
files. Therefore, they do not a separate entry in the baseline
apexAvailable map.

Test: m nothing #passes
Bug: 281077552
Change-Id: Icf6b97c3bcc4bda96eefa14ba6d4bf10614bc378
2023-05-05 22:52:33 +00:00
Spandan Das
9cad90f966 Broaden the granularity of config_setting from apex_name to api_domain
The use case for this is for creating a select statement for stub/impl
selection. Since Bazel propagates apex_name from the top-level apex,
the source apex and test apex builds a specific library in two different
configurations. We need select statements for both these two
configurations, but this metadata might not always exist in Android.bp
since test apexes are not necessary to be listed in Android.bp files.

To overcome this, the select statements will be created per api domain
instead. This CL uses a naming convention to infer the api domain of
apexes.

Test: go test ./bp2build
Change-Id: Iad2b45f736bc98a24d2ce1cf2f69aad67973092d
2023-05-04 22:06:47 +00:00
Sam Delmerico
036afabcfb export WarningAllowedProjects to bazel
Bug: 187088227
Test: b test
Change-Id: I668f2c3e834fd03ad2b6d01f07f79ec84dea54eb
2023-05-04 16:43:36 -04:00
Colin Cross
c8ffd27c9f Merge "Install sdk variants in unbundled builds and package uninstallable variants" 2023-05-04 18:15:33 +00:00
Treehugger Robot
ad3f14edf3 Merge "VSDK: use relative install path when generating snapshots" 2023-05-03 00:04:08 +00:00
Yu Liu
bd421e06d1 Merge "libbuildversion should be linked as a whole archive dep as soong does." 2023-05-02 17:34:02 +00:00
Yu Liu
fe978fd2c1 libbuildversion should be linked as a whole archive dep as soong does.
Bug: 278789968
Test: Unit tests and CI
Change-Id: Ic2c44826bdc03b91cc19d93f96096ec6fdf44833
2023-05-02 17:27:44 +00:00
Yu Liu
2bedceeb53 Merge "Fix a bug where CppFlags should have been Cppflags" 2023-05-02 17:23:49 +00:00
Colin Cross
bd3a16b5e7 Install sdk variants in unbundled builds and package uninstallable variants
This effectively undoes both If6c3ee82d588e2742c85cef7244c090c93f38b8e
and I682e4f1f477f3024f7719dfaa67006ef335e0640.  SDK variants are now
installed again, which will fix unbundled builds of cc_test modules.
The platform variants used by com.android.virt are now packagable
even though they are not installable.

Fix the original problem in b/194403710 by adding a flag to platform
variants of modules in apexes that are not platform available, and
using that to prevent install and packaging dependencies.  That
allows the HideFromMake flag to go back to being used for preventing
install dependencies but not packaging dependencies.

Test: TestPackagingWithSkipInstallDeps
Test: TestFileSystemShouldInstallCoreVariantIfTargetBuildAppsIsSet
Test: TestFileSystemShouldSkipApexLibraries
Bug: 194403710
Bug: 268582372
Fixes: 274443025
Change-Id: If5418df3ddbb940bd631caebdf38daa81e71f40e
2023-05-02 15:37:26 +00:00
Justin Yun
17d0ee2160 VSDK: use relative install path when generating snapshots
Without respecting the relative install path, the snapshot install
path may collide when they use the same stem name.
To avoid this, respect the relative install path when generating the
snapshots.

Bug: 279652606
Test: RECOVERY_SNAPSHOT_VERSION=current m recovery-snapshot
Change-Id: Ic70a5855aeb2a6eda397b4dd06113dddb6ef70f4
2023-05-02 16:29:06 +09:00
Spandan Das
e018bc858b Merge "Enforce stub libraries should have a single apex_available" 2023-05-01 23:43:01 +00:00
Yu Liu
93893ba061 Fix a bug where CppFlags should have been Cppflags
Bug: 278789968
Test: unit test and manual build
Change-Id: I9abb056e6b820414707247d1b19ba6aabffc26ea
2023-05-01 13:55:53 -07:00
Sam Delmerico
162fb00eb3 Merge "Revert "Respect Clang version override env vars."" 2023-05-01 20:23:16 +00:00
Spandan Das
934d5047ef Merge changes from topic "bp2build-ignore-test-apex-tags"
* changes:
  Ignore test apexes from bp2build generated tags
  Ignore test apexes from bp2build generated tags
2023-05-01 16:05:38 +00:00
Treehugger Robot
176271a426 Merge "Correct cc_test_library migration" 2023-05-01 14:38:41 +00:00
Spandan Das
5e1525d1de Merge changes Ibbb14b0d,I9aa552e3
* changes:
  Create config_setting per apex_name
  Add a function to create config_setting(s)
2023-04-29 03:52:55 +00:00
Treehugger Robot
2f6179d4f5 Merge "Enable HWASan for multiple modules in one place(Soong)" 2023-04-29 00:10:16 +00:00
Spandan Das
4242f10462 Create config_setting per apex_name
These are created by bp2build in /build/bazel/rules/apex. Eventually
these config_settings should likely be colocated with the source apex
definition.

Another alternative was to make Bazel's apex a macro that generates a
config_setting. I did not pursue this further for now since it requires the
apex_available of every allowlisted cc_library to also be allowlisted.
This might not always be true (e.g. com.android.runtime)

Test: go test ./bp2build
Change-Id: Ibbb14b0d9c1491b3c79b7634a18d9d35b03922c1
2023-04-28 20:37:35 +00:00
Juan Yescas
05d4d90114 16k: Align shared libraries and executables to 4k by default
The default ELF segment alignment will be 4096. This alignment
can be overriden by setting the desired alignment in
PRODUCT_MAX_PAGE_SIZE_SUPPORTED flag. The alignment has to be
a multiple of the configured kernel page size.

Test: Built changes for Pixel 4a, 6 and checked alignment.
Bug: 276963698
Bug: 276801883
Change-Id: Icb380041a5b27da1fa0d86b302e1e7cde9a236d7
2023-04-28 02:42:20 +00:00
Spandan Das
20fce2d340 Enforce stub libraries should have a single apex_available
If a library contributes to an API surface, it will have only a single
copy on device. Therefore, we should disallow installation to muliple
apexes/platform.

There are some exceptions to this rule today, and they have been relaxed
using allowlists.

Bug: 277651159
Test: go test ./apex
Change-Id: Ice3023ecd28412a2610d8b98628cb727b58c5c3b
2023-04-27 23:24:55 +00:00
Spandan Das
39b6cc5336 Ignore test apexes from bp2build generated tags
Soong does not enforce apex_available on the contents of test apex. To
prevent special-casing test apexes in the apex validation aspect in
Bazel, drop the test apexes from the tags altogether.

( The core problem I am trying to solve is making sure that stub
libraries in Bazel have a single apex available. apex validation happens
to be a nice side benefit)

Bug: 277651159
Test: go test ./bp2build
Change-Id: Ibb3cfedb5c0f2cda0464bf3758c70b67cb5885d1
2023-04-27 23:24:49 +00:00
Spandan Das
c0f9a2178f Merge "Re-enable TestMixedBuildUsesStubs" 2023-04-27 23:11:14 +00:00
Spandan Das
f57a966b66 Ignore test apexes from bp2build generated tags
The core problem I am trying to solve is making sure that stub
libraries in Bazel have a single apex available. In Soong, this will be
enforced using some graph walk which is not easy to port to Bazel.

However, we might need to revisit this when we build the enforcement
mechanism in Bazel. We likely need a `test_for` on the top level
apex_test Bazel rule so that the test apex is _allowed_ to link against impl
of the library it is trying to test.

(This CL retricts this to cc_library, I can expand this to other modules
if this is the right approach.)

Bug: 277651159
Change-Id: Iaeec22c5626df79a33785c766ed29102b1da403e
2023-04-27 01:43:00 +00:00
Treehugger Robot
c741160d81 Merge "Update clang version to clang-r487747b" 2023-04-26 20:04:42 +00:00
Mark Dacek
dc4617aa66 Merge "Refactor MixedBuildsEnabled and add --ensure-allowlist-integrity." 2023-04-26 15:23:11 +00:00
Yi Kong
c57e3a8397 Update clang version to clang-r487747b
Test: presubmit
Change-Id: I98de36a9f301dee14c21d42e20901eb5aa157164
2023-04-26 15:11:43 +09:00
Treehugger Robot
167f917f58 Merge "Include license information for vendor and host snapshots" 2023-04-26 01:34:04 +00:00
MarkDacek
f47e142ffd Refactor MixedBuildsEnabled and add --ensure-allowlist-integrity.
Currently, there is little verification around allowlisted modules
actually being mixed-built. This flag would allow us to verify
that a module allowlisted is mixed-built for at least one variant.

Bug: 278910100
Test: m nothing --bazel-mode-staging --ensure-allowlist-integrity
Test: m nothing --bazel-mode-staging --ensure-allowlist-integrity
--bazel-force-enabled-modules=com.google.android.neuralnetworks (This
fails, as expected)
Test: build/soong/test/mixed_mode_test.sh

Change-Id: Icd5976f4f44f1a8caca1e5247d986642f7995f97
2023-04-25 20:55:07 +00:00
Spandan Das
00bafc6693 Re-enable TestMixedBuildUsesStubs
This was disabled because of some non-determinism in Soong, which has
been been fixed in aosp/2559590

Bug: 275313114
Test: go test ./cc -run TestMixedBuildUsesStubs -count 1000
Change-Id: I261dc785c832e66f8e213132c19111b8b90e40e9
2023-04-25 17:50:05 +00:00
Treehugger Robot
d7b50181d9 Merge "Use copy of apex_available in AvailableToSameApexes" 2023-04-25 17:27:00 +00:00
Sam Delmerico
969e375d55 Merge "Use stubs for system_dynamic_deps" 2023-04-25 12:31:04 +00:00
Justin Yun
1db9748805 Include license information for vendor and host snapshots
In addition to the license text files, include license kinds
information to json file. Also, use the original paths of license
text files that are copied to NOTICE_FILES directory.
This will be used when generating snapshots from the snapshot build.

Bug: 271539873
Test: m vendor-snapshot
Change-Id: I0c0427bb66f2c1fca322d5554aa66220a3b62fb3
2023-04-25 18:03:32 +09:00
Sam Delmerico
75dbca2eae Revert "Revert "mixed builds correctly reference stubs libs""
This reverts commit 1db4348734.

Changes from original:
  - extracted function to add the current version to stub
    versions for bp2build.
  - added libc++ to mixed builds denylist

Reason for revert: re-uploading with fix in topic

Change-Id: Ifa0ed456bf8cb4a7f861d6826263adfedb4fdd9c
2023-04-25 00:25:20 +00:00
Spandan Das
4e1bfa06e9 Use copy of apex_available in AvailableToSameApexes
Modifying the list in-place causes some non-determinism.

Test: go test ./cc -run TestStubsForLibraryInMultipleApexes -count 1000
Bug: 275313114
Change-Id: Ia2519e146d97667ad5900cf68ab9935fcbaf08a4
2023-04-24 22:45:14 +00:00
Treehugger Robot
28cbb75a09 Merge "disable mixed builds for sanitized cc modules" 2023-04-24 20:12:34 +00:00
Trevor Radcliffe
aea506707f Merge "convert hidden visibility flag to feature" 2023-04-24 19:31:36 +00:00
Sam Delmerico
ef69d47d03 disable mixed builds for sanitized cc modules
The Bazel rules don't currently support any sanitizers other than ubsan,
so we should disable mixed builds for modules which are sanitized.

Test: go test
Bug: 278772861
Bug: 253433725
Change-Id: Ia01fb8cb59154bdfb21a111b04af0350e1876b0b
2023-04-24 10:36:12 -04:00
Spandan Das
ac693b2f81 Use stubs for system_dynamic_deps
system libraries (libc, libm, libdl) belong to the runtime apex api
domain. platform and other apexes should link against stubs and not impl
of these libraries. Update bp2build so that both apex/non_apex picks
stubs. These axes need to be more granular in the future, but for now
this works because
- non_apex axis (platform) is a separate api domain than the runtime apex
- com.android.runtime which matches apex axis has not been allowlisted
  yet.

Test: TH
Change-Id: I43f429a90875f30d176db17b144dd51674ec8adf
2023-04-24 01:51:33 +00:00
Yabin Cui
a5b3752c2e Merge "Enable -funique-internal-linkage-names when afdo=true" 2023-04-21 21:43:47 +00:00
Yabin Cui
01c4456ce2 Enable -funique-internal-linkage-names when afdo=true
We used to enable unique names only when a profile is available.
But A profile generated for a binary without unique names doesn't
work well when building a binary with unique names. To avoid a
chicken-and-egg problem, this CL enables the flag when afdo=true,
whether a profile exists or not.

Bug: 241523910
Test: build
Change-Id: I74d834510d81d2db76e34d0488c74a60e1fcecd5
2023-04-21 14:41:55 -07:00
Liz Kammer
efc51d9396 Correct cc_test_library migration
Previously we were treating it as a shared library only, but
cc_test_library produces both a static and shared library.

Test: bp2build tests
Change-Id: I293d4246d581212b95765fa8f084301514d00dbf
2023-04-21 15:22:49 -04:00
Treehugger Robot
fdef3506c7 Merge "Delete mixedBuildSupportedCcTest." 2023-04-21 15:16:18 +00:00
Treehugger Robot
03e6e00e60 Merge "Flag off abidw tasks." 2023-04-20 21:32:46 +00:00
Trevor Radcliffe
a8b441613a convert hidden visibility flag to feature
in bp2build. The context here is that `-fvisibility=default` should
only be added for CFI if `-fvisibility=hidden` is not already
specified. This will be achieved using toolchain features. Note
that Soong itself never adds `-fvisibility=hidden`. This is only
ever added in the `cflags` property of a bp file.

Bug: 261733820
Test: Unit tests
Change-Id: Ib821e8c30a9cd03d2929b4bd2e771bec7b33fa66
2023-04-20 20:52:41 +00:00
Dan Albert
326ab2444b Flag off abidw tasks.
Bug: http://b/277624006
Test: treehugger
Change-Id: I706a4da2d95ac51ad9fc600b3e4e52967b502c2c
2023-04-20 17:38:29 +00:00
Jingwen Chen
a485d0935c Delete mixedBuildSupportedCcTest.
We can just rely on the prod/staging allowlists which name the modules directly.

Test: presubmits
Test: m nothing; showcommands adbd_test | grep bazel-out
Fixes: 279004435
Change-Id: I666855d6bbe63c628256c3eebd7ae581c0cbdedb
2023-04-20 14:35:12 +00:00
Inseob Kim
0933fd59d7 Merge "Add min_sdk_version prop to snapshots" 2023-04-20 07:36:58 +00:00
Hang Lu
a98aab98c4 Enable HWASan for multiple modules in one place(Soong)
Environment variables HWASAN_INCLUDE_PATHS and
PRODUCT_HWASAN_INCLUDE_PATHS can be used to enable HWASan for multiple
modules, by just adding the module directory to the env variable.

Bug: b/271948407
Test: Set specific module directory to above env variable and check the
assembly codes of output elf files after building, finding hwasan
related symbols inside.

Change-Id: Ic49b515830c4469ca5fa94f547b26c0fb602fc54
2023-04-19 22:59:54 +00:00
Sam Delmerico
dc0a4021cd Merge "Revert "mixed builds correctly reference stubs libs"" 2023-04-19 19:57:49 +00:00
Elliott Hughes
0ee012c2c4 Merge "riscv64: stop reserving x18 for shadow call stack." 2023-04-19 14:38:37 +00:00
Usta (Tsering) Shrestha
1db4348734 Revert "mixed builds correctly reference stubs libs"
This reverts commit ca438e6b72.

Reason for revert: ci post-submit failures in aosp-master-bazel of targets mixed-droid-clean and mixed-droid-incremental:
FAILED: ninja: 'out/target/product/generic_arm64/obj/SHARED_LIBRARIES/libc_intermediates/libc.so.toc', needed by 'out/target/product/generic_arm64/obj/EXECUTABLES/updater_intermediates/LINKED/updater', missing and no known rule to make it
12:21:27 ninja failed with: exit status 1

Change-Id: I081b499d23f2568cdf6227c4e3b0278164086b69
2023-04-19 14:02:52 +00:00
Inseob Kim
5860f8227c Add min_sdk_version prop to snapshots
Bug: 277403349
Test: build vndk/vendor snapshot and build
Change-Id: I226032bb0f9356cdef6747daec6ceb06589d9cbb
2023-04-18 11:30:22 +09:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
fecec28c34 Merge "bp2build: migrate export_{,system_}include_dirs -> *includes for cc_prebuilt_library{,_static,_shared}" 2023-04-17 21:01:21 +00:00
Florian Mayer
7de9aa1a7b Merge "Add handling for libc_hwasan to Soong" 2023-04-14 23:27:57 +00:00
Treehugger Robot
0c3682be50 Merge "mixed builds correctly reference stubs libs" 2023-04-14 23:07:21 +00:00
Colin Cross
dea1d03975 Fix addrsig warnings
ld -r reorders symbols and invalidates the .llvm_addrsig section, which
then causes warnings if the resulting object is used with ld --icf=safe.
The warning is especially common when building with musl, as the
clang_rt.crt* objects have .llvm_addrsig sections, are linked into
libc_musl_crt* using ld -r, and are then linked into every other binary
and shared library with --icf=safe.

Strip the .llvm_addrsig section after ld -r to prevent the warnings.

Test: m USE_HOST_MUSL=true host-native -k
Change-Id: Ia52a4756b9ebbb62115898d0de9f8641e6fea705
2023-04-14 14:31:14 -07:00
Sam Delmerico
3eda019e04 Revert "Respect Clang version override env vars."
Revert submission 2478283-master-I3cf18e7814ff52d526017e4fe34b17ab3d8f1080

Reason for revert: implementing a different way

Reverted changes: /q/submissionid:2478283-master-I3cf18e7814ff52d526017e4fe34b17ab3d8f1080

Change-Id: I1d690b6d322adc664e4c02d958f0183bbb78e669
2023-04-14 18:07:25 +00:00
Sam Delmerico
ca438e6b72 mixed builds correctly reference stubs libs
Bug: 270408757
Test: go test
Test: m NeuralNetworksTest_shared_partial --bazel-mode-staging
  && verify that Ninja commands link libneuralnetworks via stubs
Change-Id: I19bf5a829cea7fd00c0f82511ad2bddbc40fae4f
2023-04-14 12:42:23 -04:00
Treehugger Robot
9e1117bf66 Merge "Differentiate between public and module-lib stub variants" 2023-04-14 02:46:23 +00:00
Spandan Das
b2b41d57cd Differentiate between public and module-lib stub variants
The public stubs of libclang_rt.* originate from the same module. When
generating the Androidmk entries for these stubs, we need to add a
suffix to differentiate between the two stub variants.

This is likely an issue specific to libclang_rt.*. The public stubs of
other libraries like libc, liblog, ... come from a separate module
ndk_library which adds an .ndk suffix

Test: lunch module_arm64only && TARGET_BUILD_APPS="build.bazel.examples.apex.minimal" build/soong/soong_ui.bash --make-mode  nothing
(with aosp/2535141)
Test: lunch aosp_cf_arm64_phone-userdebug && m nothing

Change-Id: I2b4411cb022b4e27f44d2fce6cb26492dd7e2278
2023-04-13 22:25:40 +00:00
Trevor Radcliffe
4ffcdad9c0 Merge "New test for propagation of CFI" 2023-04-13 21:10:57 +00:00
Trevor Radcliffe
bc65f63abc New test for propagation of CFI
Bug: 261733820
Test: It is a test

Change-Id: I3aedbdc14c4f5c41a706962894b6c686dbb1a70c
2023-04-13 14:46:40 +00:00
Elliott Hughes
7d57090bb3 Merge "Temporarily disable shadow call stack for riscv64." 2023-04-13 01:47:42 +00:00
Elliott Hughes
2aff6c1132 riscv64: stop reserving x18 for shadow call stack.
We're switching from x18 to gp, in stages. This change frees up x18
again now bionic and ART have switched to gp. There's no need for a
corresponding "reserve gp" change because gp is automatically reserved.
That's what makes it the perfect choice for shadow call stack (at
least until we get Zsslpcfi and an actual hardware shadow stack pointer
special-purpose register).

Bug: https://github.com/google/android-riscv64/issues/72
Bug: http://b/277909695
Test: treehugger
Change-Id: Iaee1d44cba8daf5d4a27a3791fe3cc28ed1a5d9a
2023-04-12 14:24:44 -07:00
Elliott Hughes
5beb42fe22 Temporarily disable shadow call stack for riscv64.
We're trying to switch from x18 to gp for shadow call stack, ideally
without breaking anything, so let's disable shadow call stack while we
rearrange things behind the scenes...

Bug: http://b/277909695
Test: treehugger
Change-Id: Ic1a6bceaf0ab20dc66e1903747ebb668232a253a
2023-04-12 13:11:29 -07:00
Trevor Radcliffe
2a1de1bfe6 Merge "Separate out Cross DSO flag for Bazel" 2023-04-12 18:38:39 +00:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
c641cc496b bp2build: migrate export_{,system_}include_dirs -> *includes for cc_prebuilt_library{,_static,_shared}
Migrate `export_include_dirs` property to attribute `export_includes`, handling arch/os-variants
Migrate `export_system_include_dirs` property to attribute `export_system_includes`, handling arch/os-variants

Test: cc_prebuilt_library_{,shared_,static_}conversion_test.go
Test: mixed_droid.sh
Bug: 229374533

Change-Id: I658a336a71265af0545c1c2db1a4f6eb613a7366
2023-04-11 18:56:41 +00:00
Trevor Radcliffe
9f4b4769c5 Separate out Cross DSO flag for Bazel
See the other CL in this topic for a description of why.

Bug: 261733820
Test: Unit Tests
Change-Id: I045c2f883258c3f5db9790300d89a7be04d56012
2023-04-11 17:43:15 +00:00
Trevor Radcliffe
a772d6588d Extract out Visibility flags
Bug: 261733820
Test: Unit tests
Change-Id: Ief4ca3b34de6df9a613e94fd31b447a7bb1f04f8
2023-04-11 13:41:17 +00:00
Treehugger Robot
3848896584 Merge "Include license texts and kinds for VNDK snapshot" 2023-04-11 08:44:44 +00:00
Treehugger Robot
9aecb53b8d Merge "Include NDK CRT object variants in the sysroot." 2023-04-11 01:00:04 +00:00
Yi Kong
6706ff674b Merge "Turn off stack protector check for noreturn calls" 2023-04-11 00:42:33 +00:00
Yi Kong
ecc18df6ff Turn off stack protector check for noreturn calls
This feature has a substantial impact on RSS memory usage (>2% in many processes). Turn this off for now.

Test: RSS memory benchmark
Bug: 277565884
Bug: 277083500
Change-Id: I2fc5826048ba5d00cabcc8401ac40a6f54812a43
2023-04-10 11:57:19 +00:00
Justin Yun
1871f90026 Include license texts and kinds for VNDK snapshot
VNDK snapshot must include the information of the license texts and
kinds. Include them when packaging the snapshot prebuilt files.
This will be used to generate the VNDK snapshot files.

Bug: 270625053
Bug: 277317599
Test: development/vndk/snapshot/build.sh --build-artifacts
Change-Id: I0a39ff598efbb80faaf63807cdf5ce685fa074cc
2023-04-07 20:13:19 +09:00
Florian Mayer
95cd6db590 Add handling for libc_hwasan to Soong
libc_hwasan is a new library in the runtime apex that lives in
bionic/hwasan/libc.so and is symlinked to /system/lib64/hwasan/libc.so.
This is chosen by the linker if an app or binary requires HWASan
support.

Bug: 276930343
Change-Id: If331744ad84241ad99a41805ea3110d37cf9b0af
2023-04-06 15:55:50 -07:00
Treehugger Robot
b4949c2b4f Merge "Revert "Revert "Fix NDK library sysroot arrangement.""" 2023-04-06 20:46:41 +00:00
Yi Kong
a1961e7eed Prepend AFDO flags to allow overriding
This enables turnning off -fprofile-sample-accurate on a per project
basis.

Bug: 274725934
Bug: 273415627
Test: presubmit
Change-Id: I15060950f7b55e51069cb00b66512c7e94981f1b
2023-04-05 11:49:19 +09:00
Dan Albert
5b0d4f3a30 Include NDK CRT object variants in the sysroot.
The actual NDK distribution will overwrite these (they're branded with
the platform's version information, which isn't what the NDK wants to
brand apps with), but including them here makes it easier to iterate
on the platform sysroot in situations that don't require a strictly
correct NDK sysroot.

Bug: None
Test: None
Change-Id: I22d4de9caa8753578a2327b1ece0deb005708b08
2023-04-04 23:27:15 +00:00
Dan Albert
4048bb0a89 Revert "Revert "Fix NDK library sysroot arrangement.""
This reverts commit 961cf1cf9c.

Reason for revert: Fixed

Change-Id: I3c5c0b89c924753b62c1bc126d7e64975ef7f137
2023-04-04 23:27:15 +00:00
Treehugger Robot
43a2a9a5c6 Merge changes from topic "fdo_profile"
* changes:
  Reimplement afdo support for rust
  Implement fdo_profile module type
2023-04-03 22:35:25 +00:00
Rebecca Chyung
20d1290cfa Merge "Revert "Fix NDK library sysroot arrangement."" 2023-04-03 06:08:42 +00:00
Rebecca Chyung
961cf1cf9c Revert "Fix NDK library sysroot arrangement."
This reverts commit 169256f535.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/build-details/9868109/targets/mokey-userdebug, bug b/276513771

Change-Id: Iea77994cd4ff0f61a8fa72e52cd1b601bc7cc1a0
2023-04-03 06:06:58 +00:00
Vinh Tran
cde1016aff Reimplement afdo support for rust
Ignore-AOSP-First: The parent CL is internal
Bug: 267229065
Test: go test
Change-Id: Ia14679285b92f3f14ff269392a61f978c71311b2
Merged-In: Ia14679285b92f3f14ff269392a61f978c71311b2
2023-03-31 17:55:16 -04:00
Vinh Tran
44cb78c988 Implement fdo_profile module type
Introducing fdo_profile module type to reimplement the afdo support in cc moduels. This change allows the feature to be compatible with Bazel migration.

How it works:

PreDepsMutators:
  * BeginMutator: If non-static cc modules sets afdo prop, search and add corresponding fdo_profile module as a dep with fdoProfileTag
  * fdoProfileMutator:
    * If in fdo_profile module, set FdoProfileProvider with full path to profile
    * If in cc module, read FdoProfileProvider from dep with fdoProfileTag and set FdoProfileInfo.Path to FdoProfilePath field

PostDepsMutators:
  * afdoDepsMutator: If a module has FdoProfilePath set, walk to its static deps and set itself to the deps' AfdoRdeps
  * afdoMutator: If a static dep has AfdoRDeps set, create afdo variant.

Ignore-AOSP-First: Other CLs in the same topic are internal-only
Test: go test
Bug: b/267229065
Change-Id: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
Merged-In: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
2023-03-31 17:52:01 -04:00
Dan Albert
dfe24db34f Merge "Fix NDK library sysroot arrangement." 2023-03-31 18:54:46 +00:00
Treehugger Robot
840d49a564 Merge "rename aidl/library.bzl to aidl/aidl_library.bzl" 2023-03-31 18:26:33 +00:00
Sam Delmerico
e55bf08de2 rename aidl/library.bzl to aidl/aidl_library.bzl
Test: b test --config=android //build/bazel/...
Change-Id: I7e22ee5ffa391ddaf43a3eec17812be78f2d86ab
2023-03-31 09:48:27 -04:00
Prashanth Swaminathan
bce5507c02 Enable sext.w removal for riscv targets
Bug: 275574215
Test: Verified boot complete on aosp_cf_riscv64_phone target.
Change-Id: I771dbc492075eec18919b66dc74ae524e3f4b3cd
2023-03-30 20:06:50 +00:00
Treehugger Robot
f1e0ce079c Merge "Remove dead code." 2023-03-29 19:17:57 +00:00
Treehugger Robot
4dd3659393 Merge "Enable Wincompatible-function-pointer-types globally" 2023-03-29 19:11:14 +00:00
Colin Cross
3f3320cb1c Merge changes I93da03b1,I5fb3ee29
* changes:
  Use static asan runtime for musl
  Simplify depending on static sanitizer runtimes
2023-03-29 17:04:14 +00:00
Alistair Delva
08a68a09a9 Merge "Revert "[RISC-V] rv64gc_zbb for Android"" 2023-03-29 16:24:19 +00:00
Treehugger Robot
c23ca62058 Merge "Do not install prebuilt stubs from module_sdk" 2023-03-29 02:29:09 +00:00
zijunzhao
2a08ccd0ba Enable Wincompatible-function-pointer-types globally
Bug: b/257101299
Test: make checkbuild
Change-Id: I7a5adc0c04e420e6782371b3efc3fbffd367b3a2
2023-03-29 00:31:49 +00:00
Dan Albert
169256f535 Fix NDK library sysroot arrangement.
We've been fixing this up on the NDK build side for ages. The
platforms/ subdirectory is a legacy thing from very old NDKs. Fix the
install paths to match what the NDK actually uses. This both lets us
delete some code on the NDK side and also makes the platform's output
easier to consume directly without having to wait for an NDK release
(or even a canary).

Bug: None
Test: treehugger
Test: inspected out/soong/ndk/sysroot
Test: build/soong/scripts/build-ndk-prebuilts.sh, imported into NDK
Change-Id: I3c4e0ce6d7960ae0138d1cf803755e4f1e575631
2023-03-28 23:19:01 +00:00
Dan Albert
e75af185a8 Remove dead code.
NDK CRT objects haven't been prebuilts for ages.

Bug: None
Test: treehugger
Change-Id: I923381da629b78487587e997018fa63dd818617f
2023-03-28 23:13:16 +00:00
Alistair Delva
cc75089229 Revert "[RISC-V] rv64gc_zbb for Android"
This reverts commit 9838acffdd.

Reason for revert: b/274947458

Broke CI.
Will reland with QEMU options once the host image is fixed.

Change-Id: I6ad847cde2a291b3dd5b92314b2011744de50883
2023-03-28 20:59:36 +00:00
Treehugger Robot
9e30ad39ba Merge "Add tests to verify more use cases of afdo in cc and rust" 2023-03-28 18:18:18 +00:00
Trevor Radcliffe
6182d31c63 Merge "Supporting changes for CFI toolchain features" 2023-03-28 14:23:55 +00:00
Jooyung Han
e5f063e85f Do not install prebuilt stubs from module_sdk
This is a rework of commit 5bdf2d589c
which made implementation variant of prebuilts with stubs as not
installable except libclangrt. This change narrows the affected modules
to prebuilts/module_sdk because cc_prebuilt_library_shared with stub
implementation is a special case only used there. It's typical for
cc_prebuilt_library_shared to have implementation, not stub.

Bug: 220898484
Test: ART_MODULE_BUILD_FROM_SOURCE=false m nothing
Change-Id: I99e5213da8cc473901e23942b50f06c023d91f60
2023-03-28 18:19:04 +09:00
Aditya Kumar
13ca1a9207 Merge "[RISC-V] rv64gc_zbb for Android" 2023-03-28 05:05:05 +00:00
Trevor Radcliffe
391a25d7fa Supporting changes for CFI toolchain features
Mostly exporting variables to Bazel, but also allowlisting a BUILD
file.

Bug: 251217226
Test: Unit tests
Change-Id: Id87015a3cd5d970700c4058ec989bb0c14c36bcb
2023-03-27 18:07:40 +00:00
Vinh Tran
2e7b0fd271 Add tests to verify more use cases of afdo in cc and rust
Test: go test
Bug: 267229065
Change-Id: I4aa9538e92aa27e0f842bdce3725bc82739196cb
2023-03-27 14:01:40 -04:00
Liz Kammer
a22c4b6a79 Disable flaky test temporarily
Test: go test . -run TestStubsForLibraryInMultipleApexes -count 1000
Bug: 275313114
Change-Id: Iee0ffa0c182840f036325b67c15d3731566151b2
2023-03-27 10:06:02 -04:00
Liz Kammer
48cdbeba29 Handle stubs within an apex with apex_available
Note this doesn't entirely match Soong's logic but is an improvement to
allow linking against implementation when two cc modules are
apex_available to the same module.

It is not possible to recreate the logic for "directly in" without
significant changes to bp2build as we do not add dependencies nor run
apex mutators. Rather than trying to replicate this, we would be better
off refactoring Soong to no longer support the "directly in apex" logic
and require users to correctly specify apex_available.

Bug: 272378496
Test: go test conversion tests
Change-Id: I17ac426f9b4bdad0c2ab661484e5d994f63568ce
2023-03-27 13:05:37 +00:00
Liz Kammer
2b3f56ed22 Add apex_available aidl + aidl&lang libraries
Test: b build com.android.neuralnetworks com.android.media.swcodec
Change-Id: I008b915b22e4c8c2cf1f0aee6cfdaf17374cb3a9
2023-03-24 15:14:53 -04:00
Liz Kammer
10e5a0e987 Add apex_available tags for sysprop modules
Test: b build com.android.mediaswcodec
Change-Id: Ic780573d6992a0471989d6c4887960a3c42e1bef
2023-03-24 13:08:43 -04:00
Liz Kammer
aceec25d3f Add apex_available for static/shared only props
Test: b build com.android.neuralnetworks com.android.media.swcodec
Change-Id: I492c61d60d29a7a441d709ac4315a5ed2288960d
2023-03-24 13:08:42 -04:00
Yi Kong
a137aa2e6e Merge "Revert^2 "Update clang version to clang-r487747"" 2023-03-24 13:19:52 +00:00
AdityaK
9838acffdd [RISC-V] rv64gc_zbb for Android
Change-Id: Ia6ee7899f8643e5a81a3a8125319bed11a0795da
2023-03-23 16:54:50 -07:00
Yi Kong
fd07ed2c14 Revert^2 "Update clang version to clang-r487747"
9ede280375

Bug: 264965700
Change-Id: I4154c70c050a825525d5b591fa757104eb78c158
2023-03-23 14:14:31 +00:00
Colin Cross
b781d23575 Use static asan runtime for musl
Use static asan runtimes for musl binaries to match glibc binaries.
The static asan runtime also requires libclang_rt.asan_cxx.a.  Unlike
most other runtimes the asan runtimes need to expose the symbols
from the runtime to allow intercepting calls to malloc, new etc.

Test: m USE_HOST_MUSL=true aidl_unittests && out/host/linux-x86/testcases/aidl_unittests/x86_64/aidl_unittests
Test: sanitize_test.go
Change-Id: I93da03b1c447fbb01f37262e7a465f165c2d5a18
2023-03-22 12:58:39 -07:00
Colin Cross
5dc62c9456 Add sanitizer tests for musl
Add tests that verify sanitizer behaviors for musl.

Test: sanitize_test.go
Change-Id: I1f0a51cc103ac14d1738cb223e216ee0e32d8550
2023-03-22 12:58:38 -07:00
Colin Cross
e323a793e2 Simplify depending on static sanitizer runtimes
The dependencies on static runtimes are getting compilicated, as they
vary on whether or not they should hide or export symbols from the
runtime.  Instead of setting flags to try to add the right static
runtime later, add them as dependencies immediately with a call to
addStaticDeps.

Test: sanitize_test.go
Change-Id: I5fb3ee29b31ce99d8feac262fcf71d19396dc68d
2023-03-22 12:58:38 -07:00
Liz Kammer
d42d738fda Merge "add parent static deps to cc_aidl_library targets" 2023-03-22 14:43:57 +00:00
Elliott Hughes
c214e1ab8a Merge "Allow SCS for riscv64 too." 2023-03-21 22:10:56 +00:00
Sam Delmerico
512437b0b4 add parent static deps to cc_aidl_library targets
The static deps of the parent library can be necessary to build a
bp2build-generated cc_aidl_library target. We should add these deps as
implementation_deps so that they are accessible.

Bug: 250876486
Test: b build //frameworks/native/libs/gui/...
Change-Id: Ibe7c3598a684907473e2a4e040fb3976455a59e9
2023-03-21 16:49:06 -04:00
Treehugger Robot
c47a46adcd Merge "Revert "Re-enable stack frame size errors"" 2023-03-21 20:00:41 +00:00
Florian Mayer
25cd981362 Revert "Re-enable stack frame size errors"
Reason for revert: b/274474681

Change-Id: If4f1eda6a82ce715d8e492292b5c62eb3f5a201f
2023-03-21 17:25:10 +00:00
Spandan Das
0c7ea9582a Merge "Build rust libraries against C ModuleLib API surface." 2023-03-21 17:22:23 +00:00
Treehugger Robot
2f1e052266 Merge "Use installExecutable for cc binaries" 2023-03-21 05:39:54 +00:00
Inseob Kim
c1fd399ccd Use installExecutable for cc binaries
Normally InstallFile is enough because linker grants +x permission to
its output. Just to guarantee +x permission even when the source file
doesn't have one.

Test: build
Change-Id: I01082df11d414804e1a73336fc637a6a2208021f
2023-03-21 01:42:59 +00:00
Jooyung Han
52cb409e93 Merge "Make filesystem aware of coverage" 2023-03-21 01:36:01 +00:00
Jooyung Han
0a687b888d Merge "Vendor apexes can be "updatable: true"" 2023-03-21 00:59:08 +00:00
Ioana Alexandru
54fb18d43b Merge "Revert "Export non-apex variants of modules to make"" 2023-03-20 11:08:55 +00:00
Jingwen Chen
8ac7d7d01d Revert "Export non-apex variants of modules to make"
This reverts commit 502da3987a.

Reason for revert: b/274195633

```
In file included from out/soong/installs-aosp_cf_x86_pasan.mk:134984:
In file included from out/soong/Android-aosp_cf_x86_pasan.mk:981696:
In file included from build/make/core/soong_cc_rust_prebuilt.mk:76:
build/make/core/base_rules.mk:342: error: packages/modules/Uwb/service/uci/jni: MODULE.TARGET.SHARED_LIBRARIES.libuwb_uci_jni_rust already defined by packages/modules/Uwb/service/uci/jni.
```

Change-Id: Ic1ea6969e54c23a7d126eb0fb47ab6f2e44ee965
2023-03-20 11:05:16 +00:00
Jooyung Han
dfc864c802 Vendor apexes can be "updatable: true"
Vendor APEXes can be updatable unless it sets "use_vndk_as_stable:true".
When "updatable:true", it should meet the "updatable" requirements like
"should set min_sdk_version".

Bug: 274396342
Bug: 274041915
Test: m nothing (soong tests)
Change-Id: I746d8941c21e883c1eba3e1f1e5a414a67db071a
2023-03-20 18:29:31 +09:00
Treehugger Robot
c887ac6a04 Merge "Depend on stubs via @api_surfaces" 2023-03-17 21:06:55 +00:00
Florian Mayer
c0d209f2e5 Merge changes Ib7d0ef98,Ifbd1e542
* changes:
  Re-enable stack frame size errors
  Increase BB to explore for reachability analysis
2023-03-17 18:51:17 +00:00
Cole Faust
bebe607db4 Merge "Export non-apex variants of modules to make" 2023-03-17 17:20:19 +00:00
Spandan Das
2518c022d1 Depend on stubs via @api_surfaces
BUILD files of rdeps should depend on stubs via @api_surfaces
indirection. e.g. instead of depending on
//system/logging/liblog:liblog_stub_libs_current, it should depend on
@api_surfaces//module-libapi/current:liblog. This ensures that the
generated BUILD files are compatible with Multi-tree.

Update the unit tests for this change.

Test: TH
Change-Id: Ibcc36dcfbee7b1973b341485f015e67987564dcc
2023-03-17 16:54:53 +00:00
Treehugger Robot
9433998d9a Merge "Fix the make name of rust snapshots" 2023-03-17 00:13:50 +00:00
Spandan Das
604f376dcf Build rust libraries against C ModuleLib API surface.
Previously, rust libs in platform would build against stubs even if the
dependency was part of platform. Port the correct logic from the
recently implemented aosp/2421967

Test: TH

Change-Id: I7f6a0ca24654b4424d2f4cfcef2d15e15b1298fc
2023-03-16 23:17:36 +00:00
Cole Faust
502da3987a Export non-apex variants of modules to make
Currently, non-apex variants of modules that are in apexes are not
exported to make unless they're apex_available to the platform. This
means that you can't `m` those modules directly.

However, there is a workaround in the apex androidmk implementation that
emits make rules for the removed modules, but just redirects them to
build the apex itself. We want to remove that, but one of the problems
with doing so is that you can no longer `m` many modules afterwards.

To fix that, unhide the apex's dependencies from make. To ensure they're
not installed, call SkipInstall() on them, and update SkipInstall() to
be more strict by setting `LOCAL_UNINSTALLABLE_MODULE := true`.

Bug: 254205429
Test: Presubmits
Change-Id: Ib971981559f3b642ce6be8890679e994e1b44be0
2023-03-16 11:13:23 -07:00
Sam Delmerico
c02e7d4017 Merge "remove stub dependency on source_library" 2023-03-16 17:43:11 +00:00
Spandan Das
046bb4b08a Merge "NDK ABI diffs requires implementation" 2023-03-16 17:02:04 +00:00
Treehugger Robot
feeee3ad26 Merge "make tidy attribute tri-state" 2023-03-16 15:42:21 +00:00
Sam Delmerico
5f90649036 remove stub dependency on source_library
Since the source_library attribute of _cc_stub_library_shared was a
label attribute, the source library was added as a dependency of the
stub which doesn't always make sense. E.g. it caused validation actions
for the source library to run even when we weren't building the source
library.

This change converts the label attriubte to a string attribute so that
we don't add the dependency.

Bug: 263390551
Change-Id: I19c62d1e14847dff68ab37156452addaa119eaf9
2023-03-16 10:01:22 -04:00
Jooyung Han
e606759ddf Make filesystem aware of coverage
filesystem should have coverage variants with coverage-enabled build.
Otherwise, it would fail to collect dependencies.

Bug: 273238141
Test: m nothing (soong tests)
Test: compare the artifacts
 $ SKIP_ABI_CHECKS=true SOONG_COLLECT_JAVA_DEPS=true EMMA_INSTRUMENT=true\
   EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true\
   NATIVE_COVERAGE_PATHS='*' m microdroid
 $ m microdroid
Change-Id: I792458ace00a63b4b5213898fd3209351a6e00be
2023-03-16 13:11:17 +09:00
Justin Yun
24b246a7a8 Fix the make name of rust snapshots
Rust snapshot must have proper suffix for androidmk to avoid conflict
with the existing modules.

Bug: 230780263
Bug: 235895567
Test: m nothing
Change-Id: I35794196553621cd722c067d7965b2a61aa351bd
2023-03-16 11:05:41 +09:00
Sam Delmerico
63f0c93b09 make tidy attribute tri-state
Bazel boolean attributes can only support true or false states, but the
clang-tidy logic changes for modules which don't set a specific value.
Therefore, the tidy attribute should really be a tri-state of "true",
"false", or "" (unset).

Test: b test //build/bazel/rules/...
Bug: 268681923
Change-Id: I85fbaa612d175f475757db806cea6c018901fe3e
2023-03-15 10:10:43 -04:00
Treehugger Robot
79727bd236 Merge "Enable Wunqualified-std-cast-call globally" 2023-03-15 01:41:58 +00:00
Florian Mayer
b0c9dd777e Re-enable stack frame size errors
Bug: 229654778
Change-Id: Ib7d0ef98577adbd69b98cac450d3727ab1fdec81
2023-03-14 23:46:15 +00:00
Florian Mayer
1866bbe0d2 Increase BB to explore for reachability analysis
We pass mcpu=cortex-a55 for our build, which increases BB to the point
where the LLVM default of 32 is not enough.

I ran a fullmte build and did not see any slowdown.

Bug: 229654778
Change-Id: Ifbd1e5427101b2f2f39c067ba3ea4d5cb4a3ba0d
2023-03-14 23:45:39 +00:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
b157846a68 Merge "Revert "Revert "Produce _alwayslink sibling targets through bp2b..."" 2023-03-14 23:01:47 +00:00
Treehugger Robot
2f58ad52e5 Merge "Allow "-mllvm foo" cflags" 2023-03-14 22:01:58 +00:00
zijunzhao
96ec99a736 Enable Wunqualified-std-cast-call globally
Bug: b/239662094
Test: make checkbuild
Change-Id: Icd012c12ce13e04efa269c6898823c1178a02b74
2023-03-14 21:27:48 +00:00
Spandan Das
8b08aea32e NDK ABI diffs requires implementation
ABI diffs reqiures implementation and cannot be generated from the
imoprted <lib>.apiimport soong module

Test: go test ./cc
Change-Id: Ie1da877a5a7d8b984112b64ca7d2c3d4c8d99cb4
2023-03-14 21:07:58 +00:00
Treehugger Robot
f214f12014 Merge "Respect Clang version override env vars." 2023-03-14 20:25:58 +00:00
Yi Kong
6a0f506f3a Allow "-mllvm foo" cflags
LLVM backend flags are a pair of flags beginning with "-mllvm". Teach
Soong to allow these flag pairs.

Test: presubmit
Change-Id: Ib2b9cb8ce8704338e14dbd1f1a656e10b86c0ee3
2023-03-12 16:31:10 +09:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
c353abdd53 Revert "Revert "Produce _alwayslink sibling targets through bp2b..."
Revert submission 2473787-revert-2467901-b/267214124-TLTTMLWFDS

Reason for revert: Fixed compilation errors

Reverted changes: /q/submissionid:2473787-revert-2467901-b/267214124-TLTTMLWFDS

Test: TOLIST
Bug: 271943047
Bug: 267214124

Change-Id: Ib08440377f6645cf26de4bda748d82c4dcd0b43a
2023-03-10 22:14:29 +00:00
Iván Budnik
ff8c95b610 Merge "Revert "Export non-apex variants of modules to make"" 2023-03-10 16:30:32 +00:00
Iván Budnik
295da16b95 Revert "Export non-apex variants of modules to make"
Revert submission 2462194-androidmk_for_apex_dependencies

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=full-eng&lkgb=9723453&lkbb=9724944&fkbb=9723508, bug b/272663333.

Reverted changes: /q/submissionid:2462194-androidmk_for_apex_dependencies

Bug: 272663333
Change-Id: I847fa910a8d54de19954f56fe92a80a9bcd0ee18
2023-03-10 16:11:26 +00:00
Cole Faust
f42c21d5f8 Merge "Export non-apex variants of modules to make" 2023-03-10 06:36:03 +00:00
Cole Faust
ad222f271a Export non-apex variants of modules to make
Currently, non-apex variants of modules that are in apexes are not
exported to make unless they're apex_available to the platform. This
means that you can't `m` those modules directly.

However, there is a workaround in the apex androidmk implementation that
emits make rules for the removed modules, but just redirects them to
build the apex itself. We want to remove that, but one of the problems
with doing so is that you can no longer `m` many modules afterwards.

To fix that, unhide the apex's dependencies from make. To ensure they're
not installed, call SkipInstall() on them, and update SkipInstall() to
be more strict by setting `LOCAL_UNINSTALLABLE_MODULE := true`.

Bug: 254205429
Test: Presubmits
Change-Id: Ib094feb2c437ad50d8319c58caa997759e7ce32f
2023-03-09 11:20:10 -08:00
Spandan Das
d14a70d7ed Merge changes Ib004c2c3,I6b63d9d0
* changes:
  Create aliases for stubs in build/bazel/api_surfaces
  Add a method in bp2build to create aliases in another directory
2023-03-09 18:14:13 +00:00
Zijun Zhao
add695f784 Merge "Revert "Revert "Enable -Wformat-insufficient-args globally""" 2023-03-09 07:57:15 +00:00
Peter Collingbourne
ebc290c758 Respect Clang version override env vars.
Bazel fails to respect the environment variables $LLVM_PREBUILTS_VERSION
and $LLVM_RELEASE_VERSION, which are commonly used by LLVM developers
to build using a custom compiler. Fix it.

Bug: 272408039
Change-Id: I3cf18e7814ff52d526017e4fe34b17ab3d8f1080
2023-03-08 22:28:20 -08:00
Zijun Zhao
d156908820 Revert "Revert "Enable -Wformat-insufficient-args globally""
This reverts commit fa6b6843a7.

Reason for revert: Bug fix: https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/whitechapel/audio/+/21912759

Change-Id: I1c95f8d813171b500fa48c809bcffb0af7179f9a
2023-03-08 23:48:45 +00:00
Spandan Das
9e93d3d6e1 Create aliases for stubs in build/bazel/api_surfaces
- Create the alias under the module-libapi directory. This is the
  api_surface that cc_stubs_suite maps to.
- Create the alias only for "current" (atleast for now)
- Create one alias for the stub shared lib, and another for its headers

Test: b build @api_surfaces//... (with aosp/2475091)
Change-Id: Ib004c2c34256f971e74d75317fa5fbbe7273720e
2023-03-08 21:40:41 +00:00
Cole Faust
912bc8862e Use product variables from the overridden apex
override_apex's bp2build converter had a bug where it was looking at
the product variables for the override_apex module itself instead of
for the base module it is overriding.

Fixes: 271424349
Test: go test
Change-Id: If1e2653d3751fa908faf0ab97dfa2e943ebe98ec
2023-03-08 12:29:50 -08:00
Ian Kasprzak
fa6b6843a7 Revert "Enable -Wformat-insufficient-args globally"
This reverts commit bb55424e55.

Reason for revert: b/272272172 - Breaking multiple builds on git_tm-qpr-dev-plus-aosp

Testing: https://android-build.googleplex.com/builds/abtd/run/L83100000959000587


Change-Id: I854e24735689b5a3b8373d3bc947d184338eedde
2023-03-08 16:49:33 +00:00
zijunzhao
bb55424e55 Enable -Wformat-insufficient-args globally
Bug: b/191699019
Test: make checkbuild
Change-Id: Ie60d626345b9a448c3d0939faba9b6250ab34f94
2023-03-08 05:18:10 +00:00
Yu Liu
6fb6b2440a Merge "Remove the NO_EXPORTING handling of libprofile-clang-extras." 2023-03-08 01:57:47 +00:00
Evgenii Stepanov
dd2e32d859 Merge "Introduce armv9-a arch variant." 2023-03-07 22:58:11 +00:00
Evgenii Stepanov
80d74920fd Introduce armv9-a arch variant.
Armv9 with mandatory PAC and BTI extensions.
Stack protector is disabled as it is irrelevant with PAC.

Bug: 263283855
Test: NFC
Change-Id: I2f298f21dade12824597e0a6920772a2bfc63afb
2023-03-07 11:18:52 -08:00
Treehugger Robot
88e949945d Merge "Revert "Produce _alwayslink sibling targets through bp2build"" 2023-03-07 07:33:16 +00:00
Wilson Sung
68e126ee62 Revert "Produce _alwayslink sibling targets through bp2build"
Revert submission 2467901-b/267214124

Reason for revert: compile error

Reverted changes: /q/submissionid:2467901-b/267214124

Change-Id: I2235fd1457fda60b4613d5512f7fb20b7044a2db
Fix: 271943047
2023-03-07 04:16:53 +00:00
Wei Li
598f92d704 Export Soong module type to LOCAL_SOONG_MODULE_TYPE to Make for SBOM generation.
Bug: 266726655
Test: CI

Change-Id: If5b1a77930a591b6061ca2749c9c5ad29b4491fb
2023-03-06 22:51:03 +00:00
Yu Liu
9cc34a7142 Remove the NO_EXPORTING handling of libprofile-clang-extras.
This is no longer necessary after we reduce the exported static libs in
roboleaf.

Bug: None
Test: b build adbd with coverage enabled.
Change-Id: Ia049138c4cdd536670371b4fc9a54fca40d16d20
2023-03-06 11:13:03 -08:00
Treehugger Robot
80ebd72995 Merge "soong: Add Cortex-A32 definitions" 2023-03-06 17:26:20 +00:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
0eee856e69 Merge "Produce _alwayslink sibling targets through bp2build" 2023-03-06 14:43:28 +00:00
Kiyoung Kim
8972e4d6bb Merge "Implement API surface import with APEX stub" 2023-03-06 00:40:13 +00:00
Jesus Sanchez-Palencia
de7c7847e7 soong: Add Cortex-A32 definitions
Add definitions for the Cortex-A32 CPU. This is an aarch32 only ARMv8-A
core. See more here https://developer.arm.com/Processors/Cortex-A32 .

Test: added new minidroid target using this CPU variant and built
Change-Id: Id2351a43b9c6cb9785ef469b8c13fadd8b6324b8
Signed-off-by: Mark Slevinsky <markslevinsky@google.com>
Signed-off-by: Jesus Sanchez-Palencia <jesussanp@google.com>
2023-03-03 14:14:03 -08:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
011b7cf063 Produce _alwayslink sibling targets through bp2build
Add Alwayslink to bazelPrebuiltLibraryStaticAttributes
Also adjust the corresponding tests to espect these new targets.

Test: m libc
Test: b build --config=android //prebuilts/clang/host/linux-x86:libunwind-exported_alwayslink
Test: bp2build.sh
Bug: 267214124
Change-Id: I4d996aef55321f1827947f00b0eaa52d0a14413e
2023-03-03 20:12:20 +00:00
Trevor Radcliffe
56b1a2b575 LTO Bp2build
Bug: 261733821
Test: Unit Tests
Change-Id: I8c3721d35c464e296012145b2e95a7f0866aac37
2023-03-02 17:45:01 +00:00
Yi Kong
cec8b2c0b7 Merge "Revert "Update clang version to clang-r487747"" 2023-03-02 09:25:42 +00:00
Treehugger Robot
8c41eca698 Merge "Remove OWNERS access for non-build team people to core build system" 2023-03-01 19:45:38 +00:00
Helen Qin
9ede280375 Revert "Update clang version to clang-r487747"
Revert submission 2446165-update-clang-r487747

Reason for revert: DroidMonitor-triggered revert due to breakage bug b/271252582 and b/271243811

Reverted changes: /q/submissionid:2446165-update-clang-r487747

Bug: 271252582
Bug: 271243811
Change-Id: I3b5c44982d268b5c6c3db39e7af4d7aa7c6dfbf7
2023-03-01 19:31:36 +00:00
Yi Kong
29ff4182f5 Merge "Update clang version to clang-r487747" 2023-03-01 05:02:15 +00:00
Joe Onorato
442b6fc701 Remove OWNERS access for non-build team people to core build system
Test: treehugger
Change-Id: I0c318ddd7d78110327bbd849ed9aa3973c86de5d
2023-02-28 19:29:47 -08:00
Cole Faust
18994c73f1 Replace SortedStringKeys with SortedKeys
Now that we have generics.

Bug: 193460475
Test: presubmits
Change-Id: I1594fd8feb505175d5c09c03ef397e5ffd5b09cb
2023-02-28 16:51:32 -08:00
Omar Eissa
fabd0dd8d3 Revert "Enable -Wformat-insufficient-args globally"
This reverts commit 49f09a3694.

Reason for revert: b/271045282

Change-Id: Ice56137c5567a38d15cc39f80497ce74bc18650f
2023-02-28 11:08:57 +00:00
zijunzhao
49f09a3694 Enable -Wformat-insufficient-args globally
Bug: b/191699019
Test: m
Change-Id: Ib71a422a7a1621c0994ea07a90fa9ab914fcc6fd
2023-02-27 22:55:01 +00:00
Kiyoung Kim
76b06f3973 Implement API surface import with APEX stub
Implement APEX stub of API surface so any stub can be replaced with API
surface when APEX stub interface is required.

Unlike other stub interface, APEX stub can be decided if it should be
used after APEX postdeps mutator analyzes which modules should be
included in which APEX. To cover this, APEX stub is being added to the
dependency if the dependency should not be covered with LLNDK or NDK
stub, and APEX stub exists. From depsToPaths, if dependency to both
original module and API library exists, then it choose one of the
dependency and ignore the other.

To cover this logic, a new property is added to the api_surface :
apex_libs. This is introduced as it is difficult to
gather all api library with apex stub before DepsMutator.

Bug: 264963986
Test: cf_x86_64_phone_vendor build succeeded
Change-Id: I9f0b1f70968e32eba94d3e0d7bb1f4bb29ff2438
2023-02-27 12:57:30 +09:00
Jooyung Han
8ecedd4dfc Merge "Prevent sdk variants from install" 2023-02-27 00:41:34 +00:00
Yi Kong
836690b593 Update clang version to clang-r487747
Test: presubmit
Bug: 264965700
Change-Id: I2db879f4dcc77b606c788b3e3890ed2a3faa6594
2023-02-23 20:49:59 +00:00
Yu Liu
995a3a192f Merge "Only apply apex transition to DCLA libs for now." 2023-02-23 02:16:19 +00:00
Yu Liu
89ce6bd127 Merge "bp2build of libraries with stubs should handle non-implementation deps" 2023-02-22 23:35:04 +00:00
Yu Liu
bfb2362cde Only apply apex transition to DCLA libs for now.
Bug: 270339610
Test: mixed_droid.sh
Change-Id: I6a8b7fdefeb504a25256e92647de9b487d5b65a3
2023-02-22 10:43:46 -08:00
Iavor-Valentin Iftime
a1e3a55810 Merge "Revert "Revert "Revert "Enable -Wformat-insufficient-args globally"""" 2023-02-22 10:22:40 +00:00
Iavor-Valentin Iftime
3251d4a6f0 Revert "Revert "Revert "Enable -Wformat-insufficient-args globally"""
This reverts commit c50ae9c6e2.

Reason for revert: b/270300283

Change-Id: I7da15937b200e707847bcf1403d4a7ac55c0822c
2023-02-22 10:18:51 +00:00
Treehugger Robot
ee8daaa689 Merge "Revert "Revert "Enable -Wformat-insufficient-args globally""" 2023-02-22 09:25:19 +00:00
Jooyung Han
54f780505d Prevent sdk variants from install
Platform variants should be available even when unbundled_build so that
unbundled build of com.android.virt apex can correctly have microdroid
image with system variants.

Bug: 268582372
Test: m (soong test)
Test: banchan com.android.virt aosp_arm64
      UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true m apps_only dist
      (microdroid should have the same contents)
Change-Id: I682e4f1f477f3024f7719dfaa67006ef335e0640
2023-02-22 13:45:49 +09:00
Zijun Zhao
c50ae9c6e2 Revert "Revert "Enable -Wformat-insufficient-args globally""
This reverts commit cc1d984d49.

Reason for revert: Fixed 
https://googleplex-android-review.git.corp.google.com/21522363

https://source.corp.google.com/h/googleplex-android/platform/superproject/+/tm-qpr-dev-plus-aosp:vendor/google/whitechapel/audio/hal/audio_hal/ext_module/amcs_ext/amcs_ext.c;l=266;bpv=1

Change-Id: I79ee06b720f1299ab02cb129baabb3c025c31483
2023-02-22 00:38:28 +00:00
Yu Liu
10174ff208 bp2build of libraries with stubs should handle non-implementation deps
Bug: 266724299
Test: Unit test and manual tests
Change-Id: I7d7641676fbf3d3fae413b27d329a4b05b1cd3bf
2023-02-21 12:07:07 -08:00
Yu Liu
e43124023c Support DCLA
Bug: 240424572
Test: Manual tests:
1. m --dev-mode-staging com.android.adbd com.android.media.swcodec.
2. verify the DCLA libs from the two apexes have the same size and
   sha1sum, and also match the libs in bazel-out.
3. empty the DCLA libs list in allowlist.go and repeat step 1
4. repeat step 2 and verify the opposite result
5. build git_master: mainline_modules_bundles-userdebug in ABTD
   with the cl, then follow go/build-sideload-dcla-locally to
   download the adbd and swcodec aab files, run the DCLA trimming
   workflow locally, and verify the symlinks in the two trimmed
   apexes are identical and also match the lib path in the DCLA
   apex that was created by the workflow.

Change-Id: Ib2f8a29126a54829c0e10eba17b256a79930fd70
2023-02-21 10:12:47 -08:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
01ec55ec92 Express no{,_lib}crt via features vs attrs
Given that we can map them directly to disabling the
corresponding Bazel features: `-{link_,use_lib}crt`

Test: Existing (adapted) Unit Tests
Test: bp2build.sh
Change-Id: Ib502f6fb929ace8e86a1001e3cc21f399317500c
2023-02-17 19:24:42 +00:00
Andrea Zilio
cc1d984d49 Revert "Enable -Wformat-insufficient-args globally"
This reverts commit af8b950357.

Reason for revert: Broke the build, see b/269687118

Change-Id: I6f7fac0e24c710bd00af77e4d96c845eefe0a9ce
2023-02-17 11:51:10 +00:00
zijunzhao
af8b950357 Enable -Wformat-insufficient-args globally
Bug: b/191699019
Test: m
Change-Id: I6349308d1f8b13e5c5d75b154e8c9b53d9eec4bf
2023-02-16 17:52:22 +00:00
Yi Kong
32a15c4269 Merge "Remove bug links for noOverrideExternalGlobalCflags" 2023-02-16 11:46:16 +00:00
Yi Kong
d80f6eebc9 Remove bug links for noOverrideExternalGlobalCflags
We are not going to fix these warnings for 3p projects, there is no
point keeping a bug link here.

Test: N/A
Change-Id: I1c2479d8919b1c1b10287e021827b78c52813585
2023-02-16 16:51:31 +09:00
Aditya Kumar
4c660ae58e Revert "Build riscv64 with thin LTO"
This reverts commit 17c9c2a5b5.

Reason for revert: Wait until new toolchain with linker fix las landed (https://android-review.git.corp.google.com/c/toolchain/llvm_android/+/2424081)

Change-Id: I05b14c12ac93182dd93c5b490f260071c6d3a090
2023-02-15 01:32:22 +00:00
Trevor Radcliffe
0620c7c56a Merge "Add test that LTO isn't propagated to runtime_libs" 2023-02-14 17:09:03 +00:00
AdityaK
17c9c2a5b5 Build riscv64 with thin LTO
Depends on: https://android-review.git.corp.google.com/c/platform/system/libhwbinder/+/2336346

Bug: b/254713216
Change-Id: Id750cab796ddf8c180fa0570e46cab0161788974
2023-02-13 21:42:30 +00:00
AdityaK
f7c0afdb6e Disable emulated tls for RISCV
Bug: b/267688421

Change-Id: I885bcf966db2e9a0a3edc1fee865b3cf9c6ff90a
2023-02-13 21:31:36 +00:00
Trevor Radcliffe
cb7c448066 Add test that LTO isn't propagated to runtime_libs
Bug: 261733821
Test: It is a test
Change-Id: I2cda89dc53d6eaa51c756f552d990169a280b053
2023-02-10 20:29:20 +00:00
Colin Cross
f5d42a206f Merge "Fix test so it works on mac" 2023-02-10 05:00:02 +00:00
Elliott Hughes
e4793bc73f Allow SCS for riscv64 too.
Bug: https://github.com/google/android-riscv64/issues/55
Test: treehugger
Change-Id: I319fc662c1dd6083757f78b8d91ec2775ef94a46
2023-02-10 01:53:17 +00:00
zijunzhao
2863c0a40c Enable -Wnull-dereference globally
Bug: b/29823425
Test: m
Change-Id: I8d73cbc92b06829d8b937af262298d54c7697404
2023-02-09 19:05:09 +00:00
Trevor Radcliffe
e22f384f3c Fix test so it works on mac
Bug: 261733821
Test: The change is a test
Change-Id: I5cc15f642260b34d54840921941e6e56ef75d561
2023-02-09 19:01:31 +00:00
Yi Kong
aa0833a8fb Merge "Migrate to the new clang lib dir" 2023-02-08 20:29:17 +00:00
Trevor Radcliffe
41d0539715 Merge "Add test for LTO edge case" 2023-02-08 20:18:15 +00:00
Sam Delmerico
e413f4046f Merge "mixed build targets need transitive tidy files" 2023-02-08 20:11:30 +00:00
Ivan Lozano
e37e1578c1 Merge "Copy Rust fuzzer dependencies to /data." 2023-02-08 13:46:17 +00:00
Yi Kong
bd1888156a Migrate to the new clang lib dir
Test: presubmit
Change-Id: I7ac7eb415a5f5c3d8b6d9298c1b4ccf2839aaea6
2023-02-08 19:54:05 +09:00
zijunzhao
13b00771b6 A nit of code comment
This is not the correct bug link. It should be removed when enabling
-Wxor-used-as-pow in external. See: aosp/2356123

Bug: None
Test: None
Change-Id: I6bc1d35e07ed11fc0c70a625b0035348a6428678
2023-02-07 23:36:11 +00:00
Sam Delmerico
4ed95e263f mixed build targets need transitive tidy files
Previously in mixed builds, only the tidy files for the boundary module
were built, whereas all of its transitive dependencies' tidy files were
not being built. Instead we should export the list of transitive tidy
files for a module so that we can run clang-tidy for the boundary module
as well as its dependencies.

Bug: 195029134
Test: WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true mss tidy-packages-modules-NeuralNetworks --bazel-mode-dev
Change-Id: I463646d2ae1fc4aa075a54c264e1c34571c3fd5c
2023-02-07 16:50:30 -05:00
Trevor Radcliffe
07cf4ed90d Add test for LTO edge case
This test confirms the behavior when LTO is disabled generally but
then enabled for a specific target.

Bug: 261733821
Test: Unit test
Change-Id: I415cd0146f2b83d85654239550d129f87e9001bc
2023-02-07 19:46:51 +00:00
zijunzhao
aeb73f8e57 Disable -Wformat-insufficient-args for external code.
Bug: 191699019
Test: presubmit
Change-Id: I8af5ccdca4078468d6de2f6212045875d7c6541b
2023-02-06 23:34:18 +00:00
Colin Cross
676e15a452 Merge "Use platform libc++ for riscv64 sdk variants" 2023-02-06 20:56:17 +00:00
Ivan Lozano
0f9963e9e4 Copy Rust fuzzer dependencies to /data.
Fix an issue where rust_fuzz modules were
not correctly packaging and copying their
dependencies.

This is done by extending the CC fuzz packager
to simply handle both Rust and CC modules,
ensuring this doesn't get out of sync again.
Fuzzer related functions are added to the
Linkable interface to facilitate this.

There was a bug where the Make definitions for
Rust fuzzers were not being created as well,
and that is addressed here.

Bug: 249551848
Test: m android_log_fuzzer #check $OUT/data/fuzz/arm64/libs
Change-Id: I9b41153e0cf08ab510476b75003c3a3baccc3858
2023-02-06 13:48:23 -05:00
Sam Delmerico
1978fdf9b2 Merge "clean up CL for androidmk variables" 2023-02-02 14:11:12 +00:00