Commit graph

8257 commits

Author SHA1 Message Date
Treehugger Robot
6677600f35 Merge "Emit gtest in BUILD files only if Android.bp sets it" into main 2023-07-27 23:52:46 +00:00
Treehugger Robot
268fad160a Merge "Do not enable AFDO if the option is off, even if there is a profile file" into main 2023-07-27 20:33:41 +00:00
Treehugger Robot
ad18b1467f Merge "[hwasan] remove workaround for fixed toolchain issue" into main 2023-07-27 20:14:35 +00:00
Steven Moreland
c8a5d7c7df Merge "Linker: no demangle." into main 2023-07-27 18:19:09 +00:00
Treehugger Robot
db195fd4cb Merge changes from topic "reland-hack-rv64-libc++" into main
* changes:
  Revert "Revert "Set VIC as minimum SDK version for riscv64""
  Revert "Revert "Use prebuilt NDK libc++ for rv64.""
2023-07-27 18:17:35 +00:00
Ivan Lozano
7e377d045e Merge "Revert "rust: Add SCS sanitizer option."" into main 2023-07-27 15:08:50 +00:00
Ivan Lozano
f9780422b3 Revert "rust: Add SCS sanitizer option."
This reverts commit 447f5b1ea9.

Reason for revert: b/293445283

Change-Id: Iadc6c7ed196be2a65329f86423730ba7f851002c
2023-07-27 14:52:20 +00:00
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
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
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