-
Notifications
You must be signed in to change notification settings - Fork 341
Turn off PCM validation by default. #9051
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
Turn off PCM validation by default. #9051
Conversation
@swift-ci test |
e42ef0c
to
1998272
Compare
In our conversation last week, I thought it was said that validation would be on by default. If the default is to be disabled, should it only be disabled for explicit modules? Another thought: the validation checks warning/diagnostic flags, which we know we want to disable, but also checks language options (and target options, etc), which I'm not sure we want to disable. Should we add logic into the validation so that we can take the safer action of disabling only warnings/diagnostics validation? |
@@ -26,6 +26,9 @@ let Definition = "target_experimental" in { | |||
def SwiftAllowExplicitModules: Property<"swift-allow-explicit-modules", "Boolean">, | |||
DefaultTrue, | |||
Desc<"Allows explicit module flags to be passed through to ClangImporter.">; | |||
def SwiftPCMValidation: Property<"swift-pcm-validation", "Boolean">, | |||
DefaultFalse, | |||
Desc<"Enable validation when loading Clang PCM files (-fvalidate-pch, -fmodules-check-relocated).">; |
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 from memory, but I believe pch validation gates the module relocation checks. In other words, disabling pch validation should make it unnecessary to explicitly disable module-check-relocated.
Would it make sense to keep "on" in debug/assert builds, an defaulting to "off" for release builds? |
These diagnostics are useful when debugging LLDB and project configurations, but in a live debug session they mostly get in the way. Especially when using explicit modules mismatches in warning options caused by implicitly triggered imports are not really actionable fo users outside of clearing their module cache and trying again. rdar://130284825
1998272
to
babe4b2
Compare
I think I addressed everyone's review comments. It's now set to |
@swift-ci test |
@swift-ci test windows |
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.
LGTM. I don't mind the AutoBool
but I wonder if we don't have "better" support for LLDB's LazyBool
.
Great question, I basically copied & pasted this from another setting assuming that that's the way. |
These diagnostics are useful when debugging LLDB and project configurations, but in a live debug session they mostly get in the way. Especially when using explicit modules mismatches in warning options caused by implicitly triggered imports are not really actionable fo users outside of clearing their module cache and trying again.
rdar://130284825