author Masatoshi Kimura <>
Tue, 31 Jul 2018 22:10:07 +0900
changeset 485348 997fd8419a4b28cdaaf3263e88dcad585ccfb101
parent 484986 f7f4ba3486b5e44b6ccdc3b150f5aa0aab76ffb7
child 492540 a1c1e2f201a73f1e82701d08b42dc9ae3da24ee0
permissions -rw-r--r--
Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at


    # The naming conventions are described in ./README.txt.



FINAL_LIBRARY = 'xul-gtest'


# GTest uses a variadic macro in a questionable way and it doesn't seem to be
# possible to selectively disable just that error when -pedantic-errors is set.
if CONFIG['CC_TYPE'] == 'gcc':

# These warnings are disabled in order to minimize the amount of boilerplate
# required to implement tests, and/or because they originate in the GTest
# framework in a way we cannot otherwise work around.
if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
  if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
    CXXFLAGS += [
elif CONFIG['CC_TYPE'] == 'msvc':
    '-wd4350', # behavior change: 'std::_Wrap_alloc<std::allocator<_Ty>>::...
    '-wd4275', # non dll-interface class used as base for dll-interface class
    '-wd4548', # Expression before comma has no effect
    '-wd4625', # copy constructor could not be generated.
    '-wd4626', # assugment operator could not be generated.
    '-wd4640', # construction of local static object is not thread safe.

    # This is intended as a temporary hack to support building with VS2015.
    # declaration of '*' hides class member

if CONFIG['CC_TYPE'] == 'clang-cl':
    AllowCompilerWarnings()  # workaround for bug 1090497