]> granicus.if.org Git - clang/commitdiff
Implement -iwithsysroot, an apple extension which is a close cousin of -isystem.
authorChris Lattner <sabre@nondot.org>
Tue, 24 Aug 2010 21:09:16 +0000 (21:09 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Aug 2010 21:09:16 +0000 (21:09 +0000)
Instead of implementing -isystem, I accidentally implemented this cousin.  Next
up is to implement -isystem right.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111966 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CC1Options.td
include/clang/Driver/Options.td
lib/Frontend/CompilerInvocation.cpp

index fabb29b6222b5d1f4734bed631c39ed332c0420d..9a22c21dc1dbd85b86ee7b58426c2c1b21176a05 100644 (file)
@@ -502,6 +502,9 @@ def iquote : JoinedOrSeparate<"-iquote">, MetaVarName<"<directory>">,
   HelpText<"Add directory to QUOTE include search path">;
 def isystem : JoinedOrSeparate<"-isystem">, MetaVarName<"<directory>">,
   HelpText<"Add directory to SYSTEM include search path">;
+def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">,MetaVarName<"<directory>">,
+  HelpText<"Add directory to SYSTEM include search path, "
+           "absolute paths are relative to -isysroot">;
 def iprefix : JoinedOrSeparate<"-iprefix">, MetaVarName<"<prefix>">,
   HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">;
 def iwithprefix : JoinedOrSeparate<"-iwithprefix">, MetaVarName<"<dir>">,
index 45bea9c186a208096956caf12a88a21db27be515..54944ebf7bc9d9f3e149bbe0397192961487a6eb 100644 (file)
@@ -423,7 +423,7 @@ def isysroot : JoinedOrSeparate<"-isysroot">, Group<clang_i_Group>;
 def isystem : JoinedOrSeparate<"-isystem">, Group<clang_i_Group>;
 def iwithprefixbefore : JoinedOrSeparate<"-iwithprefixbefore">, Group<clang_i_Group>;
 def iwithprefix : JoinedOrSeparate<"-iwithprefix">, Group<clang_i_Group>;
-def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">, Group<i_Group>;
+def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">, Group<clang_i_Group>;
 def i : Joined<"-i">, Group<i_Group>;
 def keep__private__externs : Flag<"-keep_private_externs">;
 def l : JoinedOrSeparate<"-l">, Flags<[LinkerInput, RenderJoined]>;
index 7622eb79064c635dc99a3f7d0200362116a8a047..f0a9bf457f85e33be116f8e97b870dbf1b59ee4a 100644 (file)
@@ -1173,7 +1173,7 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
   for (arg_iterator it = Args.filtered_begin(OPT_iquote),
          ie = Args.filtered_end(); it != ie; ++it)
     Opts.AddPath((*it)->getValue(Args), frontend::Quoted, true, false);
-  for (arg_iterator it = Args.filtered_begin(OPT_isystem),
+  for (arg_iterator it = Args.filtered_begin(OPT_isystem, OPT_iwithsysroot),
          ie = Args.filtered_end(); it != ie; ++it)
     Opts.AddPath((*it)->getValue(Args), frontend::System, true, false);