Commit graph

8301 commits

Author SHA1 Message Date
Zijun Zhao
88df1d3e0b Merge "Handle Clang's change of defaults from -fcommon to -fno-common" into main 2023-08-11 15:29:43 +00:00
Juan Yescas
0106560e34 soong: Add product variable DevicePageSizeAgnostic
The product variable DevicePageSizeAgnostic will determine
whether AOSP is kernel page size agnostic or not.

Test: source build/envsetup.sh
      lunch aosp_cf_arm64_phone_pgagnostic
      m
      cat out/soong/build.aosp_cf_arm64_phone_pgagnostic.ninja | grep __BIONIC_NO_PAGE_SIZE_MACRO
Bug: 289419664
Change-Id: I33a1a4f1967d7e78432b7b8d90357d16b2002dcc
2023-08-09 16:46:07 -07:00
zijunzhao
a4a4d29509 Handle Clang's change of defaults from -fcommon to -fno-common
Remove fcommon and make fno-common by default.

Bug: b/151457797
Test: make checkbuild
Change-Id: I38a858b1d41d6567bdd0fbc91b307b0270ab51b1
2023-08-09 04:54:37 +00:00
Kevin Jeon
51732356b8 Merge "Revert "Add libdumpstateutil to vendor variant list"" into main 2023-08-07 14:38:17 +00:00
Sharjeel Khan
bf4db77c03 Merge "Created an Orderfile go file for the build system. In addition, I added a test file to check if flags are added and propagated correctly." into main 2023-08-03 23:16:34 +00:00
Spandan Das
59b8a6687d Merge "cc Bp2build support for genrules that generate .proto file" into main 2023-08-03 21:51:11 +00:00
Trevor Radcliffe
24e0b13b9c Merge "Export no sanitize link runtime flag" into main 2023-08-03 20:54:39 +00:00
Trevor Radcliffe
0555acc1f7 Merge "Export Minimal Runtime Flags" into main 2023-08-03 20:39:22 +00:00
Spandan Das
a99348dca4 cc Bp2build support for genrules that generate .proto file
If `srcs` contains a gensrcs/genrule module, the current bp2build module
will put it in the catch-all `srcs` attribute. This is reserved for .cpp
sources, so if the genrule produces a .proto/.aidl/... file, this will
fail.

This handles genrules that produce .proto files. To implement this, this
creates an additional partition that detects if the other module is a
genrule/gensrc that produces .proto files. If true, it will append it to
the proto partition.

This CL does not handle
- genrule that produce .c/.aidl/.yacc/.... files. They will continue to
  be partitioned into the catch-all partition
- java modules

Test: unit tests
Test: TH
Bug: 293205700
Change-Id: Ib720fdf3a053ff5dd256e6faa632e3fa7776966d
2023-08-03 18:56:05 +00:00
Kevin Jeon
05518b64b4 Revert "Add libdumpstateutil to vendor variant list"
Revert submission 2681060-dumpstate-isstrictrun

Reason for revert: This change has been successfully cherry-picked to udc-d1-dev, and can now be reverted in AOSP so that libdumpstateutil doesn't need a vendor variant.

Reverted changes: /q/submissionid:2681060-dumpstate-isstrictrun

Change-Id: Ia337b557c71c5a64d350f45199929440474fa278
2023-08-03 13:56:54 +00:00
Treehugger Robot
3ff50d5854 Merge "Limit LTO inlining even when profile is present" into main 2023-08-02 22:27:04 +00:00
Trevor Radcliffe
da64d91d2e Export no sanitize link runtime flag
Bug: 294219797
Test: Unit tests
Change-Id: Id4bbf78e9ba3893fb857b85e6b7261b11404ebf0
2023-08-02 20:24:29 +00:00
Trevor Radcliffe
3876c5a143 Export Minimal Runtime Flags
Bug: 294219797
Test: Unit Tests
Change-Id: Ia6a617378ccecb01bda4951d223b6c99d6c75060
2023-08-02 15:41:50 +00:00
Matthias Männich
a5e9abe75f Merge "NDK library: remove remnants of abidw usage" into main 2023-08-02 15:18:02 +00:00
Treehugger Robot
eec4bb4ecd Merge changes Ideaa9908,Ie45cb7da into main
* changes:
  NDK library: extract ABI representations with STG
  NDK library: switch abi diffing to STG
2023-08-02 11:24:39 +00:00
Treehugger Robot
c9893274e0 Merge "NDK library: switch to stg ABI format" into main 2023-08-02 11:23:05 +00:00
Yi Kong
d6ab48c660 Limit LTO inlining even when profile is present
Reduce the import instr limit from the LLVM default (100) to 40. This
helps reduce the binary size as well as improving performance slightly.

Size:
             Default(100)   40        30
libhwui.so   11059040       11058912  11060872
libart.so    10697576       10697160  10696568

Performance:
40 vs. default:  0.37% improvement
                 http://go/art-benchmark?p=BootImageProfileId:36054
30 vs. default:  0.36% improvement
                 http://go/art-benchmark?p=BootImageProfileId:36058

Test: presubmit
Change-Id: Id800ff7818cde908daab784bac0a312c6a71272d
2023-08-01 18:30:13 +00:00
Kevin Jeon
4b4d61fa2e Merge "Add libdumpstateutil to vendor variant list" into main 2023-08-01 18:25:33 +00:00
Matthias Maennich
e914f2d5c3 NDK library: remove remnants of abidw usage
Now migration to STG is complete, hence remove the legacy extraction
mechanisms.

Bug: 156513478
Change-Id: I55b7626e2bfa78c9bb5157ade73d71a97597da72
Signed-off-by: Matthias Maennich <maennich@google.com>
2023-08-01 17:22:47 +00:00
Matthias Maennich
55486f8674 NDK library: extract ABI representations with STG
Replace the abidw->stg pipeline by just stg for extraction directly from
ELF/DWARF. This is to migrate to STG entirely.

As a migration tooling, keep the existing method active via
`legacy_use_abidw` as a flag on ndk_library.

Bug: 156513478
Change-Id: Ideaa9908b31591f49f9a167cfa3f3d5c95d8b198
Signed-off-by: Matthias Maennich <maennich@google.com>
2023-08-01 17:22:47 +00:00
Matthias Maennich
ca8ae6564f NDK library: switch to stg ABI format
STG's native .stg format has been designed with version control in mind
as is the best format to represent STG's internal data representation.

Hence, migrate the ABI representation dump to .stg. That is done by
converting `abidw` extracted xml to stg at build time. STG has builtin
`abitidy` functionality, so `stg` can replace the prior `abitidy` step
to generate the final format.

Bug: 156513478
Change-Id: Ifcac8998ab899637a5d8c54f9e72d79d3e28ec52
Signed-off-by: Matthias Maennich <maennich@google.com>
2023-08-01 17:22:47 +00:00
Matthias Maennich
658bb4dad9 NDK library: switch abi diffing to STG
Bug: 156513478
Change-Id: Ie45cb7daffb9861ed5bc26792f184bffcbe90bdb
Signed-off-by: Matthias Maennich <maennich@google.com>
2023-08-01 17:22:47 +00:00
Sharjeel Khan
c6a93d853b Created an Orderfile go file for the build system.
In addition, I added a test file to check if flags are added and propagated correctly.

Test: mma build/soong
Output: #### build completed successfully (07:24 (mm:ss)) ####

For testing with an actual binary or shared library, steps are in this
README:
https://android.googlesource.com/toolchain/pgo-profiles/+/refs/heads/main/orderfiles/README.md

Change-Id: Idcf169156ef691bcacb8adc92828ef09450085f8
2023-08-01 16:58:58 +00:00
Prashanth Swaminathan
1e079dfdf2 Merge "Convert preview sdkVersion to int for target-api" into main 2023-08-01 01:40:16 +00:00
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
Kevin Jeon
501be146db Add libdumpstateutil to vendor variant list
This change adds libdumpstateutil to VndkMustUseVendorVariantList. This
is done to avoid a VNDK re-spin on aosp/2679475 and aosp/2681060, which
add the dumpstate util function IsStrictRun and make it framework-only.

Test: Presubmit; verify that builds still work on internal (refer to
      aosp/2681060 test).
Bug: 283326935
Change-Id: I3c60dd919a65182937d6e0b233635ff6ca9414d3
2023-07-31 13:08:37 -04: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
Prashanth Swaminathan
30f7c79949 Convert preview sdkVersion to int for target-api
If the target SDK of the module is a preview, the current logic passes
it through to llvm-rs-cc, which expects an int. Convert codenames to
their API level first, then extract the final or preview int.

Also simplify the logic to look for 'current' more generically via the
common ApiLevel library functions.

Test: Verified local build of riscv64, confirmed RS attempts to build
with API level 9000+ instead of 'VanillaIceCream'.

Change-Id: I1fa7577181bfd16de0ea4e77f7ab8fbd8fdb55e5
2023-07-29 11:44:33 -07: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