* Now header-abi-dumper does not complain about -fno-sanitize=implicit-integer-sign-change
Bug: 119558057
Test: make checkbuild
Change-Id: I80be08dd5aa184498bdbb83b42b877dbec152165
This reverts commit 4f0ce757aa.
Reason for revert: Breaks several targets in internal git_master, e.g. http://ab/5165971.
Test: Build failing library
Change-Id: I02a5ade05a76b24020586c55a4e8f441ca7708a9
* Add -fno-sanitize=implicit-integer-sign-change when
there is any integer related sanitizer, and this check
is not explicitly specified.
Android core does not boot with this new sanitizer yet.
* Filter out -fno-sanitize=implicit-integer-sign-change
from tooling flags.
Bug: 119329758
Bug: 119557795
Test: make checkbuild, boot, go/clang-r346389-testing
Change-Id: I709de569cb73d070fc4958e2b4387f4041bc5438
All instances of no-self-assign-overloaded warning have been fixed,
remove the suppression flag.
Test: m checkbuild
Change-Id: I70d9d6f721b36ebb5c3974893f79a09e4b1d1f4d
Bug: 111759196
Test: Test various targets in AOSP and internal branches.
For Googlers, go/clang-r344140-testing
Change-Id: I70fc5a2824de698d78c95ce2acd42eff9c5ebe15
Other branches might still have this warning for some build targets.
Bug: 112564944
Test: make checkbuild
Change-Id: I3db52b8a60bb28861fc9ba963a7d1cd1fe49e903
Support for safe ICF was added to LLD in LLVM r337429. This reduces
the size of sailfish system.img by 7.6MB.
The address-significance tables created by Clang to support LLD's
implementation of safe ICF are incompatible with ld -r. Therefore we
need to pass -fno-addrsig to the compiler to prevent it from creating
an address-significance table when building a cc_object.
Change-Id: I83e28741e6b3cdf09566447d2658ce48594f2074
This commit removes flags from ClangLibToolingUnknownCflags. These
flags were added to workaround an old version of clang in
`external/clang`. Since we have updated to clang-r339409b, we don't
need these workaround anymore.
Bug: 117764794
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py
Change-Id: Ifbeebf05df5c08ee3bb7d489f39250d8fd5f5acf
After we fix all existing such warnings, it can be changed to an error.
Bug: 112564944
Test: make checkbuild
Change-Id: I61ee3a24a3f992ef018cfe6c995e957416551183
This also changes over llvm-strip to use the -o flag, rather than
relying on nonstandard (and no longer functional) positional arguments.
Bug: http://b/111998531
Test: Multiple new builds. For googlers - http://go/clang-r339409-testing
Change-Id: I8c82d06304af24a001e6552e36e2f540d8e364ce
* C++ source files could be compiled with "-fwhole-program-vtables"
in cppflags. We need to filter out those flto dependent flags
in flags.CppFlags and use flags.toolingCppFlags instead of
flags.cppFlags.
Test: build with WITH_TIDY=1
Change-Id: Ic2b0f99b95a5f0422f879226e6f6060cab71456a
This reverts commit c729b508c3.
Reason for revert: New breakages fixed
Change-Id: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
Merged-In: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
Every time the toolchain adds a new warning, we had to suppress the
warning in every external projects that violates it, or disable it
globally -- which we end up doing most of the time since the first
option is way too time consuming.
Add a separate cflags option for external projects and move existing
-Wno-* flags there so that we can enforce better code quality for
internal projects.
TODO: Move more -Wno-* flags to ClangExtraExternalCflags
Test: m checkbuild
Change-Id: If3dee491616a1e7ba6223c2f522d100e10c5ee76
Bug: http://b/77532044
* b/77967848 - Disable -Wc++98-compat-extra-semi
Test: Test various targets in AOSP and internal branches. For Googlers,
go/clang-r328903-testing
Change-Id: If08dafb9ad993fb686dfd6eeb5e2d61a9c99bd0b
* USE_CLANG_LLD is unedefined in current builds.
* When USE_CLANG_LLD is defined to 'true' or '1',
use clang's lld instead of ld or ld.gold.
* When lld is enabled:
* ld-only flags are not passed to 'lld'.
* location_packer is disabled.
* Use new lld's --pack-dyn-relocs=android.
* When lld does not work:
* In Android.mk files use LOCAL_USE_CLANG_LLD := false.
* In Android.bp files use use_clang_lld: false.
* Only arm, arm64, x86, and x86_64_devices have LLD flags;
all other hosts and targets do not call lld yet.
Bug: 73768157
Test: make checkbuild and boot
Change-Id: I06b8a1e868a600997a7e70fe05c299d751d23d5f
* Suppress more noisy new warnings at global level.
* Add -no-pie to partial link .o files, with -r.
* Revert workaround of b/72706604, no need of
-Wl,-plugin-opt,-emulated-tls
* Filter out clang 7.0 unknown flag "-Wno-extended-offsetof"
Bug: 72706604
Bug: 72412006
Test: make checkbuild
Change-Id: I7ff45465c4bd771991f42b40f68dc35586045656
We can simply revert this patch to work on these warnings independently.
Bug: http://b/72331526
Bug: http://b/72331524
Bug: http://b/72330874
Test: Build
Change-Id: I9cec51578a1c6de33fb6f832c758b9916c61b735
This just copies most of what exists for clang on Linux, but doesn't
actually turn on clang support.
Bug: 69933068
Test: m nothing; compare ninja files
Change-Id: I2cf203026e7ced32004a91d7f3baf4a6415085eb
Bug: http://b/68236396
This warning only needs to be enabled for frameworks/base/core/jni.
Test: Build the topic
Change-Id: I9f6aab2045f135d691696f9fd461c895a5aadb38
LLVM r275480 does not recognize flto flags, suppress the option in clang
libTooling tools for now.
Bug: 62839002
Test: mma
Change-Id: Ia9d80b46320e551a93dbff780405d8ff8ad73f35
Add a list of flags which are not understood by clang LibTooling tools
and filter them out of the Cflags the tools are invoked with.
Test: In frameworks/av, make libmedia vendor_available (this invokes
header-abi-dumper on this module), mm -j64.
Bug: 62447349
Change-Id: I46f017212b89f4331145c999103d0ed44da0abaf
Add -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS to clang extra cppflags
to make libcxx always emit thread safety annotations. Note that this
won't generate additional warnings on projects that don't already use
-Wthread-safety.
Test: treehugger
Change-Id: I517a96571d77be119510c981bc2cbaddb41dee95
As of the latest clang python wrapper, clang is being executed with an
absolute path. That means that clang-provided headers are written with
absolute paths in the debug info, making the builds non-reproducible
(especially with ccache).
So keep our current PWD=/proc/self/pwd -fdebug-prefix-map=/proc/self/cwd=,
but add a new -fdebug-prefix-map=$PWD/= to rewrite these absolute paths.
Bug: 36463318
Test: m -j libc adb; grep for path names
Test: spot check objdump -W before/after, see only expected diffs.
Change-Id: Ic2cdfca051d3c38b753fd5c1fcbeaca8bafc29ae
This matters for C files that are also built for Windows. Previously they'd
be compiled with -std=gnu99 for the host but [effectively] -std=gnu89 for
Windows.
Bug: http://b/32019064
Test: builds, and can build libcrypto_utils without a manual -std= line
Change-Id: I9c5cc7832220b5c3d6a007ff10d076e26fd8c75d