# 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/.
Library("interposers")

DEFINES["IMPL_MFBT"] = True

UNIFIED_SOURCES += [
    "env_interposer.cpp",
    "getline_interposer.cpp",
]

if CONFIG["MOZ_CRASHREPORTER"]:
    UNIFIED_SOURCES += [
        "pthread_create_interposer.cpp",
    ]

if CONFIG["MOZ_SANDBOX"]:
    EXPORTS.mozilla += [
        "pthread_atfork.h",
    ]

    UNIFIED_SOURCES += [
        "pthread_atfork_interposer.cpp",
    ]

if CONFIG["MOZ_LINKER"]:
    LOCAL_INCLUDES += [
        "/mozglue/linker",
    ]

OS_LIBS += CONFIG["DL_LIBS"]

FINAL_LIBRARY = "mozglue"
