Skip to content

[SwiftSyntax] Enable Package CMO if possible #75304

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
Jul 20, 2024

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jul 17, 2024

Update for swiftlang/swift-syntax#2736

The compiler crashes when compiling swift files importing package-cmo enabled .swiftmodule. Avoid that by not-using .swiftmodule.

@rintaro
Copy link
Member Author

rintaro commented Jul 17, 2024

swiftlang/swift-syntax#2736
@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Jul 17, 2024

swiftlang/swift-syntax#2736
@swift-ci Please smoke test macOS

@rintaro rintaro force-pushed the swiftsyntax-package-cmo branch from a18777c to 7a2883e Compare July 17, 2024 21:25
@rintaro rintaro requested a review from a team as a code owner July 17, 2024 21:25
@rintaro rintaro force-pushed the swiftsyntax-package-cmo branch from 7a2883e to ff74dee Compare July 17, 2024 21:28
The compiler crashes when compiling swift files importing package-cmo
enabled '.swiftmodule'. Avoid that by not-using '.swiftmodule'.
@rintaro rintaro force-pushed the swiftsyntax-package-cmo branch from ff74dee to f0808e5 Compare July 17, 2024 21:29
@rintaro
Copy link
Member Author

rintaro commented Jul 17, 2024

swiftlang/swift-syntax#2736
@swift-ci Please smoke test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Jul 17, 2024

swiftlang/swift-syntax#2736
@swift-ci Please smoke test

@rintaro rintaro changed the title [SwiftSyntax] Workaround a crash [SwiftSyntax] Enable Package CMO if possible Jul 17, 2024
endfunction()

# Test if the Swift compiler supports -disable-implicit-<module>-module-import.
macro(swift_supports_implicit_module module_name out_var)
Copy link
Contributor

Choose a reason for hiding this comment

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

(Optional) There is a function with the same name in cmake/modules/SwiftImplicitImport.cmake -- we may consider folding that into this new implementation.

Copy link
Member Author

@rintaro rintaro Jul 18, 2024

Choose a reason for hiding this comment

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

This PR does remove cmake/modules/SwiftImplicitImport.cmake and replaces swift_supports_implicit_module function with this new implementation.

@rintaro rintaro merged commit 2c63bf2 into swiftlang:main Jul 20, 2024
3 checks passed
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.

3 participants