准备:
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更合适。