Skip to content

Instantly share code, notes, and snippets.

@martell
Last active June 11, 2016 07:34
Show Gist options
  • Save martell/0610948571084f6b097314af029f63ee to your computer and use it in GitHub Desktop.
Save martell/0610948571084f6b097314af029f63ee to your computer and use it in GitHub Desktop.
libc++ and libc++abi
../usr/bin/x86_64-w64-mingw32-clang++ -stdlib=libc++ -c test.cpp -v
clang version 3.9.0 (trunk 272330) (llvm/trunk 272334)
Target: x86_64--windows-gnu
Thread model: posix
InstalledDir: /Users/martell/llvm/usr/bin
"/Users/martell/llvm/usr/bin/clang-3.9" -cc1 -triple x86_64--windows-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 264.3.102 -momit-leaf-frame-pointer -v -dwarf-column-info -debugger-tuning=gdb -coverage-file /Users/martell/llvm/scripts/test.cpp -resource-dir /Users/martell/llvm/usr/bin/../lib/clang/3.9.0 -internal-isystem /Users/martell/llvm/usr/include/c++/v1 -internal-isystem /Users/martell/llvm/usr/bin/../lib/clang/3.9.0/include -internal-isystem /Users/martell/llvm/usr/x86_64-w64-mingw32/include -internal-isystem /Users/martell/llvm/usr/include -fdeprecated-macro -fdebug-compilation-dir /Users/martell/llvm/scripts -ferror-limit 19 -fmessage-length 204 -fno-use-cxa-atexit -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c++ test.cpp
clang -cc1 version 3.9.0 based upon LLVM 3.9.0svn default target x86_64-apple-darwin15.5.0
#include "..." search starts here:
#include <...> search starts here:
/Users/martell/llvm/usr/include/c++/v1
/Users/martell/llvm/usr/bin/../lib/clang/3.9.0/include
/Users/martell/llvm/usr/x86_64-w64-mingw32/include
/Users/martell/llvm/usr/include
End of search list.
"/Users/martell/llvm/usr/bin/lld" -flavor gnu -m i386pep -Bdynamic -o a.exe
/Users/martell/llvm/usr/x86_64-w64-mingw32/lib/crt2.o
/Users/martell/llvm/usr/x86_64-w64-mingw32/lib/crtbegin.o
-L/Users/martell/llvm/usr/x86_64-w64-mingw32/lib
-L/Users/martell/llvm/usr/lib
-L/Users/martell/llvm/usr/x86_64-w64-mingw32/sys-root/mingw/lib test.o
-lc++ -lc++abi -lmsvcrt
-lmingw32 /Users/martell/llvm/usr/bin/../lib/clang/3.9.0/lib/windows/libclang_rt.builtins-x86_64.a
-lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32
/Users/martell/llvm/usr/x86_64-w64-mingw32/lib/crtend.o
Hello World!
#if !defined(_WIN32)
#error Only Windows targets are supported!
#endif
#ifndef __cplusplus
# error Only a C++ compiler can be used!
#endif
#include <iostream>
int main()
{
std::cout << "Hello World!";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment