Skip to content

CMake: on Darwin be explicit about inclusion in the dyld shared cache #70856

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
Jan 29, 2024

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Jan 11, 2024

This entails passing a linker flags to Apple linkers when the standard library is not meant for inclusion in such cache.

For this to have effect on every library, propagate link flags when building _Concurrency and Observation.

This is needed for Apple internal configurations.

Addresses rdar://120653968

@edymtt
Copy link
Contributor Author

edymtt commented Jan 11, 2024

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Jan 11, 2024

@swift-ci please build toolchain

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

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

Do we need to use the generator expressions here? I might be missing something so correct me if I'm wrong, but it looks like these are configuration-time booleans? If it is, can we stick with if statements? They're easier to debug since they show up in the output of --trace-expand instead of having to track it down in the build.ninja file.

@edymtt edymtt force-pushed the edymtt/darwin-stdlib-shared-cache branch from efb9f7c to fc60c6c Compare January 15, 2024 21:01
@edymtt
Copy link
Contributor Author

edymtt commented Jan 15, 2024

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Jan 15, 2024

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Jan 15, 2024

I used generator expressions based on the feedback on a past PR that dealt with linker flags, assuming it was the preferred approach going forward -- likely I missed the context there and thought I could apply that verbatim here.

Reworked this in fc60c6c

To answer your second question: yes, I'm using configuration-time booleans.

@edymtt edymtt force-pushed the edymtt/darwin-stdlib-shared-cache branch from fc60c6c to abac682 Compare January 17, 2024 17:26
@edymtt
Copy link
Contributor Author

edymtt commented Jan 17, 2024

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Jan 17, 2024

@swift-ci please build toolchain

@edymtt edymtt marked this pull request as ready for review January 22, 2024 21:56
@edymtt edymtt requested review from phausler, ktoso and a team as code owners January 22, 2024 21:56
@edymtt
Copy link
Contributor Author

edymtt commented Jan 22, 2024

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Jan 22, 2024

@swift-ci please build toolchain

Copy link
Contributor

@Azoy Azoy left a comment

Choose a reason for hiding this comment

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

Looks good to me, does this also need to add LINK_FLAGS to the Synchronization module?

This entails passing a linker flags to Apple linkers when the standard
library is not meant for inclusion in such cache.

For this to have effect on every library, propagate link flags when
building _Concurrency and Observation.

This is needed for Apple internal configurations.

Addresses rdar://120653968
@edymtt edymtt force-pushed the edymtt/darwin-stdlib-shared-cache branch from abac682 to d84140d Compare January 23, 2024 17:48
@edymtt
Copy link
Contributor Author

edymtt commented Jan 23, 2024

Good point, I totally forgot to check Synchronization when marking this PR as ready to review -- tackling that in d84140d (and adding the missing newline while I'm at it)

@edymtt
Copy link
Contributor Author

edymtt commented Jan 23, 2024

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Jan 23, 2024

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Jan 23, 2024

@swift-ci please build toolchain Windows

@edymtt edymtt merged commit 28e2f07 into swiftlang:main Jan 29, 2024
meg-gupta pushed a commit to meg-gupta/swift that referenced this pull request Jan 29, 2024
…swiftlang#70856)

This entails passing a linker flags to Apple linkers when the standard
library is not meant for inclusion in such cache.

For this to have effect on every library, propagate link flags when
building _Concurrency and Observation.

This is needed for Apple internal configurations.

Addresses rdar://120653968
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