Commit graph

1487 commits

Author SHA1 Message Date
Elliott Hughes
c79d9e3053 Bump the default from gnu++17 to gnu++20.
We should update gnu++2a to gnu++2b too, but not in this CL.

Bug: 311052584
Test: treehugger
Test: m checkbuild
Change-Id: I3637444d74868b3a29b425fd749ecbbe1a45fbf7
2023-11-15 11:46:03 -08:00
Juan Yescas
a74b22e8e6 16k: soong: Add the C flag -D__BIONIC_NO_PAGE_SIZE_MACRO flag to x86-64
To simulate 16k page size in x86-64 cuttefish, it is necessary
to compile the shared libraries and binaries with max-page-size greater
than 4096.

Bug: 309816695
Test: source build/envsetup.sh
      lunch aosp_cf_x86_64_phone_pgagnostic-trunk-userdebug
      m
Change-Id: I32670ef2c25fdcefec11bd07ba41cd0ea96c92bd
2023-11-09 16:58:29 -08:00
Juan Yescas
3db51d2500 16k: soong: Add linker flag -Wl,-z,max-page-size for x86-84 to align binaries and .so
To simulate 16k page size in x86-64 cuttefish, it is necessary
to compile the shared libraries and binaries with max-page-size greater
than 4096.

Bug: 309816695
Test: source build/envsetup.sh
      lunch aosp_cf_x86_64_phone_pgagnostic-trunk-userdebug
      m
      readelf -l out/target/product/vsoc_x86_64_only/system/bin/toybox
Change-Id: I38e4449a7826a2eca0c1a1cccc916af21f0b3a93
2023-11-09 13:29:22 -08:00
Dan Willemsen
f051ec6de2 Merge "Update the minimum macos deployment version to 10.14" into main 2023-11-08 18:46:51 +00:00
Dan Willemsen
876b12ffdd Update the minimum macos deployment version to 10.14
Bug: 191879468
Test: Build aosp-build-tools on Mac
Change-Id: I21c3d0482ba9a23b2b54849eccb18c7958559d93
2023-11-08 02:11:27 +00:00
Yi Kong
0fa503da2e Only enable MLGO for ARM64 ThinLTO targets
The MLGO model we embed in the Android Clang is trained on ARM64
ThinLTO artefacts. Applying the model across architectures does not
necessarily translate to performance improvement. Therefore only enable
the optimisation on ARM64 ThinLTO for now.

Test: presubmit
Bug: 293827654
Change-Id: Ie64a65c11191cf700a463637a0746c8470d3aa3c
2023-11-07 14:12:51 +09:00
Aditya Kumar
e19a173a48 Merge "Discard IllegalFlags when testing a new compiler" into main 2023-10-29 00:50:33 +00:00
AdityaK
e7b606717a Discard IllegalFlags when testing a new compiler
Also add -Wno-everything as suggested by Pirama

Bug: b/308179696

Follow up: https://b.corp.google.com/issues/308179380

Change-Id: Iaa73f2b52363562b2391346d8b2e5dc73bab4f2d
2023-10-27 18:54:58 +00:00
Krzysztof Kosiński
14e25a504c Merge "Revert "Revert "Enable -Werror=incompatible-function-pointer-types""" into main 2023-10-26 21:46:35 +00:00
Krzysztof Kosiński
83199b5e4d Revert "Revert "Enable -Werror=incompatible-function-pointer-types""
This reverts commit 5e75975e04.

Reason for revert: breakages fixed

Change-Id: Id54499eabaca649bee5ea6452a3a4134d8773e2d
2023-10-26 07:16:29 +00:00
Treehugger Robot
c70be4b986 Merge "Globally disable -Wreorder-init-list." into main 2023-10-22 09:49:55 +00:00
Krzysztof Kosiński
8f8cc1668e Globally disable -Wreorder-init-list.
This warning is triggered even when initializers don't have any
side effects, so it very rarely surfaces actual bugs/mistakes.
99% of the time it complains about a purely cosmetic issue.
Disable it by default in commonGlobalCFlags, which still allows
individual modules to opt into it.

Bug: 145210666
Test: presubmit
Change-Id: I671b5c457ee3d92b9cc37f020ba54e01e1a04f59
2023-10-22 05:09:40 +00:00
Eric Rahm
1952471c56 Reapply "Use zstd to compress debug info in cc libraries"
This reverts commit d0500f10ef.

Test: m
Bug: 305277519
Change-Id: I126395d32cfc0048b6403c831613d9b4a178af4d
2023-10-20 16:01:14 +00:00
Eric Rahm
5571ab8599 Reapply "Compress debug info in clang builds with zstd"
This reverts commit 6d089b7de0.

Test: m
Bug: 305277519
Change-Id: Iaa27fa0aae8ef624b403e905bfb04df15e380baf
2023-10-20 16:01:14 +00:00
Matías Hernández
6d089b7de0 Revert "Compress debug info in clang builds with zstd"
Revert submission 2788316

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=panther-next-userdebug&lkgb=10981485&lkbb=10981536&fkbb=10981536, bug b/306625613

Reverted changes: /q/submissionid:2788316

Change-Id: I7a49b82d26454fe34f8200622a38cdabc0f446cf
BUG: 306625613
2023-10-20 13:07:14 +00:00
Matías Hernández
d0500f10ef Revert "Use zstd to compress debug info in cc libraries"
Revert submission 2788316

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=panther-next-userdebug&lkgb=10981485&lkbb=10981536&fkbb=10981536, bug b/306625613

Reverted changes: /q/submissionid:2788316

Change-Id: Ice939d57214879416da06d7134c6a8b56eaf00e6
BUG: 306625613
2023-10-20 13:07:14 +00:00
Eric Rahm
f52906f194 Use zstd to compress debug info in cc libraries
We can save a significant amount of disk space by compressing
debug info in `lld` cc builds. This change configures a build
flag to instruct lld to compress debug info when building cc
libraries. Rather than adding a global config we add this to
each target individually to avoid linker failures on windows
cross build targets.

Test: m
Bug: 305277519

Change-Id: I4ab3d47fb0de7e31a39fb671cccde1acee3a2018
2023-10-19 22:47:44 +00:00
Eric Rahm
fa0dff576b Compress debug info in clang builds with zstd
We can save a significant amount of disk space by compressing
debug info in `clang` builds. This change configures a build
flag to instruct clang to compress debug info.

Test: m
Bug: 305277519
Change-Id: Ieeaa655452d847e83ebc6bec0864e47c46f4c6fb
2023-10-19 22:24:58 +00:00
Aditya Kumar
b36eaa663b Revert "Enable hot cold split"
This reverts commit 4e28d0eda2.

Reason for revert: Reverting now that we should have sufficient data from Crystalball https://b.corp.google.com/issues/306023954

Change-Id: I9f92c203eda309956ec192432ba0063eb11f59e2
2023-10-17 21:31:45 +00:00
AdityaK
4e28d0eda2 Enable hot cold split
Change-Id: I6752ee000bc72c488ab197f6671514c9e5faa2bd
2023-10-13 15:35:26 +00:00
Krzysztof Kosiński
69101d699c Merge "Revert "Enable -Werror=incompatible-function-pointer-types"" into main 2023-10-11 23:16:07 +00:00
Ramya Subramanian
5e75975e04 Revert "Enable -Werror=incompatible-function-pointer-types"
This reverts commit 07c362bf7f.

Reason for revert: DroidMonitor: Potential culprit for Bug 304839693 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.”.

Change-Id: Iafb894510c48af2dd8b015d7264a031ff9348884
2023-10-11 23:00:33 +00:00
Krzysztof Kosiński
7158f66753 Merge "Enable -Werror=incompatible-function-pointer-types" into main 2023-10-11 19:01:42 +00:00
Krzysztof Kosiński
07c362bf7f Enable -Werror=incompatible-function-pointer-types
Bug: 296321145
Test: presubmit
Change-Id: I9c056285263061e17e53c4924dcd32bf5310ed91
2023-10-06 20:06:47 +00:00
Elliott Hughes
4b350985eb riscv64: assume fast unaligned access.
We have a CTS test for this, so we may as well let the compiler take
advantage!

Test: treehugger
Change-Id: Icb6dc73be5e6da1155f39ca03245ae6b9d24dfb5
2023-10-04 14:50:03 -07:00
Treehugger Robot
2eff89a8ce Merge "Remove -Wsign-promo." into main 2023-10-02 23:14:26 +00:00
Krzysztof Kosiński
29c60f34fb Remove -Wsign-promo.
This flag has no effect in Clang:
https://clang.llvm.org/docs/DiagnosticsReference.html#wsign-promo

Bug: 296606895
Test: presubmit
Change-Id: I59c1e6b6cf541529b9f4741accdf26822572426f
2023-09-30 06:15:22 +00:00
Krzysztof Kosiński
1a4572ec9c More documentation for C++ global config.
Bug: 296606895
Test: presubmit
Change-Id: I19a4fa327bf1eac192067caf6d064a740124caf6
2023-09-30 05:49:09 +00:00
Elliott Hughes
726b001ae1 Revert "Revert "riscv64: enable V.""
This reverts commit 2583523144.

Change-Id: I5b05d546e17dee497dce1bfeb9290445e1c071c2
2023-09-15 16:36:59 +00:00
Aditya Kumar
928c0c436d Merge "Revert "riscv64: enable V."" into main 2023-09-14 16:53:59 +00:00
Jeremy DeHaan
2583523144 Revert "riscv64: enable V."
This reverts commit aa204ec49c.

Reason for revert: b/300158981

Change-Id: I4e969c7fccade0f8e1b29cb6267c27355ddca866
2023-09-14 00:46:21 +00:00
zijunzhao
5bcebba331 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: Ieb4c1e1bfff05fd0db894e8eab263fb31b376da9
2023-09-13 05:09:11 +00:00
Elliott Hughes
5c12fb922d Merge "riscv64: enable V." into main 2023-09-12 17:57:50 +00:00
Treehugger Robot
ca22dfb5d1 Merge "Enable -Wmultichar." into main 2023-09-05 21:17:21 +00:00
Treehugger Robot
ec6f10f648 Merge "Update OWNERS file for actual Android LLVM members." into main 2023-09-05 17:14:07 +00:00
Yi Kong
798f5d2e7e Merge "Enable MLGO for register allocation" into main 2023-09-03 05:38:34 +00:00
Yi Kong
67a2dee8c5 Enable MLGO for register allocation
This enables Machine Learning Guided Optimizations (MLGO) for register
allocation. App launch performance on oriole-userdebug is improved by
0.53%, and binary size is very slightly reduced (e.g. 64 bytes for
libart.so).

https://dashboards.corp.google.com/_0e1b06dd_a79e_4433_b625_b62e5cac004b?p=BootImageProfileId:36265

Test: presubmit
Bug: 229056536
Change-Id: I0e5d40bb90a1555a1343f114ebffffca281f20b2
2023-09-03 05:38:14 +00:00
Krzysztof Kosiński
769f5030d4 Enable -Wmultichar.
-Wmultichar is enabled by default, so we don't need to explicitly
enable it.

Bug: 298703966
Test: presubmit
Change-Id: Iae820145e6412365024a97ab3a34d760563785fa
2023-09-02 03:33:00 +00:00
Stephen Hines
796fcd4174 Update OWNERS file for actual Android LLVM members.
Test: N/A
Change-Id: Ifd24b1a6161ef6bf4e85ab3d1113106f456f1fa4
2023-09-01 14:48:34 -07:00
Treehugger Robot
08e1792144 Merge "Enable -Wsizeof-array-div for 3P code." into main 2023-09-01 17:35:53 +00:00
Krzysztof Kosiński
24686c5e22 Enable -Wsizeof-array-div for 3P code.
This warning usually indicates an incorrect size being computed,
which can cause severe bugs.

Bug: 296422292
Test: presubmit
Change-Id: I381dea70a6a408883ec772ccc006746ad66b835f
2023-08-31 01:29:59 +00:00
Yi Kong
ed7c73edfe Update clang version to clang-r498229b
Now built with MLGO. This reduces the total Clang invocation time for
building AOSP by 0.7%.

    TOOLCHAIN_RUSAGE_OUTPUT=/tmp/rusage.txt m -j32
    PGO + LTO + BOLT          83839.78s
    MLGO + PGO + LTO + BOLT   82949.30s

Test: presubmit
Bug: 293616148
Change-Id: I5364c341520172e8e1acafb4aa3330922805ac0e
2023-08-25 15:21:52 +09:00
Krzysztof Kosiński
4353fab901 Enable -Wgnu-designator
Bug: 296606895
Test: presubmit
Change-Id: I2ef67807fef8376ea08f65f60439b7c3b6f73e83
2023-08-21 23:55:44 +00:00
Krzysztof Kosiński
982c588c35 Document why certain warnings are disabled.
Bug: 296606895
Test: presubmit
Change-Id: I0227eb216ddc59cfe2c3b785376cfb8f9ccab441
2023-08-21 17:50:07 +00:00
Treehugger Robot
9ae68ccb2e Merge "Re-enable -Wreserved-id-macro." into main 2023-08-21 08:26:36 +00:00
Krzysztof Kosiński
78425e510d Allow enabling -Wreorder-init-list from Android.bp.
I want to make this warning an error in my project and the
current setup is preventing me from doing so.

This has to be -Wno-error=reorder-init-list and not
-Wno-reorder-init-list because the later is overridden by some
modules explicitly enabling warning sets. -Wno-* flags are
overridden by -W* flags coming later in the command line,
but -Wno-error=* flags are only overridden by later -Werror=
flags.

Bug: 145210666
Test: presubmit
Change-Id: Ia08f8a20da37cdc57167324b0cd19413d8786990
2023-08-18 21:39:25 +00:00
Krzysztof Kosiński
0c91d64b0b Re-enable -Wreserved-id-macro.
Bug: 296606895
Test: presubmit
Change-Id: Idba7b92f636796b9631db6f100a7d2e31ebb05fe
2023-08-18 21:19:43 +00:00
Juan Yescas
23cc4aa7aa soong: ARM 32-bit targets must be built with 4k elf alignment
- ARM 32-bit targets will be built with 4096 ELF alignment.
- ARM 32-bit targets will only support 4K Page sizes.
- ARM 32-bit targets won't be page agnostic.

Test: source build/envsetup.sh
      lunch aosp_cf_x86_64_phone
      m
Bug: 295550555
Change-Id: I61cc45fa5f2ea18c494dfc9a0ca44cf9b694dfa3
2023-08-11 12:00:40 -07: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
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
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
Elliott Hughes
aa204ec49c riscv64: enable V.
Test: treehugger
Change-Id: I5bbbb22074632366c7ffa38bc437d80da692685b
2023-07-27 15:17:34 -07:00
Steven Moreland
c8a5d7c7df Merge "Linker: no demangle." into main 2023-07-27 18:19:09 +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
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