<div dir="ltr">On Fri, Jun 17, 2016 at 12:45 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looks like this broke a few bots:<br></blockquote><div><br></div><div>Yeah, sorry about that. It should all be cleared up by now (I had a couple of follow ups to make the test more generic).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/7311" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/7311</a><br>
<br>
Cheers,<br>
Rafael<br>
<br>
<br>
On 17 June 2016 at 13:23, Saleem Abdulrasool via cfe-commits<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
> Author: compnerd<br>
> Date: Fri Jun 17 12:23:16 2016<br>
> New Revision: 273016<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=273016&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=273016&view=rev</a><br>
> Log:<br>
> Driver: introduce and use `-isystem-after` for cross-windows<br>
><br>
> This mirrors the many other -i*after options to insert a new system search<br>
> directory at the end of the search path. This makes it possible to actually<br>
> inject a search path after the resource dir. This option is similar in spirit<br>
> to the /imsvc option in the clang-cl driver. This is needed to properly use the<br>
> driver for Windows targets where the clang headers wrap some of the system<br>
> headers.<br>
><br>
> This concept is actually useful on other targets (e.g. Linux) and would be<br>
> really easy to support on the core toolchain.<br>
><br>
> Modified:<br>
> cfe/trunk/include/clang/Driver/Options.td<br>
> cfe/trunk/lib/Driver/CrossWindowsToolChain.cpp<br>
> cfe/trunk/lib/Driver/Tools.cpp<br>
> cfe/trunk/test/Driver/windows-cross.c<br>
><br>
> Modified: cfe/trunk/include/clang/Driver/Options.td<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=273016&r1=273015&r2=273016&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=273016&r1=273015&r2=273016&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/include/clang/Driver/Options.td (original)<br>
> +++ cfe/trunk/include/clang/Driver/Options.td Fri Jun 17 12:23:16 2016<br>
> @@ -1277,6 +1277,9 @@ def isysroot : JoinedOrSeparate<["-"], "<br>
> def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>,<br>
> Flags<[CC1Option]>,<br>
> HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">;<br>
> +def isystem_after : JoinedOrSeparate<["-"], "isystem-after">,<br>
> + Group<clang_i_Group>, Flags<[DriverOption]>, MetaVarName<"<directory>">,<br>
> + HelpText<"Add directory to end of the SYSTEM include search path">;<br>
> def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>,<br>
> HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">,<br>
> Flags<[CC1Option]>;<br>
><br>
> Modified: cfe/trunk/lib/Driver/CrossWindowsToolChain.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CrossWindowsToolChain.cpp?rev=273016&r1=273015&r2=273016&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CrossWindowsToolChain.cpp?rev=273016&r1=273015&r2=273016&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Driver/CrossWindowsToolChain.cpp (original)<br>
> +++ cfe/trunk/lib/Driver/CrossWindowsToolChain.cpp Fri Jun 17 12:23:16 2016<br>
> @@ -62,6 +62,8 @@ AddClangSystemIncludeArgs(const llvm::op<br>
> llvm::sys::path::append(ResourceDir, "include");<br>
> addSystemInclude(DriverArgs, CC1Args, ResourceDir);<br>
> }<br>
> + for (const auto &P : DriverArgs.getAllArgValues(options::OPT_isystem_after))<br>
> + addSystemInclude(DriverArgs, CC1Args, P);<br>
> addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include");<br>
> }<br>
><br>
><br>
> Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=273016&r1=273015&r2=273016&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=273016&r1=273015&r2=273016&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
> +++ cfe/trunk/lib/Driver/Tools.cpp Fri Jun 17 12:23:16 2016<br>
> @@ -502,6 +502,13 @@ void Clang::AddPreprocessingOptions(Comp<br>
> << A->getAsString(Args);<br>
> }<br>
> }<br>
> + } else if (A->getOption().matches(options::OPT_isystem_after)) {<br>
> + // Handling of paths which must come late. These entries are handled by<br>
> + // the toolchain itself after the resource dir is inserted in the right<br>
> + // search order.<br>
> + // Do not claim the argument so that the use of the argument does not<br>
> + // silently go unnoticed on toolchains which do not honour the option.<br>
> + continue;<br>
> }<br>
><br>
> // Not translated, render as usual.<br>
><br>
> Modified: cfe/trunk/test/Driver/windows-cross.c<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/windows-cross.c?rev=273016&r1=273015&r2=273016&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/windows-cross.c?rev=273016&r1=273015&r2=273016&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/test/Driver/windows-cross.c (original)<br>
> +++ cfe/trunk/test/Driver/windows-cross.c Fri Jun 17 12:23:16 2016<br>
> @@ -67,3 +67,10 @@<br>
> // CHECK-SANITIZE-TSAN: error: unsupported argument 'tsan' to option 'fsanitize='<br>
> // CHECK-SANITIZE-TSAN-NOT: "-fsanitize={{.*}}"<br>
><br>
> +// RUN: %clang -### -target armv7-windows-itanium -isystem-after "Windows Kits/10/Include/10.0.10586.0/ucrt" -isystem-after "Windows Kits/10/Include/10.0.10586.0/um" -isystem-after "Windows Kits/10/Include/10.0.10586.0/shared" -c %s -o /dev/null 2>&1 \<br>
> +// RUN: | FileCheck %s --check-prefix CHECK-ISYSTEM-AFTER<br>
> +// CHECK-ISYSTEM-AFTER: "-internal-isystem" "{{.*}}/clang/3.9.0/include"<br>
> +// CHECK-ISYSTEM-AFTER: "-internal-isystem" "Windows Kits/10/Include/10.0.10586.0/ucrt"<br>
> +// CHECK-ISYSTEM-AFTER: "-internal-isystem" "Windows Kits/10/Include/10.0.10586.0/um"<br>
> +// CHECK-ISYSTEM-AFTER: "-internal-isystem" "Windows Kits/10/Include/10.0.10586.0/shared"<br>
> +<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>
</div></div>