linker_script.py 365 B

123456789101112
  1. def onlinker_script(unit, *args):
  2. """
  3. @usage: LINKER_SCRIPT(Files...)
  4. Specify files to be used as a linker script
  5. """
  6. for arg in args:
  7. if not arg.endswith(".ld") and not arg.endswith(".ld.in"):
  8. unit.message(['error', "Invalid linker script extension: {}".format(arg)])
  9. return
  10. unit.onglobal_srcs(list(args))