Skip to content

[CMake] Enable package CMO if possible #2736

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

Package cross-module-optimization allows non-resilient access between modules as long as they share the same package name.

@rintaro rintaro requested review from ahoppen and bnbarham as code owners July 17, 2024 20:10
@@ -77,8 +77,28 @@ function(add_swift_syntax_library name)
-emit-module-path;${module_file};
-emit-module-source-info-path;${module_sourceinfo_file};
-emit-module-interface-path;${module_interface_file};
-emit-private-module-interface-path;${module_private_interface_file}
-emit-private-module-interface-path;${module_private_interface_file};
-no-verify-emitted-module-interface
Copy link
Member Author

Choose a reason for hiding this comment

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

Without this, the driver invokes -frontend -typecheck-module-from-interface job and that emits confusing warnings:

<unknown>:0: warning: ignoring -experimental-allow-non-resilient-access (overriden by -compile-module-from-interface or -typecheck-module-from-interface)
<unknown>:0: warning: ignoring -experimental-package-cmo (requires -experimental-allow-non-resilient-access)

Copy link
Contributor

Choose a reason for hiding this comment

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

If they are just warnings, is it necessary to opt out of interface verification? We should just fix the diagnostics and I don't want you to get stuck with a configuration where the module interface is not verified (new problems with generated interface could escape as a result).

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, it's not really necessary to disable.

Package cross-module-optimization allows non-resilient access between
modules as long as they share the same package name.
@rintaro rintaro force-pushed the cmake-package-cmo branch from bbaa838 to 5a090ce Compare July 17, 2024 22:19
@rintaro
Copy link
Member Author

rintaro commented Jul 18, 2024

swiftlang/swift#75304
@swift-ci Please test

@rintaro rintaro merged commit d181e99 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.

4 participants