• 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: static library function inlining
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static library function inlining


  • Subject: Re: static library function inlining
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 16 Mar 2004 14:26:08 -0800

On Mar 16, 2004, at 12:25 PM, Shaun Wexler wrote:

I have several functions which are common to all targets in a project, and I want them to be inlined (rubber-stamped), ie to fall-thru with no blr or register swapping. What I thought would work is to place them into a static library, and link that library into all frameworks and other targets. I built the static lib target with Library Style = static, -seg1addr 0xb3000000, -falign-loops=16, and even tried -finline-functions which I thought would be unnecessary in the lib. Both Fix And Continue or ZeroLink are always disabled, in all targets and styles. I linked to libSKWStatic.a in all other targets. Upon inspection of the deployment's disassembled code, the functions are being called thru a _dylib_ stub, and are not inline! The compiler and linker don't seem to be respecting -finline-functions which I have set in all build styles. What else might I be doing wrong?!!

Inlining has to be done during compilation, not linking. Your projects that share the common functions each have to include the headers and sources of those functions, and not a static library containing them. The functions should be marked in the headers with the C inline keyword. You don't need -finline-functions; the keyword does the job.


Chris
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: static library function inlining
      • From: Shaun Wexler <email@hidden>
References: 
 >static library function inlining (From: Shaun Wexler <email@hidden>)

  • Prev by Date: Re: Question
  • Next by Date: Re: static library function inlining
  • Previous by thread: static library function inlining
  • Next by thread: Re: static library function inlining
  • Index(es):
    • Date
    • Thread