Skip to content

Instantly share code, notes, and snippets.

@Master-Hash
Created May 1, 2021 14:05
Show Gist options
  • Save Master-Hash/e5413776698696e60cf30aaa428227b8 to your computer and use it in GitHub Desktop.
Save Master-Hash/e5413776698696e60cf30aaa428227b8 to your computer and use it in GitHub Desktop.
clang mingw compile args
clang \
-target i686-w64-mingw32 \
-nostdinc \
-fno-exceptions \
-isystem /opt/compiler/llvm-3.6/bin/../lib/clang/3.6.0/include \
-isystem /opt/compiler/mingw-w64/i686-w64-mingw32/include \
-isystem /opt/compiler/mingw-w64/i686-w64-mingw32/include/c++/4.9.2 \
-isystem /opt/compiler/mingw-w64/i686-w64-mingw32/include/c++/4.9.2/backward \
-isystem /opt/compiler/mingw-w64/i686-w64-mingw32/include/c++/4.9.2/i686-w64-mingw32
clang++ \
--target=x86_64-pc-mingw32 \
-I /usr/x86_64-w64-mingw32/sys-root/mingw/include \
-I /usr/x 86_64-w64-mingw32/sys-root/mingw/lib/gcc/x86_64-w64-mingw32 \
-L /usr/x86_64-w64-mingw32/sys-root/mingw/lib/gcc/x86_64-w64-mingw32/9.2.0 \
-I /usr/x86_64-w64-mingw32/sys-root/mingw/lib/gcc/x86_64-w64-mingw32/9.2.0/include/c++ \
-I /usr/x86_64-w64-mingw32/sys-root/mingw/lib/gcc/x86_64-w64-mingw32/9.2.0/include/c++/x86_64-w64-mingw32 \
-O2 \
-march=native \
-o clang.exe \
hello.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment