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

Remove -fembed-bitcode flag #812

Merged
merged 1 commit into from
Sep 23, 2023

Conversation

keith
Copy link
Contributor

@keith keith commented Jun 5, 2023

Apple has recently stopped accepting apps built with any Xcode version below 14.1, and rejects apps built with bitcode starting with Xcode 14.

@keith
Copy link
Contributor Author

keith commented Jun 5, 2023

the only other case that's potentially ambiguous here is using LTO, where you might want the bitcode for that. How is this supposed to be handled by this? because also in the bitcode case this could produce only bitcode files and no object files instead

@keith
Copy link
Contributor Author

keith commented Jul 12, 2023

I'm less sure about that now actually, I'm not 100% sure how to tell if the embedded bitcode is being used in the case of LTO builds but with a quick test generating a -map file from the linker it doesn't appear to be using that

@thomcc
Copy link
Member

thomcc commented Jul 21, 2023

I don't believe we need to worry about cross-lang LTO, you pretty much have to do a bunch of special stuff to set that up anyway. I think this is correct, but ideally we'd detect the xcode version and do it based on that.

I have a patch that does that somewhere, but need to dig it out (I won't have time in the next couple weeks, maybe after)

@keith
Copy link
Contributor Author

keith commented Jul 25, 2023

I don't think we need to detect the Xcode version for this because Apple no longer accepts App Store submissions with anything other than Xcode 14.1+ so it's no longer possible to submit apps that include bitcode at all since Xcode 14.1 doesn't support it. Outside of the App store there shouldn't be any reason for folks to use bitcode

@thomcc
Copy link
Member

thomcc commented Jul 25, 2023

That seems reasonable. I'll merge this after the current release (which is quite large), I'm concerned it may have a large degree of fallout (if there's a mistake here), and would rather that not be confusable with all the other changes that are going to go into 1.80.

@keith
Copy link
Contributor Author

keith commented Jul 26, 2023

Sounds good, thanks! Feel free to cc me on any issues that arise

@thomcc
Copy link
Member

thomcc commented Sep 15, 2023

This conflicts but is worth doing. Mind rebasing?

@keith keith force-pushed the ks/remove-fembed-bitcode-flag branch from 61976c9 to fe35dba Compare September 15, 2023 22:56
@keith
Copy link
Contributor Author

keith commented Sep 15, 2023

rebased!

@thomcc
Copy link
Member

thomcc commented Sep 23, 2023

Ugh, sorry -- happened to merge changes before getting to this that broke it again. Can you rebase again?

Apple has recently stopped accepting apps built with any Xcode version
below 14.1, and rejects apps built with bitcode starting with Xcode 14.
@keith keith force-pushed the ks/remove-fembed-bitcode-flag branch from fe35dba to 91e514a Compare September 23, 2023 16:59
@keith
Copy link
Contributor Author

keith commented Sep 23, 2023

Done!

@thomcc
Copy link
Member

thomcc commented Sep 23, 2023

Hmmm... I'll merge this now, and look into the (certainly unrelated) CI bustage tomorrow...

@thomcc thomcc merged commit ffdf356 into rust-lang:main Sep 23, 2023
7 of 16 checks passed
@keith keith deleted the ks/remove-fembed-bitcode-flag branch October 23, 2023 19:16
@keith
Copy link
Contributor Author

keith commented Oct 23, 2023

Thanks!

@Augustyniak Augustyniak mentioned this pull request Nov 3, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 19, 2023
…orse, r=davidtwco

Remove legacy bitcode defaults from all Apple specs

Xcode 14 [deprecated bitcode with warnings](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes#Deprecations) and now [Xcode 15 has dropped it completely](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Deprecations). `rustc` should follow what the platform tooling is doing as well since it just increases binary sizes for no gain at this point.

`cc` made a [similar change last month](rust-lang/cc-rs#812).

Two things show this should have minimal impact:
- Apple has stopped accepting apps built with versions of Xcode (<14) that generate bitcode
- The app store has been stripping bitcode off IPA releases for over 2 years now.

I didn't nuke all the bitcode changes added in rust-lang#71970 since maybe another target in the future could need mandatory bitcode embedding.

Staticlibs built for iOS still link correctly with XCode 15 against a test app when using a compiler built from this branch.

cc `@thomcc` `@keith`
bors added a commit to rust-lang/miri that referenced this pull request Nov 21, 2023
…avidtwco

Remove legacy bitcode defaults from all Apple specs

Xcode 14 [deprecated bitcode with warnings](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes#Deprecations) and now [Xcode 15 has dropped it completely](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Deprecations). `rustc` should follow what the platform tooling is doing as well since it just increases binary sizes for no gain at this point.

`cc` made a [similar change last month](rust-lang/cc-rs#812).

Two things show this should have minimal impact:
- Apple has stopped accepting apps built with versions of Xcode (<14) that generate bitcode
- The app store has been stripping bitcode off IPA releases for over 2 years now.

I didn't nuke all the bitcode changes added in rust-lang/rust#71970 since maybe another target in the future could need mandatory bitcode embedding.

Staticlibs built for iOS still link correctly with XCode 15 against a test app when using a compiler built from this branch.

cc `@thomcc` `@keith`
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Apr 7, 2024
…avidtwco

Remove legacy bitcode defaults from all Apple specs

Xcode 14 [deprecated bitcode with warnings](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes#Deprecations) and now [Xcode 15 has dropped it completely](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Deprecations). `rustc` should follow what the platform tooling is doing as well since it just increases binary sizes for no gain at this point.

`cc` made a [similar change last month](rust-lang/cc-rs#812).

Two things show this should have minimal impact:
- Apple has stopped accepting apps built with versions of Xcode (<14) that generate bitcode
- The app store has been stripping bitcode off IPA releases for over 2 years now.

I didn't nuke all the bitcode changes added in rust-lang/rust#71970 since maybe another target in the future could need mandatory bitcode embedding.

Staticlibs built for iOS still link correctly with XCode 15 against a test app when using a compiler built from this branch.

cc `@thomcc` `@keith`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
…avidtwco

Remove legacy bitcode defaults from all Apple specs

Xcode 14 [deprecated bitcode with warnings](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes#Deprecations) and now [Xcode 15 has dropped it completely](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Deprecations). `rustc` should follow what the platform tooling is doing as well since it just increases binary sizes for no gain at this point.

`cc` made a [similar change last month](rust-lang/cc-rs#812).

Two things show this should have minimal impact:
- Apple has stopped accepting apps built with versions of Xcode (<14) that generate bitcode
- The app store has been stripping bitcode off IPA releases for over 2 years now.

I didn't nuke all the bitcode changes added in rust-lang/rust#71970 since maybe another target in the future could need mandatory bitcode embedding.

Staticlibs built for iOS still link correctly with XCode 15 against a test app when using a compiler built from this branch.

cc `@thomcc` `@keith`
bors pushed a commit to rust-lang-ci/rust that referenced this pull request May 20, 2024
This is a partial revert of 6d819a4
because rust-lang/cc-rs#812 removed this flag
entirely, meaning we shouldn't have to pass this manually anymore
bors added a commit to rust-lang-ci/rust that referenced this pull request May 20, 2024
…itcode-usage-now-that-it-s-deprecated, r=clubby789

Remove unnecessary -fembed-bitcode usage now that it's deprecated

This is a partial revert of 6d819a4 because rust-lang/cc-rs#812 removed this flag entirely, meaning we shouldn't have to pass this manually anymore
RalfJung pushed a commit to RalfJung/miri that referenced this pull request May 22, 2024
…age-now-that-it-s-deprecated, r=clubby789

Remove unnecessary -fembed-bitcode usage now that it's deprecated

This is a partial revert of 6d819a4b8f45b170e7c2c415df20cfa2e0cbbf7f because rust-lang/cc-rs#812 removed this flag entirely, meaning we shouldn't have to pass this manually anymore
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request May 24, 2024
…age-now-that-it-s-deprecated, r=clubby789

Remove unnecessary -fembed-bitcode usage now that it's deprecated

This is a partial revert of 6d819a4b8f45b170e7c2c415df20cfa2e0cbbf7f because rust-lang/cc-rs#812 removed this flag entirely, meaning we shouldn't have to pass this manually anymore
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.

None yet

2 participants