[cfe-dev] Distinguishing between clang Window versions

Reid Kleckner rnk at google.com
Wed Jul 9 11:40:58 PDT 2014


On Wed, Jul 9, 2014 at 7:09 AM, Edward Diener <
eldlistmailingz at tropicsoft.com> wrote:
>
> I see where a build of clang on Windows using VC++ produces both clang.exe
> and clang-cl.exe and that they are both the same executables. Nonetheless
> depending on the -target ( or default -target ) passed to the clang driver
> we have different build expectations in Boost Build. In Windows When the
> target mode is VC++ clang emulates VC++ in various ways and when the target
> mode is mingw/gcc clang emulates mingw/gcc. Even with the latter on Windows
> there are a few subtle differences from clang on Linux. That is why Boost
> Build needs to treat them differently from within its .jam files.


What kinds of properties of a compiler do you normally check in Boost
Build?  If you're willing to do a test compile, you can look for '#if
defined(__clang__) && defined(_MSC_VER)' or '#if defined(__clang__) &&
defined(__GNUC__)'.

There are some who believe that in the future we should stop defining these
macros for other compilers, but personally I don't see it happening.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140709/cc8884b4/attachment.html>


More information about the cfe-dev mailing list