aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/backtrace/.yandex_meta/__init__.py
blob: d4f08e5a19c51bb0664f6ac41506f295536fd81a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from devtools.yamaker.modules import Linkable, Switch
from devtools.yamaker.project import GNUMakeNixProject


def post_install(self):
    with self.yamakes["."] as m:
        m.SRCS.remove("elf.c")
        m.after(
            "SRCS",
            Switch(
                [
                    ("OS_DARWIN", Linkable(SRCS=["macho.c"])),
                    ("OS_LINUX OR OS_ANDROID", Linkable(SRCS=["elf.c"])),
                ]
            ),
        )


libbacktrace = GNUMakeNixProject(
    nixattr="libbacktrace",
    arcdir="contrib/libs/backtrace",
    owners=["dfyz", "g:cpp-contrib"],
    copy_sources=["macho.c"],
    platform_dispatchers=["config.h"],
    post_install=post_install,
    disable_includes=["sys/link.h"],
)