I am trying to compile chromium with GCC 11.1 and I'm getting a lot of warnings and errors. I've included them below. I'm using the following arguments for gn: is_clang=false treat_warnings_as_errors=false.
Is it currently possible to build chromium with GCC?
../../third_party/skia/src/gpu/GrSubRunAllocator.h:100:9: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
100 | inline static constexpr int kAllocationAlignment = alignof(std::max_align_t);
| ^~~~~~
../../third_party/skia/src/gpu/GrSubRunAllocator.h:173:5: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’
173 | inline static constexpr bool HasNoDestructor = std::is_trivially_destructible<T>::value;
| ^~~~~~
In file included from ../../third_party/skia/src/core/SkBlenderBase.h:15,
from ../../third_party/skia/src/core/SkReadBuffer.h:19,
from ../../third_party/skia/src/effects/SkLayerDrawLooper.cpp:16:
../../third_party/skia/src/core/SkVM.h: In function ‘skvm::F32 skvm::poly(skvm::F32, F32_or_float, float, Rest ...)’:
../../third_party/skia/src/core/SkVM.h:1344:12: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
1344 | if constexpr (sizeof...(rest) == 0) {
| ^~~~~~~~~
../../third_party/skia/src/core/SkVM.cpp: In member function ‘skvm::I32 skvm::Builder::bit_and(skvm::I32, skvm::I32)’:
../../third_party/skia/src/core/SkVM.cpp: In member function ‘skvm::I32 skvm::Builder::bit_and(skvm::I32, skvm::I32)’:
../../third_party/skia/src/core/SkVM.cpp: In member function ‘skvm::I32 skvm::Builder::bit_and(skvm::I32, skvm::I32)’:
cc1plus: note: unrecognized command-line option ‘-Wno-c++17-extensions’ may have been intended to silence earlier diagnostics
1332 | ALWAYS_INLINE void PartitionRoot<thread_safe>::RecommitSystemPagesForData(
| ^
../../base/allocator/partition_allocator/partition_root.h:1351:33: error: expected initializer before ‘<’ token
1351 | ALWAYS_INLINE bool PartitionRoot<thread_safe>::TryRecommitSystemPagesForData(
| ^
../../base/allocator/partition_allocator/partition_root.h:1381:35: error: expected initializer before ‘<’ token
1381 | ALWAYS_INLINE size_t PartitionRoot<thread_safe>::GetUsableSize(void* ptr) {
| ^
../../base/allocator/partition_allocator/partition_root.h:1399:14: error: expected initializer before ‘<’ token
1399 | PartitionRoot<thread_safe>::AllocationCapacityFromPtr(void* ptr) const {
| ^
../../base/allocator/partition_allocator/partition_root.h:1410:14: error: expected initializer before ‘<’ token
1410 | PartitionRoot<thread_safe>::SizeToBucketIndex(size_t size) {
| ^
../../base/allocator/partition_allocator/partition_root.h:1415:34: error: expected initializer before ‘<’ token
1415 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::AllocFlags(
| ^
../../base/allocator/partition_allocator/partition_root.h:1424:34: error: expected initializer before ‘<’ token
1424 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::AllocFlagsInternal(
| ^
../../base/allocator/partition_allocator/partition_root.h:1467:34: error: expected initializer before ‘<’ token
1467 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::AllocFlagsNoHooks(
| ^
../../base/allocator/partition_allocator/partition_root.h:1655:34: error: expected initializer before ‘<’ token
1655 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::RawAlloc(
| ^
../../base/allocator/partition_allocator/partition_root.h:1668:34: error: expected initializer before ‘<’ token
1668 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::AlignedAllocFlags(
| ^
../../base/allocator/partition_allocator/partition_root.h:1752:34: error: expected initializer before ‘<’ token
1752 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::Alloc(size_t requested_size,
| ^
../../base/allocator/partition_allocator/partition_root.h:1758:34: error: expected initializer before ‘<’ token
1758 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::Realloc(void* ptr,
| ^
../../base/allocator/partition_allocator/partition_root.h:1765:34: error: expected initializer before ‘<’ token
1765 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::TryRealloc(
| ^
../../base/allocator/partition_allocator/partition_root.h:1779:14: error: expected initializer before ‘<’ token
1779 | PartitionRoot<thread_safe>::AllocationCapacityFromRequestedSize(
| ^
../../base/allocator/partition_allocator/partition_root.h:1802:33: error: ‘PartitionRoot’ does not name a type
1802 | using ThreadSafePartitionRoot = PartitionRoot<internal::ThreadSafe>;
| ^~~~~~~~~~~~~
../../base/allocator/partition_allocator/partition_root.h:1803:35: error: ‘PartitionRoot’ does not name a type
1803 | using ThreadUnsafePartitionRoot = PartitionRoot<internal::NotThreadSafe>;
| ^~~~~~~~~~~~~
../../base/allocator/partition_allocator/partition_root.h:1805:1: error: expected declaration before ‘}’ token
1805 | } // namespace base
| ^
../../base/allocator/partition_allocator/partition_root.h:457:29: warning: ‘void base::Free(void*)’ declared ‘static’ but never defined [-Wunused-function]
457 | ALWAYS_INLINE static void Free(void* ptr);
| ^~~~
../../base/allocator/partition_allocator/partition_root.h:459:29: warning: ‘void base::FreeNoHooks(void*)’ declared ‘static’ but never defined [-Wunused-function]
459 | ALWAYS_INLINE static void FreeNoHooks(void* ptr);
| ^~~~~~~~~~~
../../base/allocator/partition_allocator/partition_root.h:465:31: warning: ‘size_t base::GetUsableSize(void*)’ declared ‘static’ but never defined [-Wunused-function]
465 | ALWAYS_INLINE static size_t GetUsableSize(void* ptr);
| ^~~~~~~~~~~~~
../../base/allocator/partition_allocator/partition_root.h:485:19: warning: ‘uint16_t base::SizeToBucketIndex(size_t)’ declared ‘static’ but never defined [-Wunused-function]
485 | static uint16_t SizeToBucketIndex(size_t size);
| ^~~~~~~~~~~~~~~~~
../../base/allocator/partition_allocator/partition_root.h:370:29: warning: ‘base::IsValidSlotSpan’ defined but not used [-Wunused-variable]
370 | ALWAYS_INLINE static bool IsValidSlotSpan(SlotSpan* slot_span);
| ^~~~~~~~~~~~~~~
[13633/54214] CXX obj/components/policy/proto/proto_internal/device_management_backend.pb.o
ninja: build stopped: subcommand failed.