Hi Fabian,

On Sun, Sep 04, 2016 at 05:06:56PM +0200, Fabian Groffen wrote:

> I've patched the function to return / in case xcodebuild returns nothing
> useful, such that we fall back to /usr/include, which makes the whole
> thing compile for me.

Well, I'd like to stress again that having Command Line Tools selected
as the currently selected Xcode does not seem to be supported by the
llvm cmake build system in Apple mode. As far as it's concerned someone
building llvm needs to have a proper Xcode selected using xcode-select
-s so it can find the SDKs within it.

Is it actually possible to have only Command Line Tools installed
(without Xcode) and get stuff to compile? I'm quite sure it was not in
the olden days (<= 10.6).

Also, I don't understand why there's a separate instance of the Command
Line Tools somewhere in /Library and how it happens to be the default
"Xcode" for some/most people. And also2, I don't understand why
xcode-select even accepts it as a parameter for -s. This is all very
weird.

Anyway, I thought of your solution as well while paddling along the
Peene. :) But on second thought I was wondering if we shouldn't patch
any SDK selection and osx-min-version/OSX_DEPLOYMENT_TARGET for the host
system (!) out of llvm/clang for prefix altogether. Prefix is always
meant for the host system, right? Without any of this selection stuff,
the compiler will fall back to the default include paths like
/usr/include anyways and we eliminate a whole lot of possible grief in
the future. IIRC I did this for 3.4.2 for exactly that reason but that
got lost on the move to cmake some time around 3.7, I think.

The only place I can think of where we'd need SDKs in the context of
prefix is if we wanted to provide a fully cross-capable Apple-like
toolchain for iOS and WatchOS and stuff like that. While binutils-apple
should be able to provide that I guess no-one's ever even tested or
played with it in that direction. And again, we'd need a proper Xcode
installed and selected to find and use the proper SDKs for that. Full
circle...
-- 
Thanks, Micha
Ich mag Kaba!

Reply via email to