1# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2# vim: set filetype=python: 3# This Source Code Form is subject to the terms of the Mozilla Public 4# License, v. 2.0. If a copy of the MPL was not distributed with this 5# file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7# ICU pkg-config flags 8CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS'] 9 10if CONFIG['CC_TYPE'] in ('clang', 'gcc'): 11 # Also disable strict-aliasing for GCC compiler, that is enabled by default 12 # starting with version 7.1, see Bug 1363009 13 CXXFLAGS += ['-fno-strict-aliasing'] 14 # Error on bad printf-like format strings 15 CXXFLAGS += ['-Werror=format'] 16 # Ignore shadowed variable warnings as there are too many. 17 CXXFLAGS += ['-Wno-shadow'] 18 19# gcc is buggy and warns on our attempts to JS_PUBLIC_API our 20# forward-declarations or explicit template instantiations. See 21# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50044 22if CONFIG['CC_TYPE'] == 'gcc': 23 CXXFLAGS += ['-Wno-attributes'] 24