Skip to content

[Clang Importer] Set IsSystem module flag for Clang input files when precompiling a clang module #34297

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

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Oct 13, 2020

This flag is important when we are pre-building system modules to be loaded later in Explicit Module Builds.
Resolves rdar://70212660

@artemcm artemcm requested review from nkcsgexi and allevato October 13, 2020 23:44
@artemcm
Copy link
Contributor Author

artemcm commented Oct 13, 2020

@swift-ci please test

Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

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

Can you add a test that builds one of the Warnings* modules in test/ClangImporter/Inputs/cusom-modules/module.map, with and without the -fsystem-module flag, and verifies that diagnostics are only emitted when the flag is not present, to make sure we never accidentally drop this flag?

@nkcsgexi nkcsgexi requested a review from beccadax October 14, 2020 01:44
Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me! Is there any way we could add a test for this to prevent future regression? If not in the compiler repo, we could also add a test to the swift-driver repo instead.

@artemcm artemcm force-pushed the PreCompileSystemPCMs branch from cf862b3 to 9fd82f7 Compare October 14, 2020 17:18
@artemcm
Copy link
Contributor Author

artemcm commented Oct 14, 2020

@swift-ci please test

Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for addressing this!

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9fd82f778a0350e7219b229ef826333a486d2318

@artemcm artemcm force-pushed the PreCompileSystemPCMs branch from 9fd82f7 to e0d3cfa Compare October 14, 2020 18:41
@artemcm
Copy link
Contributor Author

artemcm commented Oct 14, 2020

@swift-ci please smoke test

@artemcm
Copy link
Contributor Author

artemcm commented Oct 14, 2020

@swift-ci please smoke test macOS Platform

@artemcm
Copy link
Contributor Author

artemcm commented Oct 14, 2020

@swift-ci please smoke test Windows Platform

@artemcm
Copy link
Contributor Author

artemcm commented Oct 14, 2020

@swift-ci please smoke test macOS Platform

@artemcm
Copy link
Contributor Author

artemcm commented Oct 14, 2020

@swift-ci please smoke test macOS Platform

@artemcm
Copy link
Contributor Author

artemcm commented Oct 14, 2020

@swift-ci please smoke test Windows Platform

@artemcm
Copy link
Contributor Author

artemcm commented Oct 15, 2020

@swift-ci please smoke test macOS Platform

@artemcm
Copy link
Contributor Author

artemcm commented Oct 15, 2020

@swift-ci please smoke test Windows Platform

@artemcm
Copy link
Contributor Author

artemcm commented Oct 15, 2020

@swift-ci please smoke test macOS Platform

@artemcm
Copy link
Contributor Author

artemcm commented Oct 15, 2020

@swift-ci please smoke test Windows Platform

…precompiling a clang module

This bit is important when we are pre-building system modules to be loaded later in Explicit Module Builds.
@artemcm artemcm force-pushed the PreCompileSystemPCMs branch from e0d3cfa to 7ce04dc Compare October 15, 2020 19:23
@artemcm
Copy link
Contributor Author

artemcm commented Oct 15, 2020

@swift-ci please smoke test

@artemcm
Copy link
Contributor Author

artemcm commented Oct 15, 2020

@swift-ci please smoke test Windows Platform

@artemcm artemcm merged commit faa6289 into swiftlang:main Oct 15, 2020
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.

5 participants