如果我想在 Windows 下用 gcc 构建 qt,configure 选项是 -platform win32-g++,但是当我想用 clang 构建 qt 时,选项是什么?
问问题
2791 次
1 回答
2
clang/windows 组合没有。我假设人们可以很容易地将 win32-g++ 修改为 win32-clang,遵循 linux-g++ 和 linux-clang 之间的差异:
diff -w -u ../linux-g++/qmake.conf ./qmake.conf
--- ../linux-g++/qmake.conf 2012-11-20 16:38:28.000000000 +0100
+++ ./qmake.conf 2012-11-20 16:38:28.000000000 +0100
@@ -1,12 +1,16 @@
#
-# qmake configuration for linux-g++
+# qmake configuration for linux-clang
#
MAKEFILE_GENERATOR = UNIX
-CONFIG += incremental gdb_dwarf_index
+CONFIG += incremental
+
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
-include(../common/g++-unix.conf)
+include(../common/clang.conf)
+
+QMAKE_LFLAGS += -ccc-gcc-name g++
+
load(qt_config)
diff -w -u ../linux-g++/qplatformdefs.h ./qplatformdefs.h
--- ../linux-g++/qplatformdefs.h 2013-01-28 17:42:15.170318229 +0100
+++ ./qplatformdefs.h 2013-01-28 17:42:15.170318229 +0100
@@ -67,6 +66,7 @@
#include <grp.h>
#include <pwd.h>
#include <signal.h>
+#include <dlfcn.h>
#include <sys/types.h>
#include <sys/ioctl.h>
于 2013-01-29T09:15:47.830 回答