Skip to content

Make SWIFT_STDLIB_ENABLE_LTO flag apply LTO to C/C++ compile flags too #38959

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

kubamracek
Copy link
Contributor

No description provided.

@kubamracek kubamracek requested a review from gottesmm August 19, 2021 18:04
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek
Copy link
Contributor Author

kubamracek commented Aug 19, 2021

...and if I read the code right, SWIFTLIB_SINGLE_TARGET_LIBRARY is actually always set now? Maybe it would make sense to remove it? (I can do that in a subsequent PR if that's desirable.)

@kubamracek kubamracek requested a review from compnerd August 19, 2021 23:00
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a4058ce

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - a4058ce

@kubamracek kubamracek requested a review from edymtt August 20, 2021 18:29
Copy link
Contributor

@edymtt edymtt left a comment

Choose a reason for hiding this comment

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

This sounds reasonable to me -- this function only handles target libraries, TARGET_LIBRARY seems now a meaningless parameter (legacy of the old function that used to handle also host libraries)

We do have an instance when this function is called without TARGET_LIBRARY

https://github.com/apple/swift/blob/5f268cceab6afb4c3415c14cb7cb3328d25dccdb/stdlib/private/BlocksRuntimeStubs/CMakeLists.txt#L14

but since we are building for the target this seems an oversight (another hint that this parameter is redundant)

@kubamracek
Copy link
Contributor Author

#38978

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek merged commit 14b3b38 into swiftlang:main Aug 21, 2021
@kubamracek kubamracek deleted the stdlib-lto-apply-to-cpp-files-too branch August 21, 2021 21:30
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