From 7910dd0a548cdd9e7c5716d4f6704b3185fa34fb Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 17 Jan 2019 15:39:32 +0100 Subject: Add llvm linker detection to configure https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01240.html This is currently only used for webengine, where link time really matters. New configure options: * force 'lld' '-linker lld' or' --linker=lld' * force 'gold' '-linker gold' or '--linker=gold' * force 'bfd' '-linker bfd' or '--linker=bfd' Note before by default gold was always forced (if supported) now default linker is system default one. [ChangeLog][Tools][configure & build system] Added --linker=[bfg,lld,gold] configure flag. Change-Id: Idaa13510da70243c6176b96db846d629cd65c7af Reviewed-by: Kai Koehne --- configure.pri | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure.pri') diff --git a/configure.pri b/configure.pri index df890a7c49..d92653885f 100644 --- a/configure.pri +++ b/configure.pri @@ -1026,6 +1026,14 @@ defineTest(qtConfOutput_crossCompile) { export(CONFIG) } +defineTest(qtConfOutput_useBFDLinker) { + !$${2}: return() + + # We need to preempt the output here, so that qtConfTest_linkerSupportsFlag can work properly in qtbase + CONFIG += use_bfd_linker + export(CONFIG) +} + defineTest(qtConfOutput_useGoldLinker) { !$${2}: return() @@ -1034,6 +1042,14 @@ defineTest(qtConfOutput_useGoldLinker) { export(CONFIG) } +defineTest(qtConfOutput_useLLDLinker) { + !$${2}: return() + + # We need to preempt the output here, so that qtConfTest_linkerSupportsFlag can work properly in qtbase + CONFIG += use_lld_linker + export(CONFIG) +} + defineTest(qtConfOutput_debugAndRelease) { $$qtConfEvaluate("features.debug") { qtConfOutputVar(append, "publicPro", "CONFIG", "debug") -- cgit v1.2.3