Commit graph

8452 commits

Author SHA1 Message Date
Ivan Lozano
c7c29b9b8e Merge "rust: Add SCS sanitizer option." into main 2023-07-27 14:23:33 +00:00
Yi Kong
2dbe160d1a Do not enable AFDO if the option is off, even if there is a profile file
The behaviour is accidentally changed during the Bazel migration.

Test: m
Change-Id: I44158f2518776c68938ad2ddab01431005a333b0
2023-07-27 14:04:05 +09:00
Florian Mayer
07ca220182 [hwasan] remove workaround for fixed toolchain issue
these two upstream commits fixed the issues in global-isel and fast-isel:

* global-isel: https://reviews.llvm.org/D82615
* fast-isel: https://reviews.llvm.org/D138615

Currently used clang r498229 (defined build/soong/cc/config/global.go)
is based on upstream commit 14f0776550b5a49e1c42f49a00213f7f3fa047bf
which includes these two changes.

Bug: 293297826
Test: build oriole_hwasan and boot
Change-Id: I65fabdf0b5edd248b4bf4e138a999f8142370cd5
2023-07-26 21:17:56 +00:00
Liz Kammer
3847f21848 Convert coverage libs as alwayslink
Bug: 291090629
Test: bp2build.sh and CI
Change-Id: I050a870b36b5bc84dbdbca73405e0a0fab1aef86
2023-07-26 19:24:23 +00:00
Liz Kammer
c796de83c8 Merge "Handle xsd config more like other partitions" into main 2023-07-26 19:18:52 +00:00
Spandan Das
e50fd111f3 Emit gtest in BUILD files only if Android.bp sets it
cc_test bazel macro will default `gtest` to True (similar to Soong). So
we can skip explicitly setting this in the generated BUILD files. The
benefit will be that it will make the generated files less verbose,
without loss of information.

This will be implemented by changing its datatype to *bool from bool.

Test: go test ./bp2build
Test: TH
Change-Id: I284e10f1d58c8e7893b170209827f7d5084ca95e
2023-07-26 17:42:21 +00:00
Ivan Lozano
447f5b1ea9 rust: Add SCS sanitizer option.
SCS has been supported in Rust since 1.64.0.

This adds SCS as a sanitizer option in Rust.

Bug: 168914033
Test: Built module with sanitize: { scs: true }
Change-Id: Ibdc116a335339af6d0b0d6dd0bb82c0358fa9087
2023-07-26 13:34:55 -04:00
Spandan Das
d1cd3518a8 Support cc_test.isolated in bp2build
This property implicitly adds `libgtest_isolated_main` to the static
libs of the test. bp2build will make this and `liblog` explicit in BUILD
files

Since the deps are made explicit in BUILD files, `isolated` becomes a
no-op for cc_test. Remove this property from cc_test.

Test: unit tests
Bug: 244432609
Change-Id: I189a7b6b62d9064f4b2abad49ac4975468046498
2023-07-26 17:06:27 +00:00
Spandan Das
f5a8655cd8 Fix difference in default cc_test.isolated in soong and bp2build
Soong defaults to false, while bp2build defaults to true. This CL fixes
bp2build's default to false to match Soong.

To prevent future differences, bp2build now uses the `isolated()`
function used by Soong. The type of the context object has been changed
to EarlyModuleContext so that the ctx object does not depend on
mutations that might not run in bp2build.

Test: TH
Bug: 244432609
Change-Id: I15346107896312961e8d12270cf2f9a2a48827e1
2023-07-26 17:06:27 +00:00
Prashanth Swaminathan
81532c2762 Revert "Revert "Set VIC as minimum SDK version for riscv64""
This reverts commit 02f4e6f559.

Change-Id: I9fb87e2789bbc8437da56faa335de49865e08350
2023-07-26 09:47:10 -07:00
Prashanth Swaminathan
08e634d5ce Revert "Revert "Use prebuilt NDK libc++ for rv64.""
This reverts commit 967e16f3d8.

Change-Id: I78cb0176fd21a8c0c376bee76631621712aeddaa
2023-07-26 09:43:15 -07:00
NaYoung Yun
02f4e6f559 Revert "Set VIC as minimum SDK version for riscv64"
This reverts commit a96a2677b6.

Reason for revert: build break

Reverted changes: /q/submissionid:2676418-hack-rv64-libc%252B%252B
Bug: 293214158
Bug: 293214503
Bug: 293214158
Bug: 293219471

Change-Id: I6eaa1f7c9f498159db4d50840dd91e246314153f
2023-07-26 04:15:47 +00:00
Steven Moreland
8fe37e44b5 Linker: no demangle.
You can c++filt, but you can't c++unfilt.

By having the linker provide the exact name of symbols
that are used, we can much more easily resolve missing
symbols in version script files. For instance, I spent
2 hours today working around not having this... :(

After a while, you get used to it. I don't even see the
code.

Bug: 206145174
Test: hide all symbols from a library and see beautiful
  and lossless raw symbols.
Change-Id: Ie0730cd503358bf2d383a56be902f7aeef1eea01
2023-07-25 23:13:36 +00:00
Prashanth Swaminathan
a96a2677b6 Set VIC as minimum SDK version for riscv64
Bug: 291150284
Test: Local build of Cuttlefish RISCV targets.
Change-Id: I3879fc9480cac4962d0ecbbf4ab116b331987e82
2023-07-25 22:12:45 +00:00
Treehugger Robot
35448be862 Merge "Make libtest_* deps explicit in BUILD files" into main 2023-07-25 18:46:39 +00:00
Jingwen Chen
6ee23ad2f7 cc_test mixed builds: suffix bazel label with __tf_internal.
To support `b test //path/to:my_test` command line, the actual
executable in the cc_test macro now has the __tf_internal suffix in its
name, so that the top level test suite target can be named without any suffixes.

See other CLs in this topic for more info.

Test: presubmits
Fixes: 292159775
Change-Id: I2d0bfc4276717ae881f6f3eb6aefa88bb47f25da
2023-07-25 08:02:11 +00:00
Liz Kammer
0db0e34c68 Gen a header library when genrules export includes
Embedding multiple includes from a genrule may be difficult to read,
instead we generate a header library that contains the headers and all
include dirs that Soong generates.

Test: go test bp2build tests
Change-Id: I590c74c133f015f27cccf5a2fd916153ad9c125e
2023-07-24 13:57:17 -04:00
Liz Kammer
5f5dbaad65 Handle xsd config more like other partitions
This is prep work to add additional special handling for genrule
generated headers as there will be similar partitioning for those
headers.

Test: go test soong tests
Change-Id: Ib63e7e4f7554b2b7b7bc78b2825b20c05403216a
2023-07-24 13:01:22 -04:00
Spandan Das
651203de35 Make libtest_* deps explicit in BUILD files
This is currently implicitly added by the cc_test macro. This can cause
duplicate issues if users write a BUILD file as
```
cc_test (
  name = "mytest",
  deps = ["libgtest"],
)
```
Making this dep explicit in BUILD files prevents this issue.

The property `gtest` will not be removed as part of this CL. cc_test
macro will use this property to add some gtest specific copts

Test: unit tests
Bug: 249374572
Change-Id: Ife931e26367fd4aab302bedc709cf907e2c01245
2023-07-21 23:04:32 +00:00
Dan Albert
460fb2d6d5 Merge "Remove libandroid_support support." into main 2023-07-21 21:06:41 +00:00
Joe Onorato
37f900ca7f Add aconfig flags and a generic generated library plugin module for cc
The generated module lets us keep the aconfig code in its own pacakge
and not infect all of the cc package with aconfig. It's also closer
to what bazel is going to do

Bug: 283479529
Test: m aconfig_hello_world_cc && adb push $TOP/out/target/product/panther/system/bin/aconfig_hello_world_cc /system/bin && adb shell aconfig_hello_world_cc
Change-Id: I2fb9e419939c7ca77b111da9c376af077e2348a9
2023-07-21 09:04:42 -07:00
Dan Albert
94dd5651d7 Remove libandroid_support support.
This hasn't been needed since Android dropped API 19/20 support.

Bug: None
Test: m
Change-Id: I2749d6a706d4aa2fe13cac9816b4a2be9743ad24
2023-07-20 18:17:04 +00:00
David Fu
26661d1bb0 Merge "Added haiku presubmit packaging" into main 2023-07-20 17:00:05 +00:00
David Fu
fd121fcfd7 Added haiku presubmit packaging
Change-Id: I6cdb06fe0c2d7dd6320a1dafe859172b280dd53c
2023-07-19 23:46:02 +00:00
Treehugger Robot
12a1f9182d Merge "Convert requested SDK version if preview API level" into main 2023-07-19 20:05:05 +00:00
Sam Delmerico
cfcd0a4960 Merge "make android.InList generic" into main 2023-07-19 15:02:56 +00:00
Liz Kammer
0a681989ae Merge "Handle static binary repetition of system deps" into main 2023-07-19 14:16:52 +00:00
Treehugger Robot
7d34640ac8 Merge "Install VNDK libraries into vendor or product lib with flag" into main 2023-07-19 04:44:51 +00:00
Yi Kong
7d8231d13e Merge "isCfi should query the mutated version" into main 2023-07-19 02:38:28 +00:00
Prashanth Swaminathan
6dcbd9c239 Convert requested SDK version if preview API level
The 'sdk_version' flag should be allowed to specify a preview API level
codename. Convert the raw name into an integer using the common library
functions. This also switches out the comparison logic to use the
ApiLevel as defined by the 'android' library instead of doing
string-to-int conversion on the output.

Test: Verified that setting VIC as an sdk_version does not crash.
Change-Id: I6ed5fb7ff0dcfa3598e74faa656cde7fa2085bae
2023-07-18 17:55:01 -07:00
Sam Delmerico
1717b3bb7a make android.InList generic
Change-Id: Ic166216cb473371a5e34cd97a068ca35f5534740
2023-07-18 15:07:24 -04:00
Aditya Kumar
a4755647b0 Merge "Enable scs for riscv64" into main 2023-07-18 18:26:42 +00:00
Treehugger Robot
8edcba4c2f Merge "Create one rule per one corpus/data files" into main 2023-07-18 15:37:25 +00:00
Ivan Lozano
87987fd058 Merge "rust: Add vendor and recovery dylib support." into main 2023-07-18 13:08:08 +00:00
Inseob Kim
3b24406dda Create one rule per one corpus/data files
To avoid MAX_ARG_STRLEN hardlimit.

Test: build and check intermediate directory
Change-Id: I44db1ed14cae4de6ace5b25a392d394d0f9f617a
2023-07-18 12:38:08 +00:00
Yi Kong
ddffe72b92 isCfi should query the mutated version
... similar to isFuzzer.

Test: verify libaudioflinger_timing does not have duplicate -flto flags
Bug: 289475610
Change-Id: Id7e5ec90b1b445f09f8b2ea164289450a77dfbb5
2023-07-18 16:40:36 +09:00
Treehugger Robot
0b5ca6ad06 Merge "Add product name to the opt-in ABI error message" into main 2023-07-18 06:28:03 +00:00
Kiyoung Kim
e623c58cc6 Install VNDK libraries into vendor or product lib with flag
Install VNDK libraries into vendor or product lib when flag
'KEEP_VNDK' is set as false from build. This flag will be used to
test while deprecating VNDK step by step.

Bug: 290157355
Test: build succeded with DEPRECATE_VNDK succeded
Test: Cuttlefish boot succeded with sepolicy disabled
Change-Id: I05b166f054113ae2775df4e310916d0ea4af3fb6
2023-07-18 02:02:57 +00:00
AdityaK
111d68053b Enable scs for riscv64
https://github.com/google/android-riscv64/issues/106

Bug: b/277909695

Change-Id: I2ea0d41fd9dc43b3fefb748d10694917034ab586
2023-07-17 22:43:44 +00:00
Treehugger Robot
8eff85680c Merge "Turn off Global ThinLTO for LP32 again" into main 2023-07-14 22:07:53 +00:00
Treehugger Robot
4cf52f17c5 Merge "Revert "Enable sext.w removal for riscv targets"" into main 2023-07-14 20:59:25 +00:00
Trevor Radcliffe
3edec2151e Merge "Update name of blocklist feature in bp2build" into main 2023-07-14 19:59:50 +00:00
Yi Kong
13beeedff7 Turn off Global ThinLTO for LP32 again
LP32 has many subtle issues and less test coverage.

Bug: 290859519
Bug: 169004486
Test: presubmit
Change-Id: I33fcf1a08b9e7a905ba81030250a9578532da5a0
2023-07-15 03:18:06 +09:00
Ivan Lozano
add122a828 rust: Add vendor and recovery dylib support.
Adds dylib support for vendor and recovery images.

This changes the default linkage for vendor and recovery images to
dylib, which matches the platform default linkage. This also means that
by default, dylib-std variants are used for rlib dependencies.

Bug: 204303985
Test: Soong tests.
Test: m dist vendor-snapshot
Test: RECOVERY_SNAPSHOT_VERSION=current m dist recovery-snapshot
Change-Id: If84074b8615a70c45e7e162abeb853dc8c34d49a
2023-07-14 12:43:09 -04:00
Yi Kong
8f9ca23c1e Fix a typo. NFC.
Test upload from Cog...

Change-Id: I68964d14d0a01be2bdc0ad276bdfde9f879795f2
Test: N/A
2023-07-14 06:18:38 +00:00
Prashanth Swaminathan
0498912c9f Revert "Enable sext.w removal for riscv targets"
This reverts commit bce5507c02.

The update of LLVM to clang-r498229 resolved the error with sext.w as
resolved in D143594.

Bug: 275574215
Test: Verified boot of riscv64 phone target.
Change-Id: Ie31b7db03004c5aafb6067713ef5f819e0706b64
2023-07-13 17:33:12 -07:00
Fabián Cañas
3875e1c582 Merge "Make clang debug level configurable" into main 2023-07-12 17:58:33 +00:00
Trevor Radcliffe
d71487173e Update name of blocklist feature in bp2build
Bug: 290908194
Test: Forrest
Change-Id: I0576fb644edb6b6043df9cf01b508ee887f946f1
2023-07-12 13:45:10 +00:00
Treehugger Robot
71f5a63267 Merge "Turn on Global ThinLTO by default" into main 2023-07-11 17:42:12 +00:00
Yi Kong
add6375a10 Turn on Global ThinLTO by default
Build C/C++ targets with ThinLTO with "--lto-O0" by default. This takes
advantage of better dead code elimination and CFG simplification due to
ThinLTO's global view of the program, but do not enable the costly LTO
optimizations. This also makes builds faster because we can avoid doing
codegen for the dead code.

Code size for panther-userdebug:
                   /system/bin  /system/lib  /system/lib64
Original           57648        86264        181700
Global ThinLTO     55764        84916        175728
                   -3.27%       -1.56%       -3.29%

Build time for aosp_arm64-userdebug:
                   clang time   linker time
Original           56993.87s    1712.36s
Global ThinLTO     52839.18s    3114.93s

saving 4.68% build time in total.

Bug: 169004486
Test: presubmit
Change-Id: Idb0f4675ca4750b8b12b24f4679579419d3448c8
2023-07-11 21:26:52 +09:00
Fabián Cañas
bc10544dec Make clang debug level configurable
The -g flag is controllable with CLANG_DEFAULT_DEBUG_LEVEL from -g0 to
-g3. The default remains -g

Test: Build with CLANG_DEFAULT_DEBUG_LEVEL=debug_level_1

Change-Id: I913d3a0cb028484f9496a7e0a2298852f9b699cd
2023-07-10 20:49:22 +00:00
AdityaK
423e4ce9e3 gsimple-template-names
Based on: https://chromium-review.googlesource.com/c/chromium/src/+/3988987

```
Savings are almost 330M on 11G

du -s out.diff/target/product/vsoc_arm64/symbols
10751692        out.diff/target/product/vsoc_arm64/symbols
du -s out/target/product/vsoc_arm64/symbols
11086508        out/target/product/vsoc_arm64/symbols
```

Change-Id: I49a5c4cadc77cb0d97e680e95c4efa7156a42f13
2023-07-10 17:36:22 +00:00
Elliott Hughes
ff96fe1589 Merge "Remove -fstrict-aliasing from arm32." into main 2023-07-10 14:37:39 +00:00
Liz Kammer
b492843c3f Handle static binary repetition of system deps
Test: b build `bmod toybox-static`
Test: go test bp2build tests
Change-Id: Id728f6fd08832a4fc153f0ff5282cdfb6b19c2f6
2023-07-10 10:28:02 -04:00
Elliott Hughes
9bbe96068d Remove -fstrict-aliasing from arm32.
Our global default is -fno-strict-aliasing (including for 32-bit x86),
so let's avoid a source of arm32-only bugs.

Bug: http://b/31600139
Test: treehugger
Change-Id: Iaf3069200b2969718593387dc5b756c574a5d68a
2023-07-07 19:45:24 +00:00
Yabin Cui
f67bc44848 Merge "Update clang version to clang-r498229" into main 2023-07-06 23:54:42 +00:00
Treehugger Robot
253054a175 Merge "Add comment for afdo flag" 2023-07-05 20:40:46 +00:00
Vinh Tran
056effb8b1 Add comment for afdo flag
Change-Id: If80df0ac0527784b13158325589c29587db8d5f9
Test: N/A
2023-07-05 15:48:21 +00:00
Yi Kong
b9d5046d8b Simplify LTO flags handling
... and add more comments about the use of --lto-O0.

Test: presubmit
Change-Id: I2ef7bf4f100a8d7559a6b738e9211c596d579dc6
2023-07-03 17:16:42 +09:00
Hsin-Yi Chen
8b85d81ac3 Add product name to the opt-in ABI error message
Normally, the users of opt-in ABI check do not enable it for all
architectures. The error message instructs the users to update the ABI
reference dumps for the product failing on the check.

Test: make
Bug: 254141417
Change-Id: I19d28c83a3485266a190ba8abc9ddfb8deeb5106
2023-06-29 17:08:12 +08:00
Pirama Arumuga Nainar
b0d649043f Merge "Disable "-Wl,-plugin-opt,-import-instr-limit=5" on MacOS" 2023-06-28 20:17:09 +00:00
Spandan Das
557423d96e Merge "Remove special-casing of DCLA libraries" 2023-06-28 04:38:35 +00:00
A. Cody Schuffelen
7188b90e69 Disable "-Wl,-plugin-opt,-import-instr-limit=5" on MacOS
This option is unsupported on the MacOS ld used in Android, leading to
compilation errors when LTO is enabled for binaries.

In particular the error includes:
```
ld64.lld: error: unknown argument '-plugin-opt'
ld64.lld: error: unknown argument '-import-instr-limit=5'
```

Test: m libc++ on a Mac OS machine
Bug: 288983988
Change-Id: I1873e0a77777832f833f211beb42633d462f04d5
2023-06-27 19:15:07 -07:00
Spandan Das
2327d163a2 Merge "cc mixed build support to allowlist M13 libraries" 2023-06-27 17:27:49 +00:00
Spandan Das
95b24b1165 Remove special-casing of DCLA libraries
This is a revert of aosp/2449906

mixed build currently supports platform and apex variants of allowlisted
cc libraries. However when building apex variants, we would pass an
apexKey only for allowlisted _dcla_ libraries. This meant that for libraries in
mixed build allowlist but not in dcla allowlist, Soong's apex variants
were being replaced with Bazel's platform variants.

Bug: 270339610
Bug: 288906815
Test: Added libnativeloader, libartpalette-system to prod mixed build
allowlist and `m`

Change-Id: I922fed898b3c3961466cd1165c371839a4192237
2023-06-27 00:14:48 +00:00
Treehugger Robot
7376815e21 Merge "Handle no generated headers and exporting for xsd" 2023-06-26 21:20:46 +00:00
Spandan Das
40b79f8def cc mixed build support to allowlist M13 libraries
Propagate api_domain from top-level config_node(s) in mixed builds.
This ensures that cc_libraries are built in the correct config setting
in mixed builds

Test: m com.android.media.swcodec
Test: built and booted google variant of com.android.media.swcodec
Test: m ccodec_unit_test

Change-Id: I14e3c8e8358b5e90e71697584f9b0eceb018bfa9
2023-06-26 18:06:51 +00:00
Mitch Phillips
03d510404c Merge "[MTE] Add memtag_globals as a sanitizer target." 2023-06-26 05:50:11 +00:00
Alix Espino
8131290360 Merge "bp2build conversion for rscript srcs in cc modules" 2023-06-23 20:29:09 +00:00
Liz Kammer
084d6a908f Handle no generated headers and exporting for xsd
Test: new bp2build unit tests
Test: build libvintf
Change-Id: I2c7bf409b30d78fcf6762d69139e3249a2b0d368
2023-06-23 15:48:16 -04:00
Treehugger Robot
cc1a519b86 Merge "Disable mixed builds for unsupported variants" 2023-06-23 18:25:01 +00:00
Liz Kammer
1cec9d1c51 Disable mixed builds for unsupported variants
Test: CI
Change-Id: Icdaef8b2955a88dc94348c85c5aa6bb9b3c91148
2023-06-23 08:53:13 -04:00
Colin Cross
313d32f730 Merge "Use generics for DepSets" 2023-06-22 20:57:01 +00:00
Florian Mayer
c3adf443e7 Merge "Reland "Re-enable stack frame size errors"" 2023-06-22 20:55:48 +00:00
Yabin Cui
294f839606 Update clang version to clang-r498229
Bug: 280683256
Test: presubmit
Change-Id: Idd0e171f11e0a7f44c64744744505ddeaca6f2fd
2023-06-22 17:29:55 +00:00
Mitch Phillips
92d19fa306 [MTE] Add memtag_globals as a sanitizer target.
MTE globals needs four pieces:
 1. (done) clang/llvm to produce objfiles with MTE globals metadata
 2. (in flight, https://reviews.llvm.org/D152921) lld to process the metadata in the objfiles, and produce information in each DSO describing the global variables that need to be tagged (alongside some other stuff).
 3. (this patch) android to handle the new sanitizer
 4. (not yet sent) bionic's libc/linker to interpret the information in each DSO, and tag the global variables.

Because #2 will take some time to come through the toolchain rolls, and #3 and #4 can be landed asynchronously, we can land this ahead of time. Should make my life easier by preventing constant rebases.

Bug: N/A
Test: Build {libc, libm, libc++, libm, and libnetd} in internal master
with these patches and an experimental compiler with the lld support.
Also, `SANITIZE_TARGET=memtag_globals m` here with in-tree compiler
without lld support.

Change-Id: Ie7882d474d4d776232de3a3d571a82274df14bf0
2023-06-22 17:04:40 +00:00
Colin Cross
c85750bfe3 Use generics for DepSets
Use Go's generics for DepSets so they don't require a type-specific
wrapper and reflection.

Test: depsets_test.go
Change-Id: I22ba0b7d680d37d2cd05230b0f560d166c4dd20b
2023-06-22 08:18:33 -07:00
Treehugger Robot
f44ac9efc1 Merge changes I6ddb47d7,I3df3d304
* changes:
  [hwasan] Increase BB to explore for reachability
  [hwasan] Also pass use-after-scope flag in LTO
2023-06-21 21:14:52 +00:00
Alix
e266787aed bp2build conversion for rscript srcs in cc modules
Bazel does not support using .rscrip/.fs files as cc srcs.
For a module foo with foo srcs, Bp2build will create a bazel
target of rule class rscript_to_cpp with name foo_renderscript
which will have only the renderscript files as srcs.
Bp2build will also create a target foo with the expected cc rule class.
The foo target will have all other src files as srcs and will also
have the target foo_renderscript as another src.

Bug: 210509914
Test: bp2build testing & b build target rstest-latency
Change-Id: Ifdc55051a3595f5fcf54eab8b59e11e9351e141c
2023-06-21 14:58:10 +00:00
Trevor Radcliffe
8bd06008dc Merge "Explicitly disable CFI in bp2build when false" 2023-06-20 19:52:17 +00:00
Elliott Hughes
1b2a65783d Merge "Bump the platform default up to C17." 2023-06-20 16:56:51 +00:00
Florian Mayer
c746619feb [hwasan] Increase BB to explore for reachability
We pass mcpu=cortex-a55 for our build, which increases BB to the point
where the LLVM default of 32 is not enough. This caused worse coverage
for use-after-scope detection, and increased stack usage.

Test: build oriole_hwasan
Bug: 229654778
Change-Id: I6ddb47d7224a9c6ddbf2641c043e3430d330c5a9
2023-06-16 17:34:59 -07:00
Florian Mayer
a998446d3e [hwasan] Also pass use-after-scope flag in LTO
Change-Id: I3df3d3047fd5aaa93e6c4b68885d39e20b12ccdb
2023-06-16 17:34:57 -07:00
Florian Mayer
2bddccd837 Reland "Re-enable stack frame size errors"
This reverts commit 25cd981362.

Reason for revert: b/274474681 is fixed.

Bug: 229654778
Change-Id: I4b975ced02ffe0d5a432a3033f05bb61868bec45
2023-06-16 22:34:41 +00:00
Trevor Radcliffe
523c5c6597 Explicitly disable CFI in bp2build when false
In Soong, CFI being explicitly set to false overrides presence in
CFI_INCLUDE_PATHS, so this change causes Bazel to mimic the same
precedence.

Bug: 278789968
Test: Unit tests
Change-Id: I827b3d4272eac2002031970f1e67c9321979b14b
2023-06-16 20:15:45 +00:00
Christopher Parsons
df9c3441aa Merge "Provide reason for unconverted bp2build modules" 2023-06-16 13:49:49 +00:00
Chris Parsons
39a169721c Provide reason for unconverted bp2build modules
This also changes the expectation of ConvertWithBp2build. Each
implementation must either create one or more Bazel target modules, or
mark the module as unconvertible (with a specific reason).

Manually verified no runtime hit in AOSP
In AOSP, the metrics file size increases from 252K to 1.6M

This changes some effective module counts in bp2build metrics:
 - Removes "package" modules from the module count list in
metrics, as these will not be converted like regular modules.
 - Counts Handcrafted modules as being "unconverted", as bp2build is not
   responsible for them.

Bug: 285631638
Test: Verified generated BUILD.bazel files are bit-for-bit identical
with this change
Test: Manually verified one case of each implemented reasonType

Change-Id: I308dd451d8f28379b15671dae9f931bd0446f5c1
2023-06-16 13:45:17 +00:00
Cole Faust
6cac8cbb26 Add implementation whole archive deps to binaries
...as regular whole archive deps because binaries don't have
implementation whole archive deps.

Also allowlist checkpolicy which requires this change.

Test: bp2build presubmits should now build checkpolicy
Change-Id: I1f98312da249ea1f37004ccba8799449bdbc4718
2023-06-15 15:01:30 -07:00
Elliott Hughes
7225dd87f3 Merge "riscv64: enable Zbs." 2023-06-15 14:28:46 +00:00
Treehugger Robot
e3056e0d78 Merge "Revert "Use installExecutable for cc binaries"" 2023-06-15 01:39:25 +00:00
Trevor Radcliffe
cbaa0d6eb9 Merge "Bp2build Sanitizer Blocklist" 2023-06-14 18:05:30 +00:00
Elliott Hughes
fb294e39bf Bump the platform default up to C17.
This is already the "default default" for gcc and clang.

Bug: http://b/232413369
Test: treehugger
Change-Id: I3c0df7c63e8fca1b7692ad867d349a645559c209
2023-06-14 10:42:45 -07:00
Elliott Hughes
121483bbbc riscv64: enable Zbs.
Cuttlefish still boots to homescreen, all instructions in the extension
are actually seen to be in use, and the bionic tests still pass.

Test: see above
Change-Id: I429729a722cdd7b3bdf257cb7329ee151ec998a0
2023-06-14 08:33:38 -07:00
Elliott Hughes
03520eb2f9 Merge "riscv64: enable Zba." 2023-06-14 14:24:33 +00:00
Yi Kong
c938bec49b Merge "Add GLOBAL_THINLTO env fixture to lto_test" 2023-06-14 11:21:41 +00:00
胡泊
6fe07a5017 Revert "Use installExecutable for cc binaries"
This reverts commit c1fd399ccd.

Reason for revert: build break for prebuilt host binary in read-only source tree

Change-Id: I9f1792f324acbfbaf53254a972cb0894140efabe
Test: m BUILD_BROKEN_SRC_DIR_IS_WRITABLE=false mkimage-host
Bug: 287168966
2023-06-14 07:38:44 +00:00
Yi Kong
f1d0ba411d Add GLOBAL_THINLTO env fixture to lto_test
lto has different behaviour depending on the GLOBAL_THINLTO env var
value.

Tests for GLOBAL_THINLTO=true will be added in a follow up CL.

Test: presubmit
Bug: 169004486
Change-Id: I45f6a35eb26bdb1beeb3ff5f2c0c0cdc8fd8c41f
2023-06-14 14:28:30 +08:00
Trevor Radcliffe
ded095ce45 Bp2build Sanitizer Blocklist
Bug: 286894426
Test: Unit tests
Change-Id: I382e028410a185a5017dba1fc47c83ad5b2432cf
2023-06-13 20:46:27 +00:00
Ivan Lozano
c72d4a78bf Merge "rust: Bundle Rust shared dependencies in fuzzers" 2023-06-13 17:39:48 +00:00
Elliott Hughes
1d1d90b552 riscv64: enable Zba.
Cuttlefish still boots to homescreen, all instructions in the extension
are actually seen to be in use, and the bionic tests still pass.

Test: see above
Change-Id: I6373fa6245115b9b6c845db03ee73b321c07e02a
2023-06-13 07:27:12 -07:00
Ivan Lozano
61c02cc537 rust: Bundle Rust shared dependencies in fuzzers
Rust shared library dependencies are not always bundled in cc_fuzz or
rust_fuzz modules, which can lead to difficult to debug runtime errors
when running these fuzzers. It can also be hard to determine which
dependencies need to be explicitly declared.

This CL makes sure that we bundle the appropriate transitive
dependencies for our fuzzers.

Bug: 249551848
Test: Soong tests
Test: m <fuzzer> # check data/fuzz/<arch>/lib dir contents
Change-Id: I957ca8898079b61e2ff20d750f8c92bf61ac394f
2023-06-09 14:17:49 -04:00
Yi Kong
f1d37b3511 Merge "Refactor LTO" 2023-06-09 03:16:22 +00:00
Yi Kong
895d241013 Refactor LTO
We removed Full LTO support, now LTO is a binary choice. This allows us
to greatly simplify the LTO propagation logic.

Test: m
Test: GLBOAL_THINLTO=true m
Bug: 169004486
Change-Id: Ie4e453d7518c7069a7c755734dab1e776c16e656
2023-06-09 03:15:49 +00:00
Treehugger Robot
f253d23e95 Merge changes from topic "cc_stem"
* changes:
  Remove modules from denylist
  Update runpath for jni libs
  bp2build support for stem
2023-06-08 22:38:34 +00:00
Aditya Kumar
9d1a17d18a Merge "[RISC-V] rv64gc_zbb for Android" 2023-06-08 17:12:26 +00:00
Yu Liu
8860c6c114 Only allowlist cfi enabled modules for apex variant.
Bug: 286224058
Test: lunch aosp_bramble-userdebug && m --skip-soong-tests nothing --bazel-mode-staging
Change-Id: Ida3287ee718dc868a46b625f82c352029734a724
2023-06-07 13:22:54 -07:00
Aditya Kumar
55ceae9e61 [RISC-V] rv64gc_zbb for Android
This reverts commit cc75089229.

Reason for revert: Retry

Change-Id: I957ef442a4988046eeb9771b7ce1acaf4cb6ef8d
2023-06-07 11:19:24 -07:00
Yu Liu
d31098e6c2 Merge "Allow cfi enabled modules in mixed build." 2023-06-06 17:41:18 +00:00
Yi Kong
eb7f45ca9c Merge "afdo: Remove -fprofile-sample-accurate flag" 2023-06-06 17:18:31 +00:00
Treehugger Robot
2976fa1185 Merge "Use a less hacky way to detect if a module is Fuzzer enabled" 2023-06-06 17:13:20 +00:00
Yi Kong
febf8b9bdf afdo: Remove -fprofile-sample-accurate flag
-fprofile-sample-accurate allows the compiler to de-optimize cold code
paths according to the profile. However we have a number of micro-
benchmarks that tests these paths and we often trigger regression
reports from those benchmarks.

Turning off the flag mitigates the issue at a cost of ~2MB increase in
system image size. But the more deterministic codegen could reduce the
differential OTA size.

Test: presubmit
Bug: 283235002
Change-Id: I1016f573f21a60223a97c64f5818f0e7e66e41e3
2023-06-06 08:27:47 +00:00
Yu Liu
95497dc89b Allow cfi enabled modules in mixed build.
Bug: None
Test: Locally tested
Change-Id: I53c4ad8428cf05ceee3d73b4f97c2b9db2285c38
2023-06-05 17:10:14 -07:00
Spandan Das
39ccf93c65 bp2build support for stem
By default, the artifacts generated by cc_binary and cc_library in Soong
track the module name. But Soong supports overidding this using the stem
property. e.g.
```
cc_library {
  name: "foo.1.2",
  stem: "foo",
}
```
will generate foo.so

This CL adds this property to bp2build

Test: bp2build unit tests
Bug: 240563612
Change-Id: I1dfed870d5bad450511b72c397d2355c01fa3b60
2023-06-06 00:07:37 +00:00
Yu Liu
e0a7318331 Merge "Add CFI flags to Compile Action" 2023-06-05 22:47:52 +00:00
Yu Liu
89575db9c6 Merge "CFI Bp2Build" 2023-06-05 22:47:52 +00:00
Spandan Das
91a8820688 Merge changes from topics "xsd_config_bp2build_cc_rdeps", "xsd_config_bp2build_java_rdeps"
* changes:
  bp2build for cc libraries that use xsd_config as gen srcs
  bp2build for java libraries using xsd_config srcs
2023-06-05 22:23:37 +00:00
Trevor Radcliffe
f1836e4728 Add CFI flags to Compile Action
Bug: 261733820
Test: Unit Tests
Change-Id: I7c7cb8ab07da2c66df5d69e1e4af3337e3b24e6d
2023-06-05 18:09:21 +00:00
Trevor Radcliffe
27669c0c9e CFI Bp2Build
Bug: 261733820
Test: Unit Tests and manual verification
Change-Id: Ife1b33c58e3770177eab1b6168edbf7969418ad7
2023-06-05 18:08:07 +00:00
Yi Kong
ed79fa382b Use a less hacky way to detect if a module is Fuzzer enabled
Bug: 169004486
Test: presubmit
Change-Id: I7fad86041622979b9befb7c86897a13f604bdf3d
2023-06-05 14:21:48 +09:00
Yabin Cui
48fa309aa3 Merge changes from topic "clang_stable_r498229"
* changes:
  Suppress clang-tidy warnings causing build errors after clang update
  Suppress performance-avold-endl clang-tidy warning
2023-06-03 02:05:19 +00:00
Treehugger Robot
b25cbb3449 Merge "Support test runnner option in auto generated test configs" 2023-06-02 11:20:23 +00:00
Yi Kong
a00f8efaa7 Merge "Remove Full LTO support" 2023-06-01 22:46:23 +00:00
Yabin Cui
c31c2fb0b0 Suppress clang-tidy warnings causing build errors after clang update
These warnings are not critical. We can fix them later.

Bug: 285361108
Bug: 285356805
Bug: 285356799
Test: build with WITH_TIDY=1 using clang-r498229
Change-Id: I594279a10ffb4fda07dfc33350b44d09c42d3f97
2023-06-01 19:15:40 +00:00
Spandan Das
922171dbdf bp2build for cc libraries that use xsd_config as gen srcs
In Soong, cc libraries depend on source files generated from xsd_config
using generated_sources and generated_headers. In Bazel, these souces
will be wrapped in a static library. Updated bp2build so that these are
written to implementation_whole_archive_deps instead.

Bug: 211678537
Test: bp2build test in sibling CL in system/tools/xsdc
Change-Id: Ib57c563a1eb7483bd7b04ba0d3852ecac17cde6c
2023-06-01 19:12:12 +00:00
Yi Kong
0713e336d9 Remove Full LTO support
We do not have any more projects directly depending on Full LTO (except
CFI which manages their own LTO flags), remove full LTO support from the
build system.

Test: presubmit
Bug: 169004486
Change-Id: I8d6b7999d716158b5d8fe34b2f197653d7bae8dd
2023-06-01 00:10:26 +00:00
Yabin Cui
2c336fe5b5 Suppress performance-avold-endl clang-tidy warning
This is a new warning introduced in clang-r498229.

Bug: 285005947
Test: build
Change-Id: Ia66c1f2555e2654614137e950832070e4e8dd54f
2023-05-31 19:27:52 +00:00
Spandan Das
02e8a0dba1 Merge "Deprecate api bp2build of ndk_library and ndk_headers" 2023-05-31 16:01:07 +00:00
Spandan Das
230c312f83 Deprecate api bp2build of ndk_library and ndk_headers
To support export of NDK APIs in multi-tree, we added functionality to
generate Bazel targets of ndk related Soong module types. Since this use
case does not exist anymore, deprecate this to prevent bitrot

The removed code includes
- `ConvertWithApi2Build` implementation of these libraries, which
  generates the Bazel targets in the synthetic `api_bp2build` workspace
- (api) bp2build unit tests for these module types

Test: go build ./cc
Bug: 284029211
Change-Id: Id3278fa119e0ab87f31f39a3783197a81b655e43
2023-05-31 03:44:51 +00:00
Yi Kong
a7a345d55e Remove Use_clang_lld in lto
We have moved all LTO projects to LLD, this is unused.

Test: presubmit
Change-Id: I385b3302c04243be8fde80605b29df7646ec40ce
2023-05-30 15:19:06 +09:00
Dan Shi
ec7314336a Support test runnner option in auto generated test configs
Bug: 284179405
Bug: 236980335
Test: unittest
Change-Id: Ifae3d556ff79153ca6c3067347fc259b665fb2e1
2023-05-26 21:34:22 +00:00
Treehugger Robot
cd4e6a609e Merge "Sandbox inputs to aidl rule in cc" 2023-05-23 23:40:35 +00:00
Vinh Tran
095819530a Sandbox inputs to aidl rule in cc
Bug: 279960133
Test: go test
Test: Remove hdrs prop from IDropBoxManagerService_aidl && run  BUILD_BROKEN_DISABLE_BAZEL=true m libservices && Expect an error from aidl
Change-Id: Ifdb260d8e2da9a5767f1e212393de4134b210616
2023-05-23 15:53:10 -04:00
Treehugger Robot
47514686b9 Merge changes from topic "parallel-singletons"
* changes:
  Parallelize singleton execution
  android: Allow running some singletons in parallel.
2023-05-22 16:40:16 +00:00
LaMont Jones
0c10e4dcc0 Parallelize singleton execution
Bug: 281536768
Test: manual, presubmits
Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
2023-05-19 20:31:32 +00:00
Trevor Radcliffe
197f4306d5 Merge "CFI Versionscript changes in bp2build" 2023-05-19 20:14:29 +00:00
Colin Cross
b3f28b2e04 Merge changes from topic "musl_arm64"
* changes:
  Disable sanitizers that use runtimes for linux_musl arm64
  Separate host and host cross fuzz packaging
2023-05-19 18:03:22 +00:00
Spandan Das
fcb86824be Merge "Export host available libraries to soong_injection" 2023-05-19 16:18:01 +00:00
Trevor Radcliffe
f06dd91420 CFI Versionscript changes in bp2build
Bug: 261733820
Test: Unit Tests
Change-Id: I0bf2f42944738c0fefb10e59e859d2af44402792
2023-05-19 14:51:41 +00:00
Aditya Kumar
e5dc6158d2 Merge "Enable LTO for riscv64" 2023-05-19 04:27:38 +00:00
Treehugger Robot
9e5c391c85 Merge "export WarningAllowedProjects to bazel" 2023-05-18 04:04:40 +00:00
Spandan Das
6550358a05 Export host available libraries to soong_injection
This information will be used to validate linkopts for host targets.

Test: m bp2build
Bug: 216626461
Change-Id: Ie7ac46268e6177cf0688ca0389bdaa92b67f9a58
2023-05-17 22:19:53 +00:00
Colin Cross
390fc746d0 Disable sanitizers that use runtimes for linux_musl arm64
We don't built clang sanitizer runtimes for host arm64 yet,
disable sanitizer that need them when building for linux_musl arm64.

Test: builds
Change-Id: Id4fcb7f9743ac30121157b2294eb60216eaff7b3
2023-05-17 21:59:32 +00:00
Colin Cross
64a4a5f5cd Separate host and host cross fuzz packaging
Prevent collisions between host and host cross fuzz packaging when
both are supported as fuzz targets by using a different value for
hostOrTargetString.

Test: builds with HOST_CROSS_OS := linux_musl
Change-Id: I0e82bab2987899cece94c89eb8398d1733ebbd15
2023-05-17 21:59:27 +00:00
Aditya Kumar
efc36678a9 Enable LTO for riscv64
This partially reverts commit 1281b99495.

Bug: b/282584808, b/254713216

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

Change-Id: I66c83b1116550179043490a11f66b8630c0e6b1b
2023-05-17 17:18:06 +00:00
Treehugger Robot
3daa129afa Merge changes from topic "adbd_host"
* changes:
  Allowlist python dependency of adb targets
  bp2build support for host_ldlibs
2023-05-17 05:23:21 +00:00
Pirama Arumuga Nainar
7e80f945d3 Merge "[cc] Remove deprecated clang flag for auto-var-init" 2023-05-17 04:17:04 +00:00
Spandan Das
fb04c41299 bp2build support for host_ldlibs
host_ldlibs are used during linking. Set these in `linkopts` for now.

Note that this CL does not do the `CheckBadHostLdLibs` validation of
Soong. There are some different ways to do this, and these are being
discussed in b/216626461. It is likely that we will need to create a new
property `host_ldlibs` to do the validation. But for now, re-use
`linkopts`.

Bug: 216626461
Test: bp2build unit tests
Change-Id: Id4c77e4460fb1fb003fa58ea27bab5b50ea8cefe
2023-05-16 22:44:37 +00:00
Vinh Tran
e684294fb2 Pass includes attrs to cc_aidl_library
https://source.android.com/docs/core/architecture/aidl/aidl-backends#custom-parcelables

Some aidl files have custom parcelables with references to cpp headers. Hence, we need to pass the include dirs from cc libs to cc_aidl_library so that custom cpp headers are findable by the generated cpp/h files.

Test: go test
Bug: 278704136
Change-Id: I4ede1d23fbc04bdbfb69823d955c6df6b0a7b4ee
2023-05-16 16:08:15 -04:00
Trevor Radcliffe
735013943a Merge "Change bp2build to reflect arm_isa refactor" 2023-05-16 19:41:08 +00:00
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