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-10204] CompileSwift normal arm64 hangs during archive build #52604

Closed
mman opened this issue Mar 27, 2019 · 7 comments
Closed

[SR-10204] CompileSwift normal arm64 hangs during archive build #52604

mman opened this issue Mar 27, 2019 · 7 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself optimized only Flag: An issue whose reproduction requires optimized compilation regression swift 5.0

Comments

@mman
Copy link

mman commented Mar 27, 2019

Previous ID SR-10204
Radar rdar://problem/48514339
Original Reporter @mman
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Xcode 10.2 (10E125) on macOS 10.14.4 (18E226)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 5.0Regression, OptimizedOnly
Assignee None
Priority Medium

md5: 85998c2f4089de75f5e05a63f5a6d7f1

Issue Description:

I have today migrated my project to Swift 5 (no changes) and it hangs during archive step in Xcode 10.2. The project uses default settings for release - that is Whole Module compilation mode, and optimize for speed.

If I change the compilation mode to incremental, everything compiles again.

Attached is a command that hangs and process sample from Activity Monitor.

@mman
Copy link
Author

mman commented Mar 27, 2019

  • Changing swift optimization mode to none or size will also make it archive nicely while keeping whole module compilation mode.
      • Worked fine in Xcode 10.1 with swift 4.2.1.
  • It looks like this hang is caused by a combination of swift 5 + whole module + -Ospeed

@belkadan
Copy link
Contributor

cc @bob-wilson, @eeckstein

@belkadan
Copy link
Contributor

Is it possible for you to share your project, either here or with just Apple engineers at https://bugreport.apple.com?

@eeckstein
Copy link
Member

This is a dup of rdar://problem/48514339

To workaround you can disable the optimization which causes the hang by adding the compile flags
-Xllvm -sil-disable-pass=access-enforcement-opts

@eeckstein
Copy link
Member

No need to share the project

@bob-wilson
Copy link

This was fixed in #23190

@mman
Copy link
Author

mman commented Mar 28, 2019

Thanks guys for your prompt response, just for the record I can confirm that adding ``-Xllvm -sil-disable-pass=access-enforcement-opts`` to Swift Custom Flags makes the project archive again.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself optimized only Flag: An issue whose reproduction requires optimized compilation regression swift 5.0
Projects
None yet
Development

No branches or pull requests

5 participants