Skip to content

Instantly share code, notes, and snippets.

@fujii fujii/check.cpp
Created Sep 14, 2018

Embed
What would you like to do?
Bug 171618 – [Win][Meta] Build WebKit using Clang https://bugs.webkit.org/show_bug.cgi?id=171618
#include <iostream>
int main()
{
#if defined(_MSC_VER)
std::cout << "_MSC_VER: " << _MSC_VER << std::endl;
#else
std::cout << "_MSC_VER is not defined" << std::endl;
#endif
#if defined(__GNUC__)
std::cout << "__GNUC__: " << __GNUC__ << std::endl;
#else
std::cout << "__GNUC__ is not defined" << std::endl;
#endif
#if defined(__clang__)
std::cout << "__clang__: " << __clang__ << std::endl;
#else
std::cout << "__clang__ is not defined" << std::endl;
#endif
}
C:\clang-win>clang++ -v
clang version 8.0.0 (trunk)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\tools\llvm\bin
C:\clang-win>clang++ check.cpp
check-959ec2.o : warning LNK4217: locally defined symbol __std_terminate imported in function "int `public: static unsigned __int64 __cdecl std::char_traits<char>::length(char const * const)'::`1'::dtor$2" (?dtor$2@?0??length@?$char_traits@D@std@@SA_KQEBD@Z@4HA)
check-959ec2.o : warning LNK4217: locally defined symbol _CxxThrowException imported in function "public: void __cdecl std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QEAAXH_N@Z)
C:\clang-win>a.exe
_MSC_VER: 1914
__GNUC__ is not defined
__clang__: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.