Clang

From WineHQ Wiki
Jump to: navigation, search

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

Current Status

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.

Known bugs

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

See also