Skip to content

[ABIChecker] Use -Isystem and -Fsystem for swift-api-digester #82283

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

Use the Swift -Fsystem flag for swift-api-digester instead of the clang -iframework flag. Add support for -Isystem for parity.

rdar://152747420

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

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

Code change LGTM. You probably want to get the swift driver change in before compiler dropping the flag, or support both flags for a while but change swift-driver to prefer -Isystem and -Fsystem.

@ian-twilightcoder
Copy link
Contributor Author

Code change LGTM. You probably want to get the swift driver change in before compiler dropping the flag, or support both flags for a while but change swift-driver to prefer -Isystem and -Fsystem.

Is it good enough to land the swift-driver change at the same time, or should we support both for a little while?

@cachemeifyoucan
Copy link
Contributor

Is it good enough to land the swift-driver change at the same time, or should we support both for a little while?

We need to support mismatched version for a while. SwiftDriver can be ahead or behind. The compatibility can be done in compiler or driver or both, just need to support mismatch. I don't know when APIDigester is used so maybe we can have a even smaller range of mismatched version.

@ian-twilightcoder ian-twilightcoder force-pushed the swift-api-digester-args branch from 333c6fd to fb9f842 Compare June 17, 2025 19:24
@ian-twilightcoder
Copy link
Contributor Author

Is it good enough to land the swift-driver change at the same time, or should we support both for a little while?

We need to support mismatched version for a while. SwiftDriver can be ahead or behind. The compatibility can be done in compiler or driver or both, just need to support mismatch. I don't know when APIDigester is used so maybe we can have a even smaller range of mismatched version.

Alright, putting -iframework back.

Use the Swift -Fsystem flag for swift-api-digester instead of the clang -iframework flag. Add support for -Isystem for parity.

rdar://152747420
@ian-twilightcoder ian-twilightcoder force-pushed the swift-api-digester-args branch from fb9f842 to abd02ac Compare June 17, 2025 21:56
@ian-twilightcoder
Copy link
Contributor Author

@swift-ci smoke test

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

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

Other than one file change. Otherwise LGTM.

parser.add_argument('-Fsystem', '-iframework',
dest='system_framework_dirs', metavar='DIR',
action='append', default=[],
parser.add_argument('-Fsystem', dest='system_framework_dirs',
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the input argument to swift_buil_sdk_interfaces.py which I think is deprecated already. @artemcm @nkcsgexi Is that correct?

Seems irrelevant to your fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I maybe have been a little too enthusiastic about removing -iframework. I'm still kind of tempted to drop it here, but I can put it back if you think that's better.

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