Skip to content

Commit 200563c

Browse files
committed
Option: add -libc as an option for Swift tools
Ensure that we process `-libc` in `swift-symbolgraph-extract` and `swift-api-extract`. This option is used by Windows to determine the C ABI to use and thus impacts the ABI exposed by the ClangImporter to the Swift interface. This partially enables the use of `swift package dump-symbol-graph` on Windows.
1 parent eebc983 commit 200563c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/swift/Option/Options.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,9 @@ def enable_app_extension : Flag<["-"], "application-extension">,
834834
Flags<[FrontendOption, NoInteractiveOption]>,
835835
HelpText<"Restrict code to those available for App Extensions">;
836836

837-
def libc : Separate<["-"], "libc">, HelpText<"libc runtime library to use">;
837+
def libc : Separate<["-"], "libc">,
838+
Flags<[SwiftAPIExtractOption, SwiftSymbolGraphExtractOption]>,
839+
HelpText<"libc runtime library to use">;
838840

839841
// Linker options
840842

0 commit comments

Comments
 (0)