Commit graph

8275 commits

Author SHA1 Message Date
Florian Mayer
2d8b555f2e Merge "Reland "[hwasan] remove workaround for fixed toolchain issue"" into main 2023-07-31 20:46:55 +00:00
Treehugger Robot
7b4449ae94 Merge "Revert "Enable CFI for riscv64"" into main 2023-07-31 18:54:11 +00:00
Ivan Lozano
17ac9fa93e Merge "Revert "rust: Add SCS sanitizer option for AArch64"" into main 2023-07-31 18:13:40 +00:00
Treehugger Robot
82c298c240 Merge "Convert coverage libs as alwayslink" into main 2023-07-31 18:13:07 +00:00
Ivan Lozano
22823eed4b Revert "rust: Add SCS sanitizer option for AArch64"
This reverts commit 8827113577.

Reason for revert: hwasan builds breaking

Change-Id: I28094e27d5935c6f371fddddf4b6b0334de9b12c
2023-07-31 18:01:26 +00:00
Treehugger Robot
dc3606a81d Merge "Gen a header library when genrules export includes" into main 2023-07-31 17:48:44 +00:00
Ivan Lozano
0e403456b0 Merge "rust: Add SCS sanitizer option for AArch64" into main 2023-07-31 17:27:01 +00:00
Prashanth Swaminathan
49dcf79550 Revert "Enable CFI for riscv64"
This reverts commit 73fe13c9b1.

Reason for revert: b/293884796, crash on boot of riscv64 aosp phone.

Change-Id: Ie90e0e99ddaa7bb5d496e2b1d0ab0302702cb2bc
2023-07-31 16:15:57 +00:00
Florian Mayer
f50eda3b9b Reland "[hwasan] remove workaround for fixed toolchain issue"
This reverts commit e72ee14006.

Bug: 293532332
Reason for revert: Test failure fixed in https://r.android.com/2681595

Change-Id: Id40079133e50492a6e2f3e2794012695562c39f6
2023-07-28 21:22:34 +00:00
Christopher Ferris
6ff7d9e532 Merge "Allow ramdisk targets to set cflags/exclude_srcs." into main 2023-07-28 19:02:48 +00:00
Ivan Lozano
8827113577 rust: Add SCS sanitizer option for AArch64
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: Ie54ac4693286878b98704cf052649a267777d764
2023-07-28 14:34:28 -04:00
Florian Mayer
a09c4bf8cb Merge "Revert "[hwasan] remove workaround for fixed toolchain issue"" into main 2023-07-28 18:28:22 +00:00
Mark White
e72ee14006 Revert "[hwasan] remove workaround for fixed toolchain issue"
This reverts commit 07ca220182.

Reason for revert: b/293532332 - bionic unit tests failing

Change-Id: I11412df55d7131ff0bb36dee7258b75a12024100
2023-07-28 13:54:57 +00:00
Aditya Kumar
5c2b3e2ea6 Merge "Enable CFI for riscv64" into main 2023-07-28 00:22:36 +00:00
Christopher Ferris
e0202c4823 Allow ramdisk targets to set cflags/exclude_srcs.
Test: Build a ramdisk target with cflags and exclude_srcs set.
Change-Id: I44b8b379441aeda215f0831bbbadea575ea4c68f
2023-07-27 17:06:46 -07:00
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
AdityaK
73fe13c9b1 Enable CFI for riscv64
This patch reverts the last remaining piece of commit 1281b99495 as LTO has been enabled in I66c83b1116550179043490a11f66b8630c0e6b1b

Testing:
```
$ source build/envsetup.sh
$ lunch aosp_cf_riscv64_minidroid-userdebug
$ m
$ launch_cvd --num_instances=8 --daemon
$ adb devices
List of devices attached
0.0.0.0:6520    device
0.0.0.0:6521    device
0.0.0.0:6522    device
0.0.0.0:6523    device
0.0.0.0:6524    device
0.0.0.0:6525    device
0.0.0.0:6526    device
0.0.0.0:6527    device
```

Bug: b/282584808, b/254713216


Change-Id: I6fe5b1001c2c64e2a4a55176f4017bb445570176
2023-07-27 18:49:18 +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
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