-
Notifications
You must be signed in to change notification settings - Fork 215
[cxx-interop] Add driver support for -emit-clang-header-min-access
#2010
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
base: main
Are you sure you want to change the base?
Conversation
|
@swift-ci please test |
Sources/SwiftOptions/Options.swift
Outdated
| public static let emitClangHeaderMinAccess: Option = Option("-emit-clang-header-min-access", .separate, attributes: [.frontend, .noInteractive, .argumentIsPath, .cacheInvariant], metaVar: "<access-level>", helpText: "The minimum access level of declarations to include in the emitted header.>") | ||
| public static let emitClangHeaderNonmodularIncludes: Option = Option("-emit-clang-header-nonmodular-includes", .flag, attributes: [.frontend, .noInteractive, .supplementaryOutput], helpText: "Augment emitted Objective-C header with textual imports for every included modular import") | ||
| public static let emitClangHeaderPath: Option = Option("-emit-clang-header-path", .separate, alias: Option.emitObjcHeaderPath, attributes: [.frontend, .noInteractive, .argumentIsPath, .supplementaryOutput, .cacheInvariant], helpText: "Emit an Objective-C and C++ header file to <path>") | ||
| public static let emitClangHeaderMinAccess: Option = Option("-emit-clang-header-min-access", .separate, attributes: [.frontend, .noInteractive, .cacheInvariant], metaVar: "<access-level>", helpText: "The minimum access level of declarations to include in the emitted header") |
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.
Just in case: please ensure Options.swift is updated as follows:
https://github.com/swiftlang/swift-driver?tab=readme-ov-file#rebuilding-optionsswift
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.
Oh, I somehow missed that this file is generated. Thanks!
| try commandLine.appendLast(.clangBuildSessionFile, from: &parsedOptions) | ||
| } | ||
|
|
||
| try commandLine.appendLast(.emitClangHeaderMinAccess, from: &parsedOptions) |
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.
Please add a check to ensure we don't pass this flag to a compiler which does not support it.
| try commandLine.appendLast(.emitClangHeaderMinAccess, from: &parsedOptions) | |
| if isFrontendArgSupported(.emitClangHeaderMinAccess) { | |
| try commandLine.appendLast(.emitClangHeaderMinAccess, from: &parsedOptions) | |
| } |
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.
Fixed!
45ac397 to
b5fdd40
Compare
artemcm
left a comment
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.
Thanks!
This is a counterpart to swiftlang/swift#84816. rdar://159211965
b5fdd40 to
051e803
Compare
|
@swift-ci please test |
|
@swift-ci please test Windows |
This is a counterpart to swiftlang/swift#84816.
rdar://159211965