windows clang 编译Qt

准备:

qt-everywhere-src-5.15.0.zip

jom_1_1_3.zip

LLVM-10.0.0-win64.exe

VS2019:需要安装win10 SDK,也有自带的clang,没安装;

 

开始:

1、打开 x64 Native Tools Command Prompt

2、configure.bat -release -confirm-license -opensource -prefix "D:\Library\Qt5" -platform win32-clang-msvc -nomake examples -nomake tests -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-dbus

3、jom(3700X 16核编译,大约需要5分钟^_^)

4、jom install

 

使用感受:

windows上的clang有2个版本,基于g++(mingw)的win32-clang-g++和基于msvc的win32-clang-msvc,

默认情况下,win32-clang-msvc生成的dll文件体积要大于win32-g++,比如:

win32-g++版的Qt5Core 6.7M,win32-clang-msvc版的Qt5Core 9M;

而且,可执行文件的执行效率好像也不比mingw、msvc高……

总而言之,还是暂时放弃在windows上用clang吧,mingw和msvc更合适。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值