• 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: Using llvm with Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using llvm with Xcode


  • Subject: Re: Using llvm with Xcode
  • From: Devang Patel <email@hidden>
  • Date: Mon, 27 Aug 2007 10:32:44 -0700


On Aug 27, 2007, at 9:40 AM, Jesper Papmehl-Dufay wrote:

I am using the 10.4 SDK.
I have installed llvm in a subfolder of my home directory,

I assume you built llvm yourself and used configure time option -- prefix to select installation location.


and then placed symlinks to llvm-gcc and llvm-g++ in /usr/bin.

ok.


Is there anything else I need to do?

I'm afraid I won't be able to give you perfect solution. SDKs are installed at /Developer/SDKs. GCC is finding float.h at
/MacOSX10.4.0.sdk/usr/include/float.h


GCC constructs this path using following two components

1) Based on SDK selection /Developer/SDKs/MacOSX10.4.0.sdk
2) Based on install location /usr, it searches for system header in $ {SDKPATH}/usr/include .


In llvm-gcc's case, install location is not /usr/include but something else hence it is not finding float.h If you use -v command line option then it will list paths being used to search header. One approach is to create appropriate symlinks in /Developer/SDKs/MacOSX. 10.4.0.sdk to link /Developer/SDKs/usr/include/float.h. But be warned, this is not an elegant way and it may not work and restoring original status may not be straight forward.

I don't think the installation instructions for llvm are exactly clear in this regard... :)

Yes.

If you do not use SDKs then does it work ?

-
Devang

Thanks!

/Jesper

24 aug 2007 kl. 20.24 skrev Devang Patel:


On Aug 24, 2007, at 10:04 AM, Jesper Papmehl-Dufay wrote:

Thanks for the quick reply!

Yes, that's much easier! :) I wasn't aware of the CC/CPLUSPLUS.

Unfortunately, I now run into other problems. I'm sorry if this is maybe getting a bit off-topic; hopefully, I'm not the only Xcode user interested in using llvm.

When precompiling my prefix file, I get a few errors about some system headers that cannot be found.
For example, my prefix file includes stdarg.h, and that file in itself can be found, but it contains the following line:
#include_next <stdarg.h>
and llvm cannot found _that_ copy of stdarg.h.
I have the same problem with float.h (which is included by a header in the Carbon framework which I include).


Is there some way to make llvm to behave more like gcc when it comes to finding system header files?

llvm-gcc uses gcc front-end so it behaves like gcc. However, depending upon your llvm-gcc install location, it may not be able to find system headers associated with SDKs. Are you using SDK ?


-
Devang




_______________________________________________ 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: Using llvm with Xcode
      • From: Jesper Papmehl-Dufay <email@hidden>
References: 
 >Using llvm with Xcode (From: Jesper Papmehl-Dufay <email@hidden>)
 >Re: Using llvm with Xcode (From: Devang Patel <email@hidden>)
 >Re: Using llvm with Xcode (From: Jesper Papmehl-Dufay <email@hidden>)
 >Re: Using llvm with Xcode (From: Devang Patel <email@hidden>)
 >Re: Using llvm with Xcode (From: Jesper Papmehl-Dufay <email@hidden>)

  • Prev by Date: File Header Commenting Template
  • Next by Date: RE: Xcode default "Install Permissions", clean "permission denied"
  • Previous by thread: Re: Using llvm with Xcode
  • Next by thread: Re: Using llvm with Xcode
  • Index(es):
    • Date
    • Thread