mirror of
https://github.com/meshtastic/firmware.git
synced 2026-06-01 04:35:14 -04:00
21 lines
555 B
Python
21 lines
555 B
Python
#!/usr/bin/env python3
|
|
# force linker response file instead of command line arguments
|
|
|
|
Import("env")
|
|
|
|
|
|
def wrap_with_tempfile(command_key):
|
|
command = env.get(command_key)
|
|
if not command or not isinstance(command, str):
|
|
return
|
|
if "TEMPFILE(" in command:
|
|
return
|
|
env.Replace(**{command_key: "${TEMPFILE('%s')}" % command})
|
|
|
|
|
|
# Force SCons to spill long commands into response files on this target.
|
|
env.Replace(MAXLINELENGTH=8192)
|
|
|
|
for key in ("LINKCOM", "CXXLINKCOM", "SHLINKCOM", "SHCXXLINKCOM"):
|
|
wrap_with_tempfile(key)
|