Files
swift-mirror/test/CAS/Inputs/PrintResponseFile.py
Steven Wu cf23b98ec2 [libSwiftScan] Support response file as input arguments
Build system can pass response file to libSwiftScan as the command-line
arguments. libSwiftScan needs to expand the response file before
performing tasks.

rdar://121291342
2024-01-22 11:54:06 -08:00

14 lines
334 B
Python
Executable File

#!/usr/bin/env python3
#
# Usage: PrintResponseFile.py [SwiftCommandLine]
import sys
# Grab swift-frontend arguments. argv[0] is python script, argv[1] is
# swift-frontend path, the remaining args are what needs to be used.
cmd = sys.argv[2:]
# Print quoted command-line as response file.
for c in cmd:
print('"{}"'.format(c))