0.2.0-dev Download ZIP
10 lines ·425 B Raw
| 1 | """Functions used to generate source files during build time""" |
| 2 | |
| 3 | import subprocess |
| 4 | |
| 5 | |
| 6 | def make_debug_linuxbsd(target, source, env): |
| 7 | dst = str(target[0]) |
| 8 | subprocess.run(["objcopy", "--only-keep-debug", dst, f"{dst}.debugsymbols"], check=True) |
| 9 | subprocess.run(["strip", "--strip-debug", "--strip-unneeded", dst], check=True) |
| 10 | subprocess.run(["objcopy", f"--add-gnu-debuglink={dst}.debugsymbols", dst], check=True) |