Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

qmake: When setting QMAKE_CXX = clang++ qmake is using g++ for linking

When using QMAKE_CXX = clang++ to force use of clang on a system where both gcc and clang is installed, clang++ is used for compiling the .cpp files but g++ is used for the final linking. This makes problems when UBSAN is used since g++ does not know clang option -fsanitize=unsigned-integer-overflow. How to force qmake to use clang for linking too?

like image 568
user3224237 Avatar asked Oct 23 '25 18:10

user3224237


1 Answers

You need to specify QMAKE_LINK=clang++ in addition to what you have specified for QMAKE_CXX.

like image 109
Ruslan Avatar answered Oct 26 '25 15:10

Ruslan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!