Commit graph

698 commits

Author SHA1 Message Date
Nick Desaulniers
4f49e35902 soong: upgrade Android platform to clang-r370808
-Wc99-designators warns for the use of nested and array initializers in
C++20 code. Many internal projects have pushed back against this
warning.

Disables:
- -Wimplicit-int-float-conversion
- -Wpointer-compare
- -Wxor-used-as-pow
- -Wfinal-dtor-non-final-class
- -Wreorder-init-list

For projects under external/, vendor/, etc, but only if they use
Android.bp (not Android.mk) and -Wreorder-init-list may be re-enabled by
-Wall if set locally.

-Wno-incomplete-setjmp-declaration is needed for NDK stubs that get
generated (functions without full definitions of their parameters).

Sets
- -Wno-error=implicit-int-float-conversion
- -Wno-error=reorder-init-list
for all projects in order to unblock landing the compiler upgrade due to
internal projects not being able to disable or fix these before the
upgrade.

Bug: 139945549
Test: build (aosp_crosshatch, crosshatch, aosp_x86_64-eng,
  walleye), boot internal devices, bionic + RS atests, kernel builds.
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Change-Id: I18e3c0eb657fd59824526f36c6dd57bdcf0526ba
2019-11-26 10:09:15 -08:00
Yi Kong
950e0baf2a Expand ClangExtraExternalCflags to non-Google vendor projects
Some of the warnings are too common to fix/opt-out for non-Google
projects.

Also in the change, minor clean up of duplicated code.

Test: presubmit
Bug: 139945549
Change-Id: Ic176ef1f17133405851a79592b6bef5ccb403bd9
2019-11-11 13:24:39 -08:00
Nick Desaulniers
2d5ce8538b Merge "soong: move -Wimplicit-fallthrough from cflags to cxxflags" 2019-11-11 16:54:25 +00:00
Colin Cross
23d988d54a Remove -Wno-thread-safety-negative
-Wthread-safety-negative was disabled because it requires locks to
support an operator!(), and std::mutex in libc++ does not.  Disabling
it everywhere was preventing it being used for modules that want to
opt in to using it and provide their own lock that supports
operator!().  Modules that use -Weverything should either stop using
 -Weverything (preferred), or add -Wno-thread-safety-negative.

Bug: 143713277
Test: m native
Change-Id: I0b84679a806a21b16cabe7f739fde61c3efe2cbe
2019-11-08 18:27:40 +00:00
Nick Desaulniers
4e31fb87af soong: move -Wimplicit-fallthrough from cflags to cxxflags
The compiler upgrade to r370808 can now check C code for implicit
fallthrough. This is triggering a massive number of warnings throughout
external/ and the rest of the platform.

Revisit enabling this for C another day.

Bug: 139945549
Test: m
Change-Id: I8dfaedab78c6230b46e8a45a9e65106dec363380
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-11-08 09:52:56 -08:00
Dan Willemsen
89dad60ed5 Add support for 10.15 SDK
I haven't found any issues so far.

Test: try the build
Change-Id: I1e2f4095795daead6eb96280d60a122c51ba66ba
2019-10-22 17:01:15 -07:00
Treehugger Robot
81a4016f61 Merge "Add android.hardware.neuralnetworks@1.3" 2019-10-17 22:47:15 +00:00
Slava Shklyaev
7779766411 Add android.hardware.neuralnetworks@1.3
Bug: 139120468
Test: m
Change-Id: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
Merged-In: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
(cherry picked from commit f4b5a5ba08)
2019-10-16 14:01:25 +01:00
Pirama Arumuga Nainar
105cab2b5a Pass -static-libgcc to Windows link commands
This was unnecessary in the past, when -nodefaultlibs was used while
linking, but that changed with
aosp/I722bd6596a1f3f5819f2767c29c0fa1e8b3ec0e8.

Test: simpleperf_ndk64.exe no longer depends on libgcc_s_seh-1.dll.
Change-Id: I435d7302906eb3758e758b5aefca8763bfba6290
2019-10-15 13:58:30 -07:00
Lev Proleev
d84ed52753 Revert "Add android.hardware.neuralnetworks@1.3"
This reverts commit 3cf57d72ce.

Reason for revert: the topic breaks git_qt-dev-plus-aosp

Change-Id: I4ee625982dac1b12755e9ebc6e0cdb2bfbd25613
2019-10-10 13:54:14 +00:00
Slava Shklyaev
3cf57d72ce Add android.hardware.neuralnetworks@1.3
Bug: 139120468
Test: m
Change-Id: Iee24fd8e70805eab3e352186e543fe02246a6a72
Merged-In: Iee24fd8e70805eab3e352186e543fe02246a6a72
(cherry picked from commit f4b5a5ba08)
2019-10-08 16:58:43 +01:00
Yi Kong
d0ce0fbfde Remove -Wno-c++98-compat-extra-semi warning flag
hidl/aidl actually does concern about this warning. After fixing their
codebase, this flag is no longer needed.

Test: presubmit
Change-Id: Id88abea88137be0f873c21db76644fe78b9045c8
2019-10-01 22:42:59 +00:00
Yi Kong
aefd0af575 Merge "Remove -Wno-format-pedantic cflag" 2019-09-23 17:48:21 +00:00
Yi Kong
011aaa46c5 Remove -Wno-format-pedantic cflag
This is no longer needed.

Test: presubmit
Bug: 20148343
Change-Id: Ie377b3cd183ae89bc159c3b31c64960bce3bc753
2019-09-20 17:24:21 -07:00
Treehugger Robot
83dcee3094 Merge "soong: -Werror=fortify-source" 2019-09-20 23:49:33 +00:00
George Burgess IV
6c691644f7 soong: -Werror=fortify-source
Recently, we started deferring to clang for some of its built-in
FORTIFY-like warnings. We should always treat these as errors, since
they represent potential security vulnerabilities.

Bug: 131861088
Test: m. Also made a compilation in Bionic fail; verified the build
  command had -Werror=fortify-source in it.

Change-Id: I2715ea411ef067f801534dab4d306fef5431f290
2019-09-20 11:15:40 -07:00
Pirama Arumuga Nainar
24d49119d8 Switch to clang-r365631b
Bug: https://github.com/android/ndk/issues/1076
Test: TH
Change-Id: Ica61fd13d9d7ecc742a7a89f5bb04cc6e1caf9f2
2019-09-16 15:06:41 -07:00
Luca Stefani
2af7d882e8 Add missing cortex-a76 arm configuration
Change-Id: I55620e602b9e97fe7a6d36fa142ddfde77b6025b
2019-09-12 18:37:45 +02:00
Treehugger Robot
f59007cf23 Merge "Do not dedupe libprotobuf-cpp variants" 2019-09-10 00:30:36 +00:00
Yi Kong
751569192c Remove '-Wno-return-std-move-in-c++11' flag
This flag is no longer needed.

Test: presubmit
Change-Id: I9718ea1d448a6f598e6da61c3b30a0c9470d9c08
2019-09-09 18:48:15 +00:00
Vic Yang
7f438b1df3 Do not dedupe libprotobuf-cpp variants
The vendor variants of libprotobuf-cpp have their version numbers
included in their names, so the SONAME field is different.  Whitelist
the 'lite' and 'full' versions to have different core and vendor
variants.

Test: Build a device with TARGET_VNDK_USE_CORE_VARIANT set.
Change-Id: I9880a5d7172a9f35f304af8e7dcababdcbc2ca23
2019-09-09 10:54:50 -07:00
Yi Kong
38e5eacedc Merge "Re-enable tautological-unsigned-enum-zero-compare"
am: 47236f13fc

Change-Id: I4def4ff498f48dfff56709b1f8dd28fbe4fad408
2019-09-03 14:50:24 -07:00
Yi Kong
8ca12bd837 Re-enable tautological-unsigned-enum-zero-compare
Clang is smarter at producing this new warning now, producing far
fewer false positives. Re-enable the diagnostic for Android.

Test: build
Bug: 72331526
Change-Id: Ide827791c51587bceb977ae4116894a8cd620eb1
2019-09-01 14:11:01 -07:00
Yi Kong
09c3304fe4 Merge "Re-enable tautological-unsigned-zero-compare"
am: 73e2125894

Change-Id: I12b004231a9f19a85f8afb9d0ac1d78bf6a50cac
2019-08-29 19:05:03 -07:00
Yi Kong
73e2125894 Merge "Re-enable tautological-unsigned-zero-compare" 2019-08-30 01:44:27 +00:00
Dan Willemsen
ce33a3546c Merge "Disallow __DATE__/__TIME__ on host builds"
am: 63cce39166

Change-Id: Ib04880b728ecde0cd9789077fe9d26b8a96d7229
2019-08-28 19:31:57 -07:00
Yi Kong
30a3c7faca Re-enable tautological-unsigned-zero-compare
Clang is smarter at producing this new warning now, producing far
fewer false positives. Re-enable the diagnostic for Android.

Test: build
Bug: 72331526
Change-Id: I2020b887fbeb3cd833462e50df835a6cd104920d
2019-08-28 09:48:30 +00:00
Dan Willemsen
5d980c878d Disallow __DATE__/__TIME__ on host builds
Instead of just making this an error when building for the device, also
turn on this error for host builds. This is more important as we begin
to use remote caches during the build.

Test: treehugger
Change-Id: I6fcc945464032d951729aead540ea77850c88c41
2019-08-27 19:37:10 -07:00
Yi Kong
e4a824d378 Merge "Switch to clang-r365631"
am: bdefa541d9

Change-Id: I4f8b4e9ce9e0a355b247b11effc5bb1e5ba07f63
2019-08-22 11:56:05 -07:00
Yi Kong
d255c7bc2f Switch to clang-r365631
Test: build, boot, bionic-unit-test
Test: For Googlers, go/clang-r365631-testing
Bug: 131328001
Change-Id: Ib357d9044a72e41f6bde1e5ec2db34e90706124d
2019-08-15 04:47:34 +00:00
Stephen Hines
b28643b33f Merge "Add support for AUTO_*_INITIALIZE to build/soong."
am: 7f0560d962

Change-Id: I2d964d462a29539252b3f76544a096028f48c668
2019-08-06 14:39:36 -07:00
Stephen Hines
7f0560d962 Merge "Add support for AUTO_*_INITIALIZE to build/soong." 2019-08-06 21:04:04 +00:00
Mitch Phillips
d47d87d7d0 Merge "Add the cc_fuzz target."
am: 178f8fb732

Change-Id: I4a1a2f68054dde52442798f9fa08e04536a02cc7
2019-07-18 14:07:12 -07:00
Mitch Phillips
da9a463794 Add the cc_fuzz target.
Adds the cc_fuzz target via a cc_fuzz module. Also implements the
libclang runtime interface for the x86 toolchain to allow host-built
fuzzers.

Bug: 133261679
Bug: 137398545

Test: Build a fuzzer (with all topic patches), notice that you now
have a host-built fuzzer :)

Change-Id: I7fa069603415f40b3f12a002c253fca6e2aa1988
2019-07-16 16:30:53 -07:00
Elliott Hughes
0a4996eae5 Merge "Stop defining unused USE_SSSE3."
am: b940a1499b

Change-Id: I1ffdadb67b35ef899db10b49253f2c93073527c7
2019-07-13 10:23:29 -07:00
Elliott Hughes
b22dcfe05c Stop defining unused USE_SSSE3.
This copy & paste has even made it into the fuchsia configuration...

Test: builds
Change-Id: If22615fdf04448c058db014d93155e6264fb3eb2
2019-07-12 22:40:45 -07:00
Stephen Hines
66c8b446aa Add support for AUTO_*_INITIALIZE to build/soong.
Bug: http://b/131390872
Test: Builds with/without AUTO_ZERO_INITIALIZE set.
Test: Builds with/without AUTO_PATTERN_INITIALIZE set.

Change-Id: If085ec53c619e2cebc86ca23f7039298160d99ae
2019-07-12 02:22:10 -07:00
jaishank
3cb1f6a532 Merge "Disabled avx avx2 avx512 compiler flags by default. Library components can enable the flags based on performance impact" am: dd5cf7574b
am: 1b4699a2cf

Change-Id: I553cab57535513558e3d976e0d3e5c6a4532a02b
2019-06-28 14:28:05 -07:00
Treehugger Robot
dd5cf7574b Merge "Disabled avx avx2 avx512 compiler flags by default. Library components can enable the flags based on performance impact" 2019-06-28 21:14:33 +00:00
jaishank
7e84969f96 Disabled avx avx2 avx512 compiler flags by default.
Library components can enable the flags based on
performance impact

Test: run-test gtest
Change-Id: I41c4464cffd2b0e830d4ab1c5a25b378e2a25129
Signed-off-by: jaishank <jaishankar.rajendran@intel.com>
2019-06-27 10:36:23 +05:30
Nick Desaulniers
8414bef84d Merge "Switch to clang-r353983d" am: 2deb017c04
am: f1b45a21a4

Change-Id: If3444510dbf9767c5c825a5414f0046f5c272449
2019-06-17 10:40:40 -07:00
Nick Desaulniers
36a39c9852 Switch to clang-r353983d
Test: build+boot sargo, TreeHugger
Bug: 131714073
Change-Id: Ieec2500027a78b80147f86b2bdaeaedaa1c18360
2019-06-14 16:31:34 -07:00
Yi Kong
8973bd7683 Merge "Enable the experimental LLVM new pass manager" am: 2adb7eec9a
am: c0377c2a12

Change-Id: Ia4af6b0c9be34bea2aff6d7c536a38420ebb567d
2019-05-24 11:17:33 -07:00
Yi Kong
2adb7eec9a Merge "Enable the experimental LLVM new pass manager" 2019-05-24 17:33:26 +00:00
Yi Kong
2fc3248b6b Enable the experimental LLVM new pass manager
For walleye, the overall binary size is decreased by ~1.1%.

For Googlers, http://go/android-llvm-newpm

Test: build
Bug: 131855431
Change-Id: I6726cd3de0d528b773fb23eae1a7c5c360e29807
2019-05-23 07:17:27 +00:00
Yi Kong
fcd11c7c71 Merge "Exclude libgcc_stripped wherever libgcc is excluded" am: 3277c39c6b
am: 29ae56ede9

Change-Id: Iaeb5531631c175af08b2e0d96dfccd4ad25ea080
2019-05-07 09:42:38 -07:00
Yi Kong
29ae56ede9 Merge "Exclude libgcc_stripped wherever libgcc is excluded"
am: 3277c39c6b

Change-Id: Idbe82ea4a3e5cb9a9a7c194dd0a4d8a282d56c03
2019-05-06 20:13:01 -07:00
Yi Kong
3d8792f7dd Exclude libgcc_stripped wherever libgcc is excluded
Test: manual testing
Bug: 130267141
Bug: 29275768
Change-Id: Icc0d50e403dc4a3592e5bf389101cdef129042df
2019-05-06 16:18:33 -07:00
Yi Kong
7a3161c25b Merge "Switch to clang-r353983c" am: db52ce88b0
am: bafbdf4239

Change-Id: I50cd88d304d9a16496d9500a2506f5e7200cf2a0
2019-04-19 17:14:03 -07:00
Yi Kong
bafbdf4239 Merge "Switch to clang-r353983c"
am: db52ce88b0

Change-Id: I80437802cdb52b22bad0e2c67f57b596cc75451a
2019-04-19 16:30:25 -07:00