Build QT for MacOS separately in Debug and Release configuration:
tar xf qt-everywhere-src-6.4.2.tar.xz
cd ~/build/qt
export MY_QT_SRC_DIR=~/repos/qt-everywhere-src-6.4.2
export MY_MODE=release
#export MY_MODE=debug
export MY_INSTALL_PATH=~/libs/QT6.4/${MY_MODE}/MacOs
${MY_QT_SRC_DIR}/configure -prefix $MY_INSTALL_PATH -c++std c++20 -opensource -confirm-license \
-static -static-runtime -${MY_MODE} -force-debug-info \
-no-openssl -securetransport -DQT_NO_EXCEPTIONS=1 \
-skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity \
-skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua \
-skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects \
-skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland \
-skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech -skip qtlocation \
-skip qthttpserver \
-- -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
&& cmake --build . --parallel \
&& cmake --install .