Commit graph

734 commits

Author SHA1 Message Date
Elliott Hughes
7622713c8d Bump the macOS version to 10.10.
Android Studio only claims to support macOS 10.10 and later, so we
probably shouldn't bother with anything older either.

Test: treehugger
Change-Id: I478cb52221198d7b7e2247dfbee4cd86d5bbd1a8
2020-02-13 16:23:12 -08:00
Chih-hung Hsieh
8744cdffeb Merge "Switch from clang-r370808b to clang-r377782" 2020-02-13 21:46:35 +00:00
Elliott Hughes
632dbb3dc2 Bump our macOS target version to 10.9.
https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/resolving_common_notarization_issues
says "notarization only works for binaries linked against macOS 10.9
or later".

Test: N/A
Bug: http://b/143105198
Change-Id: If66f81caa2f074bf70a75094da578295aa9f58ad
2020-02-12 18:31:35 -08:00
Chih-Hung Hsieh
9d9555e348 Switch from clang-r370808b to clang-r377782
Allow new clang compiler warnings until they are
fixed or suppressed in all branches.

Bug: 145916209
Test: make checkbuild
Change-Id: Ic873b8d705dacd0d92f9031b3960e01283090363
2020-02-12 21:50:07 +00:00
Ivan Lozano
2d743b54c7 Merge "Revert "Allow Linux hosts to use ubsan runtime sanitizers."" 2020-02-11 20:23:36 +00:00
Ivan Lozano
9e37faa3ab Revert "Allow Linux hosts to use ubsan runtime sanitizers."
This reverts commit dbc5000c5b.

Reason for revert: Build breakage.

Change-Id: Ia6a1b58f156e4cc071562043c2f99f78b45b7968
Exempt-From-Owner-Approval: Reverting change due to build breakage.
2020-02-11 20:21:01 +00:00
Ivan Lozano
0dbb324a83 Merge "Allow Linux hosts to use ubsan runtime sanitizers." 2020-02-11 18:37:17 +00:00
Ivailo Karamanolev
876180cf36 Add android.hardware.light-ndk_platform to vndkMustUseVendorVariantList
aidl libs need to be differentiated because they explicitly set
different system/vendor stabilities.

Bug: 142230898
Test: make checkbuild
Change-Id: I1eb8b77a8e15f962eb6a352c87b1a43ca2160758
Merged-In: Ib09baa946faff8334f7c50568db5e6735dfbbfe2
2020-02-07 04:03:49 +01:00
Vic Yang
78792dcf45 More cleanup of no-vendor-variant VNDK whitelist
Bug: 148082691
Test: Build success
Change-Id: Icad28af29e80908c0d353f6fc70913678fd82064
Merged-In: Icad28af29e80908c0d353f6fc70913678fd82064
2020-02-06 11:14:33 -08:00
Ivan Lozano
dbc5000c5b Allow Linux hosts to use ubsan runtime sanitizers.
Linux host prebuilts for UBSan runtime are available now, so we can enable
these. There's a bit more work to be done for Windows/Darwin support, so
that's left to another CL.

Bug: 148289941
Test: Build host binary with integer overflow sanitization enabled.
Change-Id: I9b06a63da6f0d6644273085ad6ffd42677fa2baa
2020-02-06 09:59:34 -05:00
Stephen Hines
2b2df22ca5 Switch to r370808b.
Bug: http://b/147628579
Test: m and run CTS subset
Change-Id: I9eb1b33385b939001bfcc50c807829068a35744c
2020-01-31 15:24:22 -08:00
Stephen Hines
0e1d5d8ab3 Default to pattern initialization for uninitialized variables (try 2).
Pattern initialization helps us make C++ safer, while not altering the
semantics/usage of C++ (as zero init does).

Bug: 131390872
Test: Local testing. Parts of CTS.
Change-Id: Ic4af9260a48c10cbd70315fa56d6b01c5ca61768
2020-01-30 15:06:00 -08:00
Stephen Hines
797e1959e3 Add AUTO_UNINITIALIZE as another option for trivial initialization.
This lets us test uninitialized variables even if we change the defaults
for -ftrivial-auto-var-init.

Bug: 131390872
Test: AUTO_UNINITIALIZE=true m
Change-Id: I2b4473a0547dc9c4d9f081d8af2d283f17f66f7a
2020-01-28 14:43:11 -08:00
Vic Yang
641e87a02c Merge "Reland "Clean up no-vendor-variant VNDK whitelist"" 2020-01-23 06:07:58 +00:00
Hadrien Zalek
8aecc11844 Merge "Revert "Default to pattern initialization for uninitialized variables."" 2020-01-22 22:16:18 +00:00
Hadrien Zalek
6fecbee4d5 Revert "Default to pattern initialization for uninitialized variables."
This reverts commit fae236f4ee.

Reason for revert: Breaks 32-bit app tests on Cuttlefish
Bug: 148123414

Change-Id: Ieeb0b09e711a55172e6faa0035d1eb84dd6c4471
2020-01-22 21:50:56 +00:00
Vic Yang
34b24aa82e Reland "Clean up no-vendor-variant VNDK whitelist"
Test: Build success
Change-Id: If8ca5f9cec5fc735e56ec06fefd4cebf44032b59
2020-01-21 15:38:42 -08:00
Peter Collingbourne
d2f8df4b3e Merge "build: Link the unwinder dynamically into platform and vendor binaries." 2020-01-21 21:28:44 +00:00
Vic Yang
f3cae775e9 Merge "Revert "Clean up no-vendor-variant VNDK whitelist"" 2020-01-21 20:45:49 +00:00
Vic Yang
987ebebfbc Revert "Clean up no-vendor-variant VNDK whitelist"
This reverts commit 882e59d45d.

Reason for revert: Breaking build on internal target

Change-Id: I775f120ef140835ee4fe76db5cbbb33255f93b76
2020-01-21 20:38:37 +00:00
Treehugger Robot
a07b2f7766 Merge "Clean up no-vendor-variant VNDK whitelist" 2020-01-21 18:38:55 +00:00
Vic Yang
882e59d45d Clean up no-vendor-variant VNDK whitelist
First round of cleaning. Remove VNDK libraries that
already have identical variants.

Bug: 148082691
Test: Build success
Change-Id: I97f946a2cbf459b607a73e766db9fb8d7655f220
2020-01-21 18:33:44 +00:00
Stephen Hines
b9b979c8aa Merge "Default to pattern initialization for uninitialized variables." 2020-01-21 18:06:31 +00:00
Vic Yang
ff9f7fb26a Add OWNERS for cc/config/vndk.go
This file contains only a list of VNDK libraries that are allowed to
have different VNDK variant behaviors.

Test: N/A
Change-Id: I9e395b82b8006133294cf325e4626c1b34053588
2020-01-17 11:23:14 -08:00
Treehugger Robot
3fbe62b57d Merge changes from topic "vndkvariantcheck"
* changes:
  vndkMustUseVendorVariant += libstagefright_bufferpool@2.0
  Emit LOCAL_CHECK_SAME_VNDK_VARIANTS
2020-01-17 18:45:43 +00:00
Stephen Hines
fae236f4ee Default to pattern initialization for uninitialized variables.
Pattern initialization helps us make C++ safer, while not altering the
semantics/usage of C++ (as zero init does).

Bug: 131390872
Test: Local testing. Parts of CTS.
Change-Id: I9705ca3b724208647f0eab0a704f6f360206d482
2020-01-15 11:26:38 -08:00
Vic Yang
8c38ecba01 vndkMustUseVendorVariant += libstagefright_bufferpool@2.0
Bug: 145157349
Test: Build success
Change-Id: Ic5f1699d034715545c53a8842ef14692f2017706
2020-01-14 22:39:37 -08:00
Wei Wang
6c01618885 power: add stable aidl to VndkMustUseVendorVariantList
Bug: 146453294
Test: Build
Change-Id: I0e8e8ed425affa8103eff5aef74a7859341d0058
2020-01-14 17:32:56 -08:00
Peter Collingbourne
e5ba28648f build: Link the unwinder dynamically into platform and vendor binaries.
Instead of linking the unwinder statically into every binary, link it
dynamically, by exporting the symbols from libc.so. This has a number
of advantages:

- Reduces image size (system.img size decreases by 1.7MB on walleye-userdebug,
  and 1.2MB on crosshatch-userdebug).
- Allows us to easily change/upgrade the unwinder throughout the system,
  including vendor prebuilts.
- Allows code outside of libc++ to define custom personality routines.
  Previously, personality routines would call the unwinder routines in the
  local binary, which would cause problems with unwinders with global state
  (such as the libgcc unwinder) if the copy of the unwinder used for unwinding
  (normally libc++'s copy) were different from the copy linked against the
  personality routine.

Bug: 144430859
Change-Id: I3b2a4a3ee58c6777989f811e19a3aeb47c0945bd
2020-01-10 11:38:30 -08:00
Steven Moreland
9dbe4035ef vibrator: use package as name
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-vibrator format to the package format
(android.hardware.vibrator).

Bug: N/A
Test: all build time
Change-Id: Ie6580714c3d09c1f99808ca9f8dc7875487f1049
Merged-In: Ie6580714c3d09c1f99808ca9f8dc7875487f1049
2020-01-06 14:08:00 -08:00
Nick Desaulniers
eb20744361 Revert "Revert "soong: upgrade Android platform to clang-r370808""
This reverts commit 862eb4648a.

Re-upgrades the compiler to clang-r370808, after first dealing with
regressions in ndk_translate and execute only pages.

Bug: 139945549
Bug: 145807809
Bug: 145827049
Bug: 145825270
Test: atest \
  CtsSelinuxTargetSdk27TestCases:android.security.SELinuxTargetSdkTest#testNoExecuteOnly
Test: m ndk_translation_host_unit_tests && \
  ./out/host/linux-x86/nativetest/ndk_translation_host_unit_tests/ndk_translation_host_unit_tests
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I714b582faffa8c92384818a7b12338d621968548
2019-12-13 13:13:06 -08:00
Nick Desaulniers
862eb4648a Revert "soong: upgrade Android platform to clang-r370808"
This reverts commit 4f49e35902.

Causes test failures in ndk_translate.
Bug: 145807809
Bug: 145827049
Test: N/A
Change-Id: I8f42a15fec44475b74b1926c70bc98e03fe66f52
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-12-09 19:16:08 +00:00
Elliott Hughes
b5d11197d3 Merge "Enable -Wpragma-pack warnings as errors." 2019-12-06 22:07:20 +00:00
Nick Desaulniers
ac0336d81f Merge "soong: upgrade Android platform to clang-r370808" 2019-12-05 20:12:08 +00:00
Elliott Hughes
2cdbdf1093 Enable -Wpragma-pack warnings as errors.
The use of pragma pack(1) affects the packed-ness of every struct
definition that follows it in the translation unit, even in following
header files. This can lead to multiple translation units disagreeing
on whether a struct is packed.

Enable the warnings (as errors) that help spot this problem.

Bug: http://b/73971777
Test: treehugger
Change-Id: Id3096f35dff5dc8723d30d1305f1ed7ae8190a32
2019-12-04 08:48:45 -08:00
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
Steven Moreland
e7b5b72015 vndkMustUseVendorVariantList += vintf-vibrator
TARGET_VNDK_USE_CORE_VARIANT devices explicitly track libs which are
differentiated between system/vendor. b/145157349 is filed to try to
catch these errors during normal builds (or in presubmit).

aidl libs need to be differentiated because they explicitly set
different system/vendor stabilities.

Fixes: 145154788
Test: fixes build
Change-Id: I682ceaa2dd23f0f80ba060ae262d766b1367187e
2019-11-25 15:21:44 -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