Commit graph

1383 commits

Author SHA1 Message Date
Sam Delmerico
cfcd0a4960 Merge "make android.InList generic" into main 2023-07-19 15:02:56 +00:00
Sam Delmerico
1717b3bb7a make android.InList generic
Change-Id: Ic166216cb473371a5e34cd97a068ca35f5534740
2023-07-18 15:07:24 -04:00
Treehugger Robot
4cf52f17c5 Merge "Revert "Enable sext.w removal for riscv targets"" into main 2023-07-14 20:59:25 +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
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
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
Yabin Cui
294f839606 Update clang version to clang-r498229
Bug: 280683256
Test: presubmit
Change-Id: Idd0e171f11e0a7f44c64744744505ddeaca6f2fd
2023-06-22 17:29:55 +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
Elliott Hughes
1b2a65783d Merge "Bump the platform default up to C17." 2023-06-20 16:56:51 +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
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
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
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
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
fcb86824be Merge "Export host available libraries to soong_injection" 2023-05-19 16:18:01 +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
Pirama Arumuga Nainar
7e80f945d3 Merge "[cc] Remove deprecated clang flag for auto-var-init" 2023-05-17 04:17:04 +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
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
Yi Kong
1c22301735 Update clang version to clang-r487747c
Test: presubmit
Bug: 279955553
Change-Id: Ibe3b5e81f7850560b340c89a1f83d5ebdf4fc25f
2023-05-10 17:24:44 +09:00
Sam Delmerico
036afabcfb export WarningAllowedProjects to bazel
Bug: 187088227
Test: b test
Change-Id: I668f2c3e834fd03ad2b6d01f07f79ec84dea54eb
2023-05-04 16:43:36 -04:00
Sam Delmerico
162fb00eb3 Merge "Revert "Respect Clang version override env vars."" 2023-05-01 20:23:16 +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
Yi Kong
c57e3a8397 Update clang version to clang-r487747b
Test: presubmit
Change-Id: I98de36a9f301dee14c21d42e20901eb5aa157164
2023-04-26 15:11:43 +09: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
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
Trevor Radcliffe
a772d6588d Extract out Visibility flags
Bug: 261733820
Test: Unit tests
Change-Id: Ief4ca3b34de6df9a613e94fd31b447a7bb1f04f8
2023-04-11 13:41:17 +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
Prashanth Swaminathan
bce5507c02 Enable sext.w removal for riscv targets
Bug: 275574215
Test: Verified boot complete on aosp_cf_riscv64_phone target.
Change-Id: I771dbc492075eec18919b66dc74ae524e3f4b3cd
2023-03-30 20:06:50 +00:00
Treehugger Robot
4dd3659393 Merge "Enable Wincompatible-function-pointer-types globally" 2023-03-29 19:11:14 +00:00
Colin Cross
3f3320cb1c Merge changes I93da03b1,I5fb3ee29
* changes:
  Use static asan runtime for musl
  Simplify depending on static sanitizer runtimes
2023-03-29 17:04:14 +00:00
Alistair Delva
08a68a09a9 Merge "Revert "[RISC-V] rv64gc_zbb for Android"" 2023-03-29 16:24:19 +00:00
zijunzhao
2a08ccd0ba Enable Wincompatible-function-pointer-types globally
Bug: b/257101299
Test: make checkbuild
Change-Id: I7a5adc0c04e420e6782371b3efc3fbffd367b3a2
2023-03-29 00:31:49 +00:00
Alistair Delva
cc75089229 Revert "[RISC-V] rv64gc_zbb for Android"
This reverts commit 9838acffdd.

Reason for revert: b/274947458

Broke CI.
Will reland with QEMU options once the host image is fixed.

Change-Id: I6ad847cde2a291b3dd5b92314b2011744de50883
2023-03-28 20:59:36 +00:00
Trevor Radcliffe
6182d31c63 Merge "Supporting changes for CFI toolchain features" 2023-03-28 14:23:55 +00:00
Aditya Kumar
13ca1a9207 Merge "[RISC-V] rv64gc_zbb for Android" 2023-03-28 05:05:05 +00:00
Trevor Radcliffe
391a25d7fa Supporting changes for CFI toolchain features
Mostly exporting variables to Bazel, but also allowlisting a BUILD
file.

Bug: 251217226
Test: Unit tests
Change-Id: Id87015a3cd5d970700c4058ec989bb0c14c36bcb
2023-03-27 18:07:40 +00:00
Yi Kong
a137aa2e6e Merge "Revert^2 "Update clang version to clang-r487747"" 2023-03-24 13:19:52 +00:00
AdityaK
9838acffdd [RISC-V] rv64gc_zbb for Android
Change-Id: Ia6ee7899f8643e5a81a3a8125319bed11a0795da
2023-03-23 16:54:50 -07:00
Yi Kong
fd07ed2c14 Revert^2 "Update clang version to clang-r487747"
9ede280375

Bug: 264965700
Change-Id: I4154c70c050a825525d5b591fa757104eb78c158
2023-03-23 14:14:31 +00:00
Colin Cross
b781d23575 Use static asan runtime for musl
Use static asan runtimes for musl binaries to match glibc binaries.
The static asan runtime also requires libclang_rt.asan_cxx.a.  Unlike
most other runtimes the asan runtimes need to expose the symbols
from the runtime to allow intercepting calls to malloc, new etc.

Test: m USE_HOST_MUSL=true aidl_unittests && out/host/linux-x86/testcases/aidl_unittests/x86_64/aidl_unittests
Test: sanitize_test.go
Change-Id: I93da03b1c447fbb01f37262e7a465f165c2d5a18
2023-03-22 12:58:39 -07:00
Elliott Hughes
c214e1ab8a Merge "Allow SCS for riscv64 too." 2023-03-21 22:10:56 +00:00
Treehugger Robot
79727bd236 Merge "Enable Wunqualified-std-cast-call globally" 2023-03-15 01:41:58 +00:00
zijunzhao
96ec99a736 Enable Wunqualified-std-cast-call globally
Bug: b/239662094
Test: make checkbuild
Change-Id: Icd012c12ce13e04efa269c6898823c1178a02b74
2023-03-14 21:27:48 +00:00