security/sandbox/staticruntime/moz.build
author Bob Owen <bobowencode@gmail.com>
Thu, 22 Jan 2015 08:37:30 +0000
changeset 253890 4ccaf5ae9ced866e2670ec134402709283184c27
parent 244014 a52ce2ed0c280b9a3a4970b471b79ca46af4e43d
child 253891 43f1f9eef449ef029ab5b2d54552e3de4203c2a6
permissions -rw-r--r--
Bug 1102211: Move security/sandbox/build/ into security/sandbox/chromium/ r=ted

# -*- Mode: python; c-basic-offset: 4; 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 http://mozilla.org/MPL/2.0/.

if CONFIG['OS_ARCH'] == 'WINNT':
    Library('sandbox_staticruntime_s')
    FORCE_STATIC_LIB = True
    USE_STATIC_LIBS = True

    include('../objs.mozbuild')
    SOURCES += security_sandbox_cppsrcs

    # Bug 1102853 tracks looking at removing this.
    if CONFIG['CPU_ARCH'] == 'x86_64':
        SOURCES['%s/security/sandbox/win/src/sharedmem_ipc_client.cc' % TOPSRCDIR].no_pgo = True

    for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'SANDBOX_EXPORTS',
                'NOMINMAX', '_CRT_RAND_S', 'CHROMIUM_SANDBOX_BUILD'):
        DEFINES[var] = True

    LOCAL_INCLUDES += ['/security/sandbox/chromium/base/shim']
    LOCAL_INCLUDES += ['/security/sandbox/chromium']
    LOCAL_INCLUDES += ['/security']
    LOCAL_INCLUDES += ['/nsprpub']

    DISABLE_STL_WRAPPING = True

    # Suppress warnings in third-party code.
    if CONFIG['_MSC_VER']:
        CXXFLAGS += [
            '-wd4275', # non dll-interface class exception used as base for dll-interface class
            '-wd4717', # recursive on all control paths, function will cause runtime stack overflow
            '-wd4996', # 'GetVersionExW': was declared deprecated
        ]

FAIL_ON_WARNINGS = True