diff options
author | Chris Lattner <sabre@nondot.org> | 2010-08-24 21:09:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-08-24 21:09:16 +0000 |
commit | 9db9ad3f084d3c70cff01a10d4fd90901982b37b (patch) | |
tree | 25be15c5394344494e8ba4d6b71e0c3aeb6032d6 | |
parent | ef52bcb606c73950139a775af61495f63fbc3603 (diff) |
Implement -iwithsysroot, an apple extension which is a close cousin of -isystem.
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
-rw-r--r-- | include/clang/Driver/CC1Options.td | 3 | ||||
-rw-r--r-- | include/clang/Driver/Options.td | 2 | ||||
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index fabb29b622..9a22c21dc1 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -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>">, diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 45bea9c186..54944ebf7b 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -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]>; diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 7622eb7906..f0a9bf457f 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -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); |