• 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: Default build settings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default build settings


  • Subject: Re: Default build settings
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 13 Oct 2005 10:34:33 -0500


On 13 Oct 2005, at 8:56 AM, Andreas Grosam wrote:

For instance, when creating a static-library-target, these build- settings were set:

Debug: Optimization Level                    Fastest, Smallest
Debug: Generate Position-Dependend Code        <off not overridden>

IMO, Optimization Level should be None[-O0] in Debug-configurations,

Yes.

and -O2 or higher for Release.

No. The -O[0..3] options seem to provide an optimization "knob," and it's tempting just to grab it and turn it all the way up, but speed- optimized code tends to be much larger, and thus overruns caches more often than code optimized with -Os (fastest, smallest). Except in a few bottlenecks, -Os code will run faster on real machines than -O2 or -O3.


Generate Position-Dependend Code should be on for static libs, or do I miss something?

Position-dependent code is not usable in dynamic libraries. The template has no way of knowing whether the static library target will be a component in a dynamic library, and therefore has to preserve the option by generating position-independent code.


Dead Code Stripping should be on for static lib, at least for Release configurations, although this might cause trouble sometimes. Any objections not to do this per default?

Dead-code stripping implies that there is a reference tree, beginning at the __start symbol and static function pointers, from which the linker can determine what routines are not being used. The whole idea of a library is to collect a number of routines to reference from _outside_ the library; the useful parts aren't necessarily "live code" from the standpoint of the library.


    -- F

_______________________________________________
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


References: 
 >Default build settings (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Re: Speeding up XCode?
  • Next by Date: Re: java debugger
  • Previous by thread: Default build settings
  • Next by thread: Re: Default build settings
  • Index(es):
    • Date
    • Thread