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
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
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
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
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
Revert submission 2478283-master-I3cf18e7814ff52d526017e4fe34b17ab3d8f1080
Reason for revert: implementing a different way
Reverted changes: /q/submissionid:2478283-master-I3cf18e7814ff52d526017e4fe34b17ab3d8f1080
Change-Id: I1d690b6d322adc664e4c02d958f0183bbb78e669
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
Mostly exporting variables to Bazel, but also allowlisting a BUILD
file.
Bug: 251217226
Test: Unit tests
Change-Id: Id87015a3cd5d970700c4058ec989bb0c14c36bcb
Bazel fails to respect the environment variables $LLVM_PREBUILTS_VERSION
and $LLVM_RELEASE_VERSION, which are commonly used by LLVM developers
to build using a custom compiler. Fix it.
Bug: 272408039
Change-Id: I3cf18e7814ff52d526017e4fe34b17ab3d8f1080
We are not going to fix these warnings for 3p projects, there is no
point keeping a bug link here.
Test: N/A
Change-Id: I1c2479d8919b1c1b10287e021827b78c52813585
This is not the correct bug link. It should be removed when enabling
-Wxor-used-as-pow in external. See: aosp/2356123
Bug: None
Test: None
Change-Id: I6bc1d35e07ed11fc0c70a625b0035348a6428678
Bug: b/261642850
Test: Build and check warnings. Add two xfail tests in bionic and see the
results locally.
Change-Id: I61be649f935c05461bdd6c260627f3c72261a9e8
Bug: b/261642850
Test: Build and check warnings. Add two xfail tests in bionic and see the
results locally.
Change-Id: I68fca0084787c329b6c49ce4dff6fd132f820735
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
is deprecated in the next compiler. So add -Wno-unused-command-line-argument
to skip it.
Bug: 253033919
Bug: 259559364
Test: run test_compiler.py
Change-Id: I9133a36700afd3ef411092fd8133a7fe1c2c7343
https://reviews.llvm.org/D136789 removed this flag, it's been a no-op
since 15.0.0. The current Android compiler is 15.0.3, but upcoming
compilers will error on the fact that this flag doesn't exist any more.
Change-Id: I54666175b521ed5cdd76c53ed700ad4ddf6931da
Test: make
Bug: N/A
Allow single-bit-bitfield-constant-conversion warnings to pass
with r475365.
Bug: 253033919
Test: run test_compiler.py
Change-Id: Icc1f1c6c013418f1e5bb839ef70ebe8498b9cedc
We regressed binary size when we switch Darwin to use LLD, because
Darwin LD64 does ICF by default. Turn on ICF for host binaries to regain
the binary size savings (saves some space for Linux as well).
Test: presubmit
Bug: 236924555
Change-Id: I433062c3d263d69e431c1552faf1f18b13c5da42
* New flags cannot be added before llvm_android
has a new version.
Bug: 241941550
Bug: 241601211
Test: presubmit
Change-Id: Ibab8cfa9129eac824a3d5fb9c3124ba807ba4245
* Disable bugprone-unchecked-optional-access because it
crashed with some Android files.
* Allow misc-const-correctness and bugprone-assignment-in-if-condition
as warnings, not to stop build as errors.
Disable them in the global default check list.
* Allow/show clang deprecated* and array-parameter warnings for the NEXT version.
Bug: 241125373
Bug: 241819232
Bug: 241941550
Bug: 241601211
Bug: 241997913
Test: presubmit
Change-Id: Ifdc7a63c4e349b1ace4880bd002d14dc41054dcf
Some code compiles with -Werror, which makes it very hard to mark
anything as deprecated without breaking the build. This option
will ensure that we can still mark things as deprecated without
breaking such code. Among other things, this will allow us to
undo a local change to protobuf which disables deprecation
warnings.
Bug: 203713560
Test: presubmit
Change-Id: I718de31c3ff685dba4104f3c9e7bd5d169d89f7e
Some build targets pulls cflags from build/soong but has its own choice
of compiler version. This causes errors for due to unknown warning
options. This allows them to suppress such checks.
Test: presubmit
Change-Id: Ia89508d6b92481fb1ed0c90f1fdb4d8e54566349
The staging compiler update sometimes needs additional cflags to build, but those flags may not be recognised by the current compiler. Add a
new `llvmNextExtraCommonGlobalCflags` section and only append those
flags when LLVM_NEXT is set.
Test: LLVM_NEXT=true m
Bug: 236798112
Change-Id: Icc4687950acd44798b2cf09131a425ddfd919214
This reverts commit fbc5effdfd.
Bug: http://b/197965342
Bug: http://b/230930120
Test: m and also test internal targets
Change-Id: I49b2d80ef4191ebb08bb6e80507042ee628c7f09
Merged-In: I49b2d80ef4191ebb08bb6e80507042ee628c7f09
This respin contains performance improvements to clang-tidy and lld, and
fp16 cost fixes.
Test: presubmit
Bug: 219872481
Change-Id: I322a680cdc6ebc0f1fe3735ed087477e7f2508fe
Most of the variable export code for cc modules can be re-used for
exporting variables for java modules. Refactor this code into a more
composable structure for reuse.
Test: build/bazel/bp2build.sh
Test: manual comparison of
out/soong/soong_injection/cc_toolchain/constants.bzl
with previous output
Change-Id: Ie5a6fee08cc888b7dc69c3e324e5c3f8aa269a8f