js-cxxflags.mozbuild (1135B)
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 8 CXXFLAGS += CONFIG["MOZ_ICU_CFLAGS"] 9 10 if CONFIG["CC_TYPE"] in ("clang", "gcc"): 11 # Error on bad printf-like format strings 12 CXXFLAGS += ["-Werror=format"] 13 14 # gcc is buggy and warns on our attempts to JS_PUBLIC_API our 15 # forward-declarations or explicit template instantiations. See 16 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50044 17 if CONFIG["CC_TYPE"] == "gcc": 18 CXXFLAGS += ["-Wno-attributes"] 19 20 # Override definitions from "build/moz.configure/warnings.configure" until 21 # these warnings are enabled by default. 22 # 23 # (Older) GCC doesn't support these warnings, so only enable when compiling 24 # with Clang. 25 if CONFIG["CC_TYPE"] in ("clang", "clang-cl"): 26 CXXFLAGS += ["-Wdeprecated-this-capture"] 27 CXXFLAGS += ["-Wdeprecated-anon-enum-enum-conversion"] 28 CXXFLAGS += ["-Wdeprecated-enum-enum-conversion"]