diff options
author | Michal Klocek <michal.klocek@qt.io> | 2019-01-17 15:39:32 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-02-06 22:11:22 +0000 |
commit | 7910dd0a548cdd9e7c5716d4f6704b3185fa34fb (patch) | |
tree | ebed8bfe3f4a187e3dbb8d42dc47ba01ff05d921 /configure.pri | |
parent | 5133e22ae200eb3c5169340a16b419c9fce747cb (diff) |
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 <kai.koehne@qt.io>
Diffstat (limited to 'configure.pri')
-rw-r--r-- | configure.pri | 16 |
1 files changed, 16 insertions, 0 deletions
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") |