-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Option] Add a feature flag for -Isystem #81964
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
[Option] Add a feature flag for -Isystem #81964
Conversation
swift-build needs a flag to know if -Isystem is available. rdar://152540225
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just check on swift driver side for if a frontend flag is available? Or is this more involved?
I don't think so, swift-build uses the current version of swift-driver that knows about Isystem, but it uses an old version of swift-frontend that doesn't know about it. |
Related to swiftlang/swift-build#553 |
@swift-ci smoke test |
Merged? What are you going to do on build system side if flag is not available? Pass as "-F" instead? You can eat the unsupported flag in swift driver and pass it as something else. I don't like a small thing like a flag available is listed as feature and we need to teach build system about it but I don't exactly know what you want to do. This implementation is also fine so no need to revert. |
I enabled auto-merge and it merged with no approvals. 🤦♂️
No, pass as |
The driver queries the toolchain's compiler at the beginning of planning to get supported flags. And then throughout the driver code we use:
And swift-build, similarly, can query which flags its driver supports. |
Iiinteresting. That's awkward to hook up in SwiftCompilerSpec since that doesn't have a Driver, but I like the idea of swapping the flag in the driver and then we don't need this feature flag. Let me see if I can get that going today and then revert this and the swift-build adoption too. |
Although... If |
swift-build needs a flag to know if -Isystem is available.
rdar://152540225