aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/linker_script.py
blob: a5432884c1cd3d9933c1b43d6cd3114e133337a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
def onlinker_script(unit, *args):
    """
    @usage: LINKER_SCRIPT(Files...)

    Specify files to be used as a linker script
    """
    for arg in args:
        if not arg.endswith(".ld") and not arg.endswith(".ld.in"):
            unit.message(['error', "Invalid linker script extension: {}".format(arg)])
            return

    unit.onglobal_srcs(list(args))