Clang is a compiler front end for the C, C++, and Objective-C programming languages, using the Low Level Virtual Machine (LLVM) as its back end. The goal is to offer a replacement to the GNU Compiler Collection (GCC) software stack.
To compile wine with Clang, use:
#!/bin/bash export CC=clang export CXX=clang export CFLAGS="-std=gnu89 -g" ./configure make
Using Wine 1.8 and Clang 3.7.0, the Wine code was built successfully. As Clang is developing fast, it's recommended to use new releases.
|Bug||Wine bug url||clang bug url||Workaround|
|Can't build wine in 64-bit mode||n/a||http://llvm.org/bugs/show_bug.cgi?id=8851 (resolved fixed)|
|Clang doesn't support ms_hook_prologue||n/a||http://llvm.org/bugs/show_bug.cgi?id=10212|
|Dragonegg fails to compile loader/preloader.c||http://bugs.winehq.org/show_bug.cgi?id=28050||http://llvm.org/bugs/show_bug.cgi?id=11173 (resolved fixed)|
Static analyzer bugs
- static analyzer + wine = Assertion `Loc.isMacroID() && "Not a macro expansion loc!"' failed (1/3)
- static analyzer + wine = 'Assertion `T->isIntegerType() || Loc::isLocType(T)' failed' (2/3)
- static analyzer + wine = 'Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!' (3/3)
- StaticAnalysis - Using the Clang Static Analyzer
- Bugs found using Clang/LLVM
- Clang meta-bug for Wine
- Dragonegg meta-bug for Wine