[cfe-dev] Why does -isysroot on darwin almost act like --sysroot?

Bob Wilson bob.wilson at apple.com
Mon Oct 18 09:05:28 PDT 2010


This is a Darwin "feature".  See http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00292.html and GCC PR18555 for some more info.

On Oct 18, 2010, at 1:37 AM, Chandler Carruth wrote:

> I'm looking at adding --sysroot support to Clang, but I'm a little confused by the current -isysroot behavior.
> 
> I had originally assumed that when moving from the driver to cc1, we would split sysroot into lib-only and include-only modes, and the include-only would be the existing -isysroot, and the lib-only would need to be added. However, inside of the Darwin tools, I noticed that -isysroot is actually used when searching for libstdc++, and is translated into -syslibroot when the linker is invoked? Was that intentional, or was it merely expedient due to the lack of a proper --sysroot flag that is meant to apply to both headers and libraries? In adding sysroot, should I switch Darwin over or not?
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list