-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Run build tool plugins for C-family targets #6516
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
Conversation
@swift-ci please smoke test |
// MARK: - Compilation | ||
|
||
extension LLBuildManifestBuilder { | ||
private func addBuildToolPlugins(_ target: TargetBuildDescription) throws { |
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.
This is just extracted from computeSwiftCompileCmdInputs()
|
||
/// Shared functionality between `ClangTargetBuildDescription` and `SwiftTargetBuildDescription` with the eventual hope of having a single type. | ||
struct SharedTargetBuildDescription { | ||
static func computePluginGeneratedFiles( |
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.
This is just extracted from SwiftTargetBuildDescription
forgot to add the new file to the CMake build |
88582bf
to
cf2592f
Compare
@swift-ci please smoke test |
@swift-ci test windows |
Sources/Build/BuildDescription/ClangTargetBuildDescription.swift
Outdated
Show resolved
Hide resolved
6b2f4cf
to
8c4b5b2
Compare
@swift-ci please smoke test |
I may have accidentally removed an import during rebase. |
While we intentionally don't support generating C sources from plugins today since we haven't figured out how to deal with headers etc, not running plugins at all without any diagnostics whatsoever seems like an implementation oversight based on the fact that we have two completely different implementations for Swift and C-family targets (which is something we also need to rectify at some point). With this change, we're running build-tool plugins in the exact same way as we are doing it for Swift targets. We are only doing this for packages with tools-version 5.9 or higher in order to have any unintentional impact on existing packages. rdar://101671614 Co-authored-by: Max Desiatov <m_desiatov@apple.com>
8c4b5b2
to
7abffec
Compare
@swift-ci please smoke test |
@swift-ci please smoke test windows |
While we intentionally don't support generating C sources from plugins today since we haven't figured out how to deal with headers etc, not running plugins at all without any diagnostics whatsoever seems like an implementation oversight based on the fact that we have two completely different implementations for Swift and C-family targets (which is something we also need to rectify at some point).
With this change, we're running build-tool plugins in the exact same way as we are doing it for Swift targets. We are only doing this for packages with tools-version 5.9 or higher in order to have any unintentional impact on existing packages.
rdar://101671614