Skip to content
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

fix: set alwayslink = True #1385

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

brentleyjones
Copy link
Collaborator

@brentleyjones brentleyjones commented Dec 6, 2024

This matches SPM’s behavior. It’s needed to create dynamic frameworks from rspm targets.

@brentleyjones
Copy link
Collaborator Author

I'll wait until #1389 lands, since the test fixtures will be easier after that.

@brentleyjones brentleyjones marked this pull request as draft December 9, 2024 14:48
auto-merge was automatically disabled December 9, 2024 14:48

Pull request was converted to draft

* If a modulemap needs to be generated (i.e. one isn’t provided by the target), we always generate it instead of letting rules_swift generate it for Swift targets; this ensures we have consistent and non-duplicate modulemaps
* Generated modulemaps are now nested in a similar way to rules_swift, preventing them from being picked up accidentally
* We no longer generate a modulemap for Swift targets, and instead use the `swift.propagate_generated_module_map` feature
* We no longer create another target for the Objective-C resource module accessor; this aligns with how SPM does it and removes another target that could try to generate a modulemap
* The parent target for clang targets is now only an aggregator (i.e. it doesn’t have headers of its own), preventing it from complicating the build graph
* The parent target for clang targets includes the generated modulemap as a child dep, removing the need to generate a noop modulemap
* When detecting a custom modulemap, we only consider the public includes paths, preventing accidentally picking up errant modulemaps

Signed-off-by: Brentley Jones <[email protected]>
This matches SPM’s behavior. It’s needed to create dynamic frameworks from rspm targets.

Signed-off-by: Brentley Jones <[email protected]>
@brentleyjones brentleyjones force-pushed the bj/fix-set-alwayslink-true branch from d7076ad to 1e37651 Compare December 9, 2024 19:18
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.

1 participant