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

Chandler Carruth chandlerc at google.com
Mon Oct 18 01:37:23 PDT 2010


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101018/f9cd6c48/attachment.html>


More information about the cfe-dev mailing list