@ -237,8 +237,10 @@ class NinjaRule:
return ninja_quote ( qf ( str ( x ) ) )
return ninja_quote ( qf ( str ( x ) ) )
def write ( self , outfile : T . TextIO ) - > None :
def write ( self , outfile : T . TextIO ) - > None :
rspfile_args = self . args
if self . rspfile_quote_style is RSPFileSyntax . MSVC :
if self . rspfile_quote_style is RSPFileSyntax . MSVC :
rspfile_quote_func = cmd_quote
rspfile_quote_func = cmd_quote
rspfile_args = [ NinjaCommandArg ( ' $in_newline ' , arg . quoting ) if arg . s == ' $in ' else arg for arg in rspfile_args ]
else :
else :
rspfile_quote_func = gcc_rsp_quote
rspfile_quote_func = gcc_rsp_quote
@ -253,7 +255,7 @@ class NinjaRule:
if rsp == ' _RSP ' :
if rsp == ' _RSP ' :
outfile . write ( ' command = {} @$out.rsp \n ' . format ( ' ' . join ( [ self . _quoter ( x ) for x in self . command ] ) ) )
outfile . write ( ' command = {} @$out.rsp \n ' . format ( ' ' . join ( [ self . _quoter ( x ) for x in self . command ] ) ) )
outfile . write ( ' rspfile = $out.rsp \n ' )
outfile . write ( ' rspfile = $out.rsp \n ' )
outfile . write ( ' rspfile_content = {} \n ' . format ( ' ' . join ( [ self . _quoter ( x , rspfile_quote_func ) for x in self . args ] ) ) )
outfile . write ( ' rspfile_content = {} \n ' . format ( ' ' . join ( [ self . _quoter ( x , rspfile_quote_func ) for x in rspfile_ args] ) ) )
else :
else :
outfile . write ( ' command = {} \n ' . format ( ' ' . join ( [ self . _quoter ( x ) for x in self . command + self . args ] ) ) )
outfile . write ( ' command = {} \n ' . format ( ' ' . join ( [ self . _quoter ( x ) for x in self . command + self . args ] ) ) )
if self . deps :
if self . deps :