Tweak some bazel warning options to eliminate non-controversial warni…
…ng spew.
Closes https://github.com/google/iree/pull/847
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/847 from stellaraccident:fixwarns1 9cbdcf97152077ef5dd4ebc6a0a15459593791c9
PiperOrigin-RevId: 297233765
diff --git a/.bazelrc b/.bazelrc
index 01400dd..d0a1af9 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -14,6 +14,12 @@
# Disable warnings we don't care about.
build --copt=-Wno-unused-local-typedef
+build --copt=-Wno-unused-private-field
+build --copt=-Wno-unused-const-variable
+# Matches upstream. Cannot impact due to extern C inclusion method.
+build --copt=-Wno-extern-c-compat
+# Technically UB but needed for intrusive ptrs
+build --copt=-Wno-invalid-offsetof
# C++14 standard version is required.
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
diff --git a/iree/hal/vmla/vmla_module.cc b/iree/hal/vmla/vmla_module.cc
index 04d2126..80cba95 100644
--- a/iree/hal/vmla/vmla_module.cc
+++ b/iree/hal/vmla/vmla_module.cc
@@ -39,8 +39,7 @@
//
// The provided data pointer and length is always for the buffer itself; it'll
// already be offset/clamped to parent buffer bounds when a view.
-class iree_vmla_buffer final : public RefObject<iree_vmla_buffer> {
- public:
+struct iree_vmla_buffer final : public RefObject<iree_vmla_buffer> {
static StatusOr<vm::ref<iree_vmla_buffer>> Allocate(
size_t byte_length, iree_allocator_t allocator) {
void* data = nullptr;
diff --git a/iree/hal/vulkan/BUILD b/iree/hal/vulkan/BUILD
index 7dd02b3..c39bb11 100644
--- a/iree/hal/vulkan/BUILD
+++ b/iree/hal/vulkan/BUILD
@@ -343,6 +343,7 @@
copts = [
# Only needed in the implementation cc and not by external users.
"-DVMA_STATIC_VULKAN_FUNCTIONS=0",
+ "-Wno-thread-safety-attributes", # External code.
],
deps = [
":dynamic_symbols",