File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Sources/Commands/Utilities Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import PackageGraph
1616import PackageModel
1717import SPMBuildCore
1818import TSCBasic
19+ import DriverSupport
1920
2021/// A wrapper for swift-symbolgraph-extract tool.
2122public struct SymbolGraphExtract {
@@ -71,11 +72,14 @@ public struct SymbolGraphExtract {
7172 if includeSPISymbols {
7273 commandLine += [ " -include-spi-symbols " ]
7374 }
74- if emitExtensionBlockSymbols {
75- commandLine += [ " -emit-extension-block-symbols " ]
75+
76+ let extensionBlockSymbolsFlag = emitExtensionBlockSymbols ? " -emit-extension-block-symbols " : " -omit-extension-block-symbols "
77+ if DriverSupport . checkSupportedFrontendFlags ( flags: [ extensionBlockSymbolsFlag. trimmingCharacters ( in: [ " - " ] ) ] , fileSystem: fileSystem) {
78+ commandLine += [ extensionBlockSymbolsFlag]
7679 } else {
77- commandLine += [ " -omit-extension-block-symbols " ]
80+ print ( " warning: dropped \( extensionBlockSymbolsFlag ) flag because it is not supported by this compiler version " )
7881 }
82+
7983 switch outputFormat {
8084 case . json( let pretty) :
8185 if pretty {
You can’t perform that action at this time.
0 commit comments