Skip to content

Commit fc43acd

Browse files
committed
[swift-api-dump] Add support for -F/-I arguments.
1 parent 9832468 commit fc43acd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

utils/swift-api-dump.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def create_parser():
8383
parser.add_argument('-o', '--output-dir', default=os.getcwd(), help='Directory to which the output will be emitted.')
8484
parser.add_argument('-q', '--quiet', action='store_true', help='Suppress printing of status messages.')
8585
parser.add_argument('-v', '--verbose', action='store_true', help='Print extra information.')
86+
parser.add_argument('-F', '--framework-dir', action='append', help='Add additional framework directories')
87+
parser.add_argument('-I', '--include-dir', action='append', help='Add additional include directories')
8688
return parser
8789

8890
def output_command_result_to_file(command_args, filename):
@@ -229,6 +231,14 @@ def main():
229231

230232
cmd_common = [args.swift_ide_test, '-print-module', '-source-filename', source_filename, '-module-print-skip-overlay', '-skip-unavailable', '-skip-print-doc-comments']
231233

234+
# Add -F / -I arguments.
235+
if args.framework_dir:
236+
for path in args.framework_dir:
237+
cmd_common = cmd_common + ['-F', path]
238+
if args.include_dir:
239+
for path in args.include_dir:
240+
cmd_common = cmd_common + ['-I', path]
241+
232242
# Determine the set of extra arguments we'll use.
233243
extra_args = ['-skip-imports']
234244
if args.swift_3:

0 commit comments

Comments
 (0)