Clang: Difference between revisions
Jump to navigation
Jump to search
Enable all warnings:
(→Tips) |
|||
Line 4: | Line 4: | ||
* https://github.com/mstorsjo/llvm-mingw |
* https://github.com/mstorsjo/llvm-mingw |
||
: The best port of LLVM/Clang on Windows I tried. Does not require Visual Studio for linking. Support UBSAN ( |
: The best port of LLVM/Clang on Windows I tried. Does not require Visual Studio for linking. Support UBSAN (for 32-bit and 64-bit targets). |
||
* MSYS2 |
* MSYS2 |
Revision as of 00:04, 18 November 2019
Links
Clang on Windows
- The best port of LLVM/Clang on Windows I tried. Does not require Visual Studio for linking. Support UBSAN (for 32-bit and 64-bit targets).
- MSYS2
- MSYS2 now provides clang 9.0 packages. No deps on VS but they don't provide UBSAN apparently.
Tips
Get Stack Pointer
Use this macro [1]:
#define current_stack_pointer ({ \
register unsigned long esp asm("esp"); \
asm("" : "=r"(esp)); \
esp; \
})
Turn errors into warning
-Wno-error=foo Turn warning “foo” into an warning even if -Werror is specified.
Enable all warnings: -Weverything
-Weverything
means enable all current and future warnings. See Better Apps with Clang's Weverything or Wall is a Lie!