mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
14 lines
334 B
Python
Executable File
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))
|