2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 09:57:15 +01:00

Merge branch 'add-allow_argsfile-to-tasks' into 'master'

task: winres: allow tasks to disable @argsfile

Closes #2224

See merge request ita1024/waf!2216
This commit is contained in:
ita1024 2019-03-03 15:15:36 +00:00
commit e3c0c1b571
2 changed files with 6 additions and 1 deletions

View File

@ -150,6 +150,9 @@ class Task(evil):
always_run = False
"""Specify whether task instances must always be executed or not (class attribute)"""
allow_argsfile = True
"""Specify whether task instances support the @argsfile shortcut for sunting arguments to a file (class attribute)"""
shell = False
"""Execute the command with the shell (class attribute)"""
@ -313,7 +316,7 @@ class Task(evil):
cmd_bytes = sum([len(arg) for arg in cmd]) + len(cmd) -1
# Shunt arguments to a temporary file if the command is
# going to be too long.
if (cmd_bytes >= 8192 if Utils.is_win32 else cmd_bytes > 200000):
if self.allow_argsfile and (cmd_bytes >= 8192 if Utils.is_win32 else cmd_bytes > 200000):
cmd, args = self.split_argfile(cmd)
try:
(fd, tmp) = tempfile.mkstemp()

View File

@ -32,6 +32,8 @@ class rc_parser(c_preproc.c_parser):
"""
Calculates dependencies in .rc files
"""
allow_argsfile = False
def filter_comments(self, node):
"""
Overrides :py:meth:`waflib.Tools.c_preproc.c_parser.filter_comments`