We should update gnu++2a to gnu++2b too, but not in this CL.
Bug: 311052584
Test: treehugger
Test: m checkbuild
Change-Id: I3637444d74868b3a29b425fd749ecbbe1a45fbf7
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
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
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
Also add -Wno-everything as suggested by Pirama
Bug: b/308179696
Follow up: https://b.corp.google.com/issues/308179380
Change-Id: Iaa73f2b52363562b2391346d8b2e5dc73bab4f2d
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
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
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
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
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
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
-Wmultichar is enabled by default, so we don't need to explicitly
enable it.
Bug: 298703966
Test: presubmit
Change-Id: Iae820145e6412365024a97ab3a34d760563785fa
This warning usually indicates an incorrect size being computed,
which can cause severe bugs.
Bug: 296422292
Test: presubmit
Change-Id: I381dea70a6a408883ec772ccc006746ad66b835f
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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
This information will be used to validate linkopts for host targets.
Test: m bp2build
Bug: 216626461
Change-Id: Ie7ac46268e6177cf0688ca0389bdaa92b67f9a58
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
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
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
Revert submission 2478283-master-I3cf18e7814ff52d526017e4fe34b17ab3d8f1080
Reason for revert: implementing a different way
Reverted changes: /q/submissionid:2478283-master-I3cf18e7814ff52d526017e4fe34b17ab3d8f1080
Change-Id: I1d690b6d322adc664e4c02d958f0183bbb78e669
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
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
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
Mostly exporting variables to Bazel, but also allowlisting a BUILD
file.
Bug: 251217226
Test: Unit tests
Change-Id: Id87015a3cd5d970700c4058ec989bb0c14c36bcb