Define _LIBCPP_FALLTHROUGH() in Android.bp
v4l-utils uses _LIBCPP_FALLTHROUGH() macro for explicit fallthrough to
next switch case. Upstream LLVM have inlined _LIBCPP_FALLTHROUGH() and
removed it so v4l-utils cannot find it. We just define the macro in a
flag as a temporary fix until upstream fixes it.
Issue has been raised to Linux Media Mailing Lists:
https://lore.kernel.org/linux-media/CALPBKXJXg4R4jm_RZ2QDnQuOf_hGwJRQ8L=1H-nthuDHaJMq+Q@mail.gmail.com
Bug: 430598176
Test: m LLVM_NEXT=true THINLTO_USE_MLGO=false
Change-Id: I8cf636572d937b90105cdad51f0d27d6d26b1953
diff --git a/Android.bp b/Android.bp
index 0ab8f1b..649f514 100644
--- a/Android.bp
+++ b/Android.bp
@@ -32,6 +32,11 @@
cflags: [
"-DPACKAGE_VERSION=\"" + v4l_utils_version + "\"",
"-DNO_LIBV4L2",
+ // _LIBCPP_FALLTHROUGH() is not available in Clang
+ // anymore so this is a temporary fix for it.
+ // Issue raised to Linux Media mailing list for a fix:
+ // https://lore.kernel.org/linux-media/CALPBKXJXg4R4jm_RZ2QDnQuOf_hGwJRQ8L=1H-nthuDHaJMq+Q@mail.gmail.com
+ "-D_LIBCPP_FALLTHROUGH()=[[fallthrough]]",
"-Wno-shift-overflow",
],