toolkit/crashreporter/breakpad-client/linux/moz.build
author Gabriele Svelto <gsvelto@mozilla.com>
Tue, 14 Mar 2017 14:37:26 +0100
changeset 500676 216cea3dc9162f70334a3abe3d169bf79dadf708
parent 481188 fca4d2503eb8da67558b37249a728916520454ff
child 564078 8acf05733d2108b675fd484d6f17c5124468542c
permissions -rw-r--r--
Bug 1319071 - Make crash minidumps use the same format for filenames on Linux as on other platforms; r?Ted This patch forks the breakpad files used for GUID generation and replaces them with copies living together with the rest of the forked sources. Since other files in the breakpad sources rely on the original files being present they haven't been removed but we deliberately define their inclusion definitions in the build system to prevent them from contributing to the build. This ensures that we always use our own version of the GUID generator while not touching the non-forked sources. MozReview-Commit-ID: 5kW74yAPUDW

# -*- 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 http://mozilla.org/MPL/2.0/.

UNIFIED_SOURCES += [
    'crash_generation/crash_generation_client.cc',
    'crash_generation/crash_generation_server.cc',
    'dump_writer_common/thread_info.cc',
    'dump_writer_common/ucontext_reader.cc',
    'handler/exception_handler.cc',
    'handler/guid_generator.cc',
    'handler/minidump_descriptor.cc',
    'log/log.cc',
    'microdump_writer/microdump_writer.cc',
    'minidump_writer/linux_dumper.cc',
    'minidump_writer/linux_ptrace_dumper.cc',
    'minidump_writer/minidump_writer.cc',
]

# On Linux we override the guid_creator.h header and use our own instead
if CONFIG['OS_TARGET'] == 'Linux' or CONFIG['OS_TARGET'] == 'Android':
    DEFINES['COMMON_LINUX_GUID_CREATOR_H__'] = 1

if CONFIG['OS_TARGET'] == 'Android':
    LOCAL_INCLUDES += [
        '/toolkit/crashreporter/google-breakpad/src/common/android/include',
    ]

# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True

FINAL_LIBRARY = 'xul'

if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CPU_ARCH'] == 'x86':
    # The NDK's user.h defines this struct with a different name.
    DEFINES['user_fpxregs_struct'] = 'user_fxsr_struct'

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    DEFINES['getcontext'] = 'breakpad_getcontext'

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