toolkit/crashreporter/google-breakpad/src/common/moz.build
author Mike Hommey <mh+mozilla@glandium.org>
Wed, 03 Sep 2014 14:10:54 +0900
changeset 203471 01a0e2c9c595e983605cb0aa5c12c9eceeb8ae7f
parent 195616 b6982073587f13f4c2575346aa952a520ea0ebae
child 241357 76604a91617d22ff1ac13948b95271bf3cc0df70
permissions -rw-r--r--
Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps

# -*- 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'] in ('Darwin', 'Linux'):
    DIRS += ['dwarf']

UNIFIED_SOURCES += [
    'convert_UTF.c',
    'logging.cc',
    'module.cc',
    'pathname_stripper.cc',
    'string_conversion.cc',
    'unique_string.cc',
]

if CONFIG['OS_TARGET'] != 'WINNT':
    UNIFIED_SOURCES += [
        'arm_ex_reader.cc',
        'arm_ex_to_module.cc',
        'dwarf/bytereader.cc',
        'dwarf/dwarf2diehandler.cc',
        'dwarf/dwarf2reader.cc',
        'dwarf_cfi_to_module.cc',
        'dwarf_cu_to_module.cc',
        'dwarf_line_to_module.cc',
        'language.cc',
        'md5.cc',
    ]

if CONFIG['OS_ARCH'] == 'Linux':
    UNIFIED_SOURCES += [
        'linux/dump_symbols.cc',
        'linux/elf_symbols_to_module.cc',
    ]

if CONFIG['OS_TARGET'] == 'Android':
    pass
else:
    if CONFIG['OS_TARGET'] != 'WINNT':
        UNIFIED_SOURCES += [
            'stabs_reader.cc',
            'stabs_to_module.cc',
        ]

if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_CRASHREPORTER']:
    HOST_SOURCES += [ 'convert_UTF.c' ]
    HostLibrary('host_breakpad_common_s')
    HOST_SOURCES += [
        'arm_ex_reader.cc',
        'arm_ex_to_module.cc',
        'dwarf_cfi_to_module.cc',
        'dwarf_cu_to_module.cc',
        'dwarf_line_to_module.cc',
        'language.cc',
        'logging.cc',
        'md5.cc',
        'module.cc',
        'pathname_stripper.cc',
        'stabs_reader.cc',
        'stabs_to_module.cc',
        'string_conversion.cc',
        'unique_string.cc',
    ]

if CONFIG['OS_ARCH'] == 'Darwin':
    UNIFIED_SOURCES += [
        'mac/dump_syms.mm',
    ]

if CONFIG['OS_TARGET'] == 'Android':
    # We don't support unifying assembly files.
    SOURCES += [
        'android/breakpad_getcontext.S',
    ]

Library('breakpad_common_s')

MSVC_ENABLE_PGO = True

FINAL_LIBRARY = 'xul'

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    DEFINES['ELFSIZE'] = 32

if CONFIG['OS_TARGET'] == 'Android':
    DEFINES['NO_STABS_SUPPORT'] = True

include('/toolkit/crashreporter/crashreporter.mozbuild')

LOCAL_INCLUDES += [
    '..',
]