pw_fuzzing: Workaround for OSS-Fuzz
OSS-Fuzz tries to stipulate -stdlib=libc++, but pw_minimal_cpp_stdlib
overrides that with -nostdinc++. This causes a warning that is handled
as an error (due to -Werror).
This is a small patch set -Wno-unused-command-line-arguments to allow
libc++ to be ignored.
Change-Id: Ib7bef5be5a0e2d410a371789332f6877d604e71d
diff --git a/pw_toolchain/host_clang.gni b/pw_toolchain/host_clang.gni
index a842622..405ff77 100644
--- a/pw_toolchain/host_clang.gni
+++ b/pw_toolchain/host_clang.gni
@@ -94,6 +94,11 @@
_cxx = getenv("CXX")
_cflags_list += string_split(getenv("CFLAGS"))
_cflags_cc_list += string_split(getenv("CXXFLAGS"))
+
+ # TODO(pwbug/184): OSS-Fuzz sets -stdlib=libc++, but pw_minimal_cpp_stdlib
+ # sets -nostdinc++. Find a more flexible mechanism to achieve this and
+ # similar needs (like removing -fno-rtti fro UBSan).
+ _cflags_cc_list += [ "-Wno-unused-command-line-argument" ]
_ldflags_list += string_split(getenv("LDFLAGS"))
}