Skip to content

[SourceKit] Don't use clang build sessions when validation is disabled #31013

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Apr 14, 2020

Don't use -fbuild-session-timestamp if -disable-modules-validate-system-headers is specified.

Since system header validation happens under OR condition of ValidateSystemInputs and ModulesValidateOncePerBuildSession, using build sessions effectively overrides -disable-modules-validate-system-headers.

rdar://problem/61075677

@rintaro
Copy link
Member Author

rintaro commented Apr 14, 2020

@swift-ci Please smoke test

@rintaro rintaro requested a review from akyrtzi April 14, 2020 17:16
// RUN: -shell -- cp -R %S/../Inputs/build_session/Frameworks_modified/FooHelper.framework %t/System/Frameworks/ == \
// RUN: -shell -- echo '## TWO' == \
// RUN: -req=sema %s -- %s -D TWO -Fsystem %t/System/Frameworks -module-cache-path %t/ModuleCache -Xfrontend -disable-modules-validate-system-headers \
// RUN: | tee %t.result | %FileCheck %s --check-prefix=CHECK_DISABLED
Copy link
Member Author

@rintaro rintaro Apr 14, 2020

Choose a reason for hiding this comment

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

Remove tee %t.result | . That was for debugging.

@rintaro rintaro force-pushed the sourcekit-buildsession-implicit-rdar61075677 branch from c8e5c71 to d868e51 Compare April 14, 2020 17:37
Don't use '-fbuild-session-timestamp' if
'-disable-modules-validate-system-headers' is specified.

Since system header validation happens under *OR* condition of
'ValidateSystemInputs' and 'ModulesValidateOncePerBuildSession', using
build sessions effectively overrides it.

rdar://problem/61075677
@rintaro rintaro force-pushed the sourcekit-buildsession-implicit-rdar61075677 branch from d868e51 to f943a88 Compare April 14, 2020 17:38
@rintaro
Copy link
Member Author

rintaro commented Apr 14, 2020

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Apr 14, 2020

@swift-ci Please smoke test Windows

@rintaro rintaro merged commit bd7eb1c into swiftlang:master Apr 14, 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.

2 participants