size.py 455 B

123456789101112131415161718192021222324
  1. from SCons.Builder import Builder
  2. from SCons.Action import Action
  3. def generate(env):
  4. env.SetDefault(
  5. SIZE="size",
  6. SIZEFLAGS=[],
  7. SIZECOM="$SIZE $SIZEFLAGS $TARGETS",
  8. )
  9. env.Append(
  10. BUILDERS={
  11. "ELFSize": Builder(
  12. action=Action(
  13. "${SIZECOM}",
  14. "${SIZECOMSTR}",
  15. ),
  16. ),
  17. }
  18. )
  19. def exists(env):
  20. return True