Index: base/allocator/debugallocation_shim.cc |
diff --git a/base/allocator/debugallocation_shim.cc b/base/allocator/debugallocation_shim.cc |
index 1ca3049cacd4b9065bd73a84f33d53564bd5e0a2..479cfcad72d9908df93be67a5753968a4183fb60 100644 |
--- a/base/allocator/debugallocation_shim.cc |
+++ b/base/allocator/debugallocation_shim.cc |
@@ -7,7 +7,9 @@ |
// AFDO can mess with them. Better not to use AFDO there. This is a |
// temporary hack. We will add a mechanism in the build system to |
// avoid using -fauto-profile for tcmalloc files. |
-#if !defined(__clang__) |
+#if !defined(__clang__) && (defined(OS_CHROMEOS) || __GNUC__ > 5) |
+// Note that this option only seems to be available in the chromeos GCC 4.9 |
+// toolchain, and stock GCC 5 and up. |
#pragma GCC optimize ("no-auto-profile") |
#endif |