craftr-build-4.x
craftr-build-4.x copied to clipboard
Find a better method to deal with the Windows command length limit
The path length limit requires that response files be used with extremely long commands, for example when linking a large number of object files. Currently, a module that generates build operators can explicitly construct a craftr.core.build.Command
object and specify that the command supports response files.
At the time the command is executed, the Command.with_response_file()
context manager will check if the path length limit is exceeded and alter the specified command list respectively.
The problem with this is portability and extensibility: Some programs may not support response files with the @filename
syntax and others may support them only for a subset of their command-line arguments.
Example of current usage in an operator:
https://github.com/craftr-build/craftr/blob/49566dc204c07a12bc51cb360ec981e8026a44eb/src/craftr/stdlib/net.craftr.lang.cxx/impl/base.py#L342-L354