Index: base/allocator/BUILD.gn |
diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn |
index ee75b64844b2b733bda1496647766d98e949398b..44de819df0d45990e0122f4b5db80d7c7a9db083 100644 |
--- a/base/allocator/BUILD.gn |
+++ b/base/allocator/BUILD.gn |
@@ -48,6 +48,23 @@ config("tcmalloc_flags") { |
"TCMALLOC_FOR_DEBUGALLOCATION", |
] |
} |
+ if (is_clang) { |
+ cflags = [ |
+ # tcmalloc initializes some fields in the wrong order. |
+ "-Wno-reorder", |
+ |
+ # tcmalloc contains some unused local template specializations. |
+ "-Wno-unused-function", |
+ |
+ # tcmalloc uses COMPILE_ASSERT without static_assert but with |
+ # typedefs. |
+ "-Wno-unused-local-typedefs", |
+ |
+ # for magic2_ in debugallocation.cc (only built in Debug builds) |
+ # typedefs. |
+ "-Wno-unused-private-field", |
+ ] |
+ } |
} |
# This config and libc modification are only used on Windows. |