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

[SR-14109] Not possible to build cross-platform Swift libraries with optional assembly code #4452

Open
Lukasa opened this issue Jan 26, 2021 · 5 comments
Labels

Comments

@Lukasa
Copy link
Contributor

Lukasa commented Jan 26, 2021

Previous ID SR-14109
Radar rdar://problem/73742495
Original Reporter @Lukasa
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 01915d10b315e2ff379d4577b7597796

Issue Description:

Derived from SwiftNIO SSL issue #251.

Some Apple platforms require app submission using bitcode, a non-final representation of the binary artefact. Bitcode submissions have a number of constraints that don't apply to binary submission. One of these is that they must not contain any raw assembly code, either as blocks or as complete files. Importantly, the compiler will reject the mere presence of any .s/.S files in the build tree, even if those files are empty and contribute no object data to the build.

SwiftPM supports mixed C/assembly targets, and SwiftNIO SSL uses this support. This mostly works great, unless someone wants to ship a watchOS app using SwiftNIO SSL (a supported platform). Here the mixed C/assembly files cause a fatal build error.

We need a way to exclude assembly files using SwiftPM depending on the deployment target that does not rely on kicking those files out to a separate target.

@Lukasa
Copy link
Contributor Author

Lukasa commented Jan 26, 2021

@swift-ci create

@swift-ci
Copy link
Contributor

Comment by David E. Weekly (JIRA)

AFAICT this being unresolved means that watchOS apps can't use gRPC, because the gRPC library requires swift-nio-ssl.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
@asauray
Copy link

asauray commented Sep 18, 2022

any updates on this issue ?

@neonichu
Copy link
Member

I'm guessing this may become irrelevant with the deprecation of bitcode?

@Lukasa
Copy link
Contributor Author

Lukasa commented Sep 20, 2022

Yes, that seems likely to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants