Commit graph

8239 commits

Author SHA1 Message Date
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
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
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