[PATCH] D30183: Add -iframeworkwithsysroot compiler option
This revision was automatically updated to reflect the committed changes. Closed by commit rL297614: Add -iframeworkwithsysroot compiler option (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D30183?vs=89152=91534#toc Repository: rL LLVM https://reviews.llvm.org/D30183 Files: cfe/trunk/include/clang/Driver/Options.td cfe/trunk/lib/Frontend/CompilerInvocation.cpp cfe/trunk/test/Frontend/iframework.c Index: cfe/trunk/include/clang/Driver/Options.td === --- cfe/trunk/include/clang/Driver/Options.td +++ cfe/trunk/include/clang/Driver/Options.td @@ -1524,6 +1524,11 @@ HelpText<"Add directory to AFTER include search path">; def iframework : JoinedOrSeparate<["-"], "iframework">, Group, Flags<[CC1Option]>, HelpText<"Add directory to SYSTEM framework search path">; +def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">, + Group, + HelpText<"Add directory to SYSTEM framework search path, " + "absolute paths are relative to -isysroot">, + MetaVarName<"">, Flags<[CC1Option]>; def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group, Flags<[CC1Option]>, HelpText<"Include macros from file before parsing">, MetaVarName<"">; def image__base : Separate<["-"], "image_base">; Index: cfe/trunk/test/Frontend/iframework.c === --- cfe/trunk/test/Frontend/iframework.c +++ cfe/trunk/test/Frontend/iframework.c @@ -1,4 +1,5 @@ // RUN: %clang -fsyntax-only -iframework %S/Inputs %s -Xclang -verify +// RUN: %clang -fsyntax-only -isysroot %S -iframeworkwithsysroot /Inputs %s -Xclang -verify // expected-no-diagnostics #include Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp === --- cfe/trunk/lib/Frontend/CompilerInvocation.cpp +++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp @@ -1507,6 +1507,9 @@ !A->getOption().matches(OPT_iwithsysroot)); for (const Arg *A : Args.filtered(OPT_iframework)) Opts.AddPath(A->getValue(), frontend::System, true, true); + for (const Arg *A : Args.filtered(OPT_iframeworkwithsysroot)) +Opts.AddPath(A->getValue(), frontend::System, /*IsFramework=*/true, + /*IgnoreSysRoot=*/false); // Add the paths for the various language specific isystem flags. for (const Arg *A : Args.filtered(OPT_c_isystem)) Index: cfe/trunk/include/clang/Driver/Options.td === --- cfe/trunk/include/clang/Driver/Options.td +++ cfe/trunk/include/clang/Driver/Options.td @@ -1524,6 +1524,11 @@ HelpText<"Add directory to AFTER include search path">; def iframework : JoinedOrSeparate<["-"], "iframework">, Group, Flags<[CC1Option]>, HelpText<"Add directory to SYSTEM framework search path">; +def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">, + Group, + HelpText<"Add directory to SYSTEM framework search path, " + "absolute paths are relative to -isysroot">, + MetaVarName<"">, Flags<[CC1Option]>; def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group, Flags<[CC1Option]>, HelpText<"Include macros from file before parsing">, MetaVarName<"">; def image__base : Separate<["-"], "image_base">; Index: cfe/trunk/test/Frontend/iframework.c === --- cfe/trunk/test/Frontend/iframework.c +++ cfe/trunk/test/Frontend/iframework.c @@ -1,4 +1,5 @@ // RUN: %clang -fsyntax-only -iframework %S/Inputs %s -Xclang -verify +// RUN: %clang -fsyntax-only -isysroot %S -iframeworkwithsysroot /Inputs %s -Xclang -verify // expected-no-diagnostics #include Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp === --- cfe/trunk/lib/Frontend/CompilerInvocation.cpp +++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp @@ -1507,6 +1507,9 @@ !A->getOption().matches(OPT_iwithsysroot)); for (const Arg *A : Args.filtered(OPT_iframework)) Opts.AddPath(A->getValue(), frontend::System, true, true); + for (const Arg *A : Args.filtered(OPT_iframeworkwithsysroot)) +Opts.AddPath(A->getValue(), frontend::System, /*IsFramework=*/true, + /*IgnoreSysRoot=*/false); // Add the paths for the various language specific isystem flags. for (const Arg *A : Args.filtered(OPT_c_isystem)) ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D30183: Add -iframeworkwithsysroot compiler option
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Hi Alex, Thanks for taking a look a this. LGTM Repository: rL LLVM https://reviews.llvm.org/D30183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D30183: Add -iframeworkwithsysroot compiler option
arphaman added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D30183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D30183: Add -iframeworkwithsysroot compiler option
arphaman created this revision. This patch adds support for a new `-iframeworkwithsysroot` compiler option which allows the user to specify a framework path that can be prefixed with the sysroot. This option is similar to the `-iwithsysroot` option that exists to supplement `-isystem`. Repository: rL LLVM https://reviews.llvm.org/D30183 Files: include/clang/Driver/Options.td lib/Frontend/CompilerInvocation.cpp test/Frontend/iframework.c Index: test/Frontend/iframework.c === --- test/Frontend/iframework.c +++ test/Frontend/iframework.c @@ -1,4 +1,5 @@ // RUN: %clang -fsyntax-only -iframework %S/Inputs %s -Xclang -verify +// RUN: %clang -fsyntax-only -isysroot %S -iframeworkwithsysroot /Inputs %s -Xclang -verify // expected-no-diagnostics #include Index: lib/Frontend/CompilerInvocation.cpp === --- lib/Frontend/CompilerInvocation.cpp +++ lib/Frontend/CompilerInvocation.cpp @@ -1505,6 +1505,9 @@ !A->getOption().matches(OPT_iwithsysroot)); for (const Arg *A : Args.filtered(OPT_iframework)) Opts.AddPath(A->getValue(), frontend::System, true, true); + for (const Arg *A : Args.filtered(OPT_iframeworkwithsysroot)) +Opts.AddPath(A->getValue(), frontend::System, /*IsFramework=*/true, + /*IgnoreSysRoot=*/false); // Add the paths for the various language specific isystem flags. for (const Arg *A : Args.filtered(OPT_c_isystem)) Index: include/clang/Driver/Options.td === --- include/clang/Driver/Options.td +++ include/clang/Driver/Options.td @@ -1524,6 +1524,11 @@ HelpText<"Add directory to AFTER include search path">; def iframework : JoinedOrSeparate<["-"], "iframework">, Group, Flags<[CC1Option]>, HelpText<"Add directory to SYSTEM framework search path">; +def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">, + Group, + HelpText<"Add directory to SYSTEM framework search path, " + "absolute paths are relative to -isysroot">, + MetaVarName<"">, Flags<[CC1Option]>; def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group, Flags<[CC1Option]>, HelpText<"Include macros from file before parsing">, MetaVarName<"">; def image__base : Separate<["-"], "image_base">; Index: test/Frontend/iframework.c === --- test/Frontend/iframework.c +++ test/Frontend/iframework.c @@ -1,4 +1,5 @@ // RUN: %clang -fsyntax-only -iframework %S/Inputs %s -Xclang -verify +// RUN: %clang -fsyntax-only -isysroot %S -iframeworkwithsysroot /Inputs %s -Xclang -verify // expected-no-diagnostics #include Index: lib/Frontend/CompilerInvocation.cpp === --- lib/Frontend/CompilerInvocation.cpp +++ lib/Frontend/CompilerInvocation.cpp @@ -1505,6 +1505,9 @@ !A->getOption().matches(OPT_iwithsysroot)); for (const Arg *A : Args.filtered(OPT_iframework)) Opts.AddPath(A->getValue(), frontend::System, true, true); + for (const Arg *A : Args.filtered(OPT_iframeworkwithsysroot)) +Opts.AddPath(A->getValue(), frontend::System, /*IsFramework=*/true, + /*IgnoreSysRoot=*/false); // Add the paths for the various language specific isystem flags. for (const Arg *A : Args.filtered(OPT_c_isystem)) Index: include/clang/Driver/Options.td === --- include/clang/Driver/Options.td +++ include/clang/Driver/Options.td @@ -1524,6 +1524,11 @@ HelpText<"Add directory to AFTER include search path">; def iframework : JoinedOrSeparate<["-"], "iframework">, Group, Flags<[CC1Option]>, HelpText<"Add directory to SYSTEM framework search path">; +def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">, + Group, + HelpText<"Add directory to SYSTEM framework search path, " + "absolute paths are relative to -isysroot">, + MetaVarName<"">, Flags<[CC1Option]>; def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group, Flags<[CC1Option]>, HelpText<"Include macros from file before parsing">, MetaVarName<"">; def image__base : Separate<["-"], "image_base">; ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits