OSDN Git Service

Add -Wno-implicit-fallthrough
authorLogan Chien <loganchien@google.com>
Tue, 26 Feb 2019 05:49:53 +0000 (13:49 +0800)
committerLogan Chien <loganchien@google.com>
Tue, 5 Mar 2019 03:29:55 +0000 (03:29 +0000)
This commit adds `-Wno-implicit-fallthrough` to disable implicit
fallthrough warnings.  This commit is required because the latest
LLVM/Clang toolchain emits more warnings.  Since `third_party/llvm-7.0`
is an upstream project, we don't want to locally patch the code.  Thus,
we are disabling implicit fallthrough warnings before it has been fixed
in the upstream.

Bug: b/115344057
Test: Build libGLESv2_swiftshader for Android
Change-Id: Ibde53e030ba66af20ba5281b33a684350ef4b35f
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/25529
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Logan Chien <loganchien@google.com>
third_party/llvm-7.0/Android.mk

index a8918e6..1bfadcb 100644 (file)
@@ -1017,6 +1017,7 @@ LOCAL_CFLAGS += -fomit-frame-pointer -ffunction-sections -fdata-sections
 LOCAL_CFLAGS += -fno-operator-names -msse2 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
 LOCAL_CFLAGS += -DANDROID_PLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
 LOCAL_CFLAGS += -U_FORTIFY_SOURCE
+LOCAL_CFLAGS += -Wno-implicit-fallthrough
 
 LOCAL_CPPFLAGS += -std=c++11