• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Link-time optimization and static libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Link-time optimization and static libraries


  • Subject: Re: Link-time optimization and static libraries
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 10 Dec 2015 09:44:28 -0800


On Dec 9, 2015, at 5:09 PM, Jens Alfke <email@hidden> wrote:

Now I’m wondering if LTO also affects the initial code generation, or maybe the metadata in the .o files. Does it need to be enabled for all targets that contribute code (.o files) to the binary being linked?

Follow-up: It appears that it does. Once I enabled LTO in the targets that build the static libraries, it took effect in the app, as indicated by much longer link times and slightly faster performance.

On the downside, it looks like LTO breaks some of the debug information: once I turned it on, when I stop at a breakpoint/crash in the app I can no longer see the source code of stack frames in the library code compiled with LTO; I just get disassembly. Is there a workaround for that?

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Link-time optimization and static libraries
      • From: Daniel Vollmer <email@hidden>
References: 
 >Link-time optimization and static libraries (From: Jens Alfke <email@hidden>)

  • Prev by Date: Link-time optimization and static libraries
  • Next by Date: Xcode 7.2 / iOS 9.2 xcodebuild wrong architecture for simulator builds?
  • Previous by thread: Link-time optimization and static libraries
  • Next by thread: Re: Link-time optimization and static libraries
  • Index(es):
    • Date
    • Thread