From 063af1346ef421217b79bdbe3030ec0ca7942ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Wed, 8 Nov 2023 18:05:20 +0100 Subject: Add 'mold' as possible value for cpp.linkerVariant Change-Id: Ia9a874f09d87020c6f6999e6267596a03b64e721 Reviewed-by: Ivan Komissarov --- doc/reference/modules/cpp-module.qdoc | 4 ++-- share/qbs/modules/cpp/GenericGCC.qbs | 2 +- tests/auto/blackbox/tst_blackbox.cpp | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc index f0b6de063..271787fbc 100644 --- a/doc/reference/modules/cpp-module.qdoc +++ b/doc/reference/modules/cpp-module.qdoc @@ -1402,8 +1402,8 @@ will result in the \c {-fuse-ld} option being emitted when linking with \c gcc, \c clang or \c clang-cl. Other toolchains do not support this property. - The possible values for \c clang and \c gcc are \c "bfd", \c "gold" and \c "lld", - the possible values for \c clang-cl are \c "link" and \c "lld". + The possible values for \c clang and \c gcc are \c "bfd", \c "gold", \c "lld" + and \c "mold", the possible values for \c clang-cl are \c "link" and \c "lld". The following example demonstrates how to change the linker for different toolchains: diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 05ceccf5f..1a9c74554 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -170,7 +170,7 @@ CppModule { property string linkerVariant PropertyOptions { name: "linkerVariant" - allowedValues: ["bfd", "gold", "lld"] + allowedValues: ["bfd", "gold", "lld", "mold"] description: "Allows to specify the linker variant. Maps to gcc's and clang's -fuse-ld " + "option." } diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index c39cc33f1..1b4341f12 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -4974,6 +4974,7 @@ void TestBlackbox::linkerVariant_data() QTest::newRow("default") << QString(); QTest::newRow("bfd") << QString("bfd"); QTest::newRow("gold") << QString("gold"); + QTest::newRow("mold") << QString("mold"); } void TestBlackbox::linkerVariant() -- cgit v1.2.3