r241432 - Teach mingw toolchain the msys2 mingw-w64 distribution C++ dirs.
Yaron Keren
yaron.keren at gmail.com
Mon Jul 13 13:53:47 PDT 2015
Re-reading, the problem is with using #ifdef inside the conditional or
using the #ifdef at all?
2015-07-13 22:33 GMT+03:00 Yaron Keren <yaron.keren at gmail.com>:
> Sure.
> What is the proper way to write code that depends on clang host without
> using the #defines?
>
>
>
> 2015-07-13 19:57 GMT+03:00 Joerg Sonnenberger <joerg at britannica.bec.de>:
>
>> On Mon, Jul 13, 2015 at 06:54:50PM +0300, Yaron Keren wrote:
>> > --- tools/clang/lib/Driver/MinGWToolChain.cpp (revision 242033)
>> > +++ tools/clang/lib/Driver/MinGWToolChain.cpp (working copy)
>> > @@ -24,8 +24,10 @@
>> > : ToolChain(D, Triple, Args) {
>> > getProgramPaths().push_back(getDriver().getInstalledDir());
>> >
>> > + llvm::SmallString<1024> LibDir;
>> > if (getDriver().SysRoot.size())
>> > Base = getDriver().SysRoot;
>> > +#ifdef LLVM_ON_WIN32
>> > else if (llvm::ErrorOr<std::string> GPPName =
>>
>> Please don't introduce such conditionals.
>>
>> Joerg
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150713/efb82b7e/attachment.html>
More information about the cfe-commits
mailing list