Skip to content

[ABIChecking] Use -Isystem and -Fsystem for swift-api-digester #1933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ian-twilightcoder
Copy link
Contributor

@ian-twilightcoder ian-twilightcoder commented Jun 17, 2025

swift-api-digester supports the Swift -Fsystem and -Isystem flags, switch to those.

rdar://152747553

swift-api-digester supports the Swift -Fsystem and -Isystem flags, switch to those.

rdar://152747553
@ian-twilightcoder ian-twilightcoder force-pushed the swift-api-digester-args branch from 56a89f5 to 3f3a67d Compare June 18, 2025 22:25
@ian-twilightcoder
Copy link
Contributor Author

@swift-ci test

@ian-twilightcoder
Copy link
Contributor Author

Depends on swiftlang/swift#82283

commandLine.appendFlag(.iframework)
commandLine.appendFlag(systemFramework.argument.asSingle)
}
try commandLine.appendAll(.I, .Isystem, from: &parsedOptions)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we do not have a way to test whether the selected toolchain's swift-api-digester supports this as a SwiftAPIDigesterOption. Since the flag itself is not new to the compiler, what happens when this gets passed to a swift-api-digester which predates swiftlang/swift#82283?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to swiftlang/swift#82283 the argument will just be lost because the digester won't try to read -Isystem or -Fsystem. There's nothing in swiftscan that I can see to get api-digester args. The strings it returns from swiftscan_compiler_supported_arguments_query don't include the flags like SwiftAPIDigesterOption. And swift-api-digester doesn't support -emit-supported-features either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW though, swift-build doesn't currently use -iframework, -Fsystem, or -Isystem when it makes digester jobs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swiftpm also doesn't use -iframework in its digester jobs, as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants